/* Pomodoro Statistics Styles */

/* Statistics Button */
.pomodoro-statistics-btn {
    margin: 50px auto 0 auto;
    width: 280px;
    height: 60px;
    background: linear-gradient(135deg, #BC8AFF 0%, #8B5CF6 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(188, 138, 255, 0.3);
    z-index: 10;
}

.pomodoro-statistics-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(188, 138, 255, 0.4);
}

.pomodoro-statistics-btn:active {
    transform: scale(0.98);
}

.pomodoro-statistics-btn i {
    font-size: 20px;
}

/* Modal Overlay */
.pomodoro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

/* Modal Base */
.pomodoro-modal {
    background: linear-gradient(145deg, #1a1a2e, #0f0f23);
    border-radius: 24px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

/* Custom Scrollbar for Statistics Modal */
.pomodoro-modal::-webkit-scrollbar {
    width: 8px;
}

.pomodoro-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.pomodoro-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #BC8AFF, #8B5CF6);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.pomodoro-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8B5CF6, #6B46C1);
}

.pomodoro-modal::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

/* Firefox scrollbar styling */
.pomodoro-modal {
    scrollbar-width: thin;
    scrollbar-color: #BC8AFF rgba(255, 255, 255, 0.05);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.pomodoro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pomodoro-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.pomodoro-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.pomodoro-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Body */
.pomodoro-modal-body {
    padding: 32px;
}

/* Auth Modal Styles */
.auth-modal {
    width: 500px;
}

.auth-modal-content {
    text-align: center;
}

.auth-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6e00ff, #6e00ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.auth-modal-icon i {
    font-size: 32px;
    color: white;
}

.auth-modal-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.auth-modal-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.benefit-item i {
    color: #BC8AFF;
    font-size: 20px;
}

.benefit-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.auth-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-register-btn {
    background: linear-gradient(135deg, #6e00ff, #6e00ff);
    color: white;
    padding: 16px 24px;
    border-radius: 48px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.auth-register-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.auth-login-btn {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-login-btn:hover {
    color: #6e00ff;
}

/* Statistics Modal Styles */
.statistics-modal {
    width: 900px;
}

/* Loading State */
.statistics-loading {
    text-align: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #BC8AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.statistics-loading p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Error State */
.statistics-error {
    text-align: center;
    padding: 60px 0;
}

.error-icon {
    width: 60px;
    height: 60px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.error-icon i {
    font-size: 24px;
    color: white;
}

.statistics-error p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

.retry-btn {
    background: #BC8AFF;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.retry-btn:hover {
    background: #8B5CF6;
}

/* Statistics Content */
.statistics-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.statistics-content h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.statistics-content h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

/* Daily Summary */
.summary-cards {
    display: flex;
    gap: 1rem;
}

.summary-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: linear-gradient(145deg, #2a2a3e, #1f1f32);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(188, 138, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 24px;
    color: #BC8AFF;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.card-label {
    font-size: 1rem;
    text-align: center;
    line-height: 1.2;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Streak Section */
.streak-card {
    background: linear-gradient(135deg, #BC8AFF, #8B5CF6);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.streak-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-icon i {
    font-size: 28px;
}

.streak-content {
    flex: 1;
}

.streak-message {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.streak-counter {
    font-size: 16px;
    opacity: 0.9;
}

/* Analytics Section */
.chart-container {
    background: linear-gradient(145deg, #2a2a3e, #1f1f32);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    margin-top: 16px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .pomodoro-statistics-btn {
        width: calc(100% - 40px);
        max-width: 250px;
        height: 50px;
        font-size: 14px;
        margin: 30px auto 0 auto;
    }

    .statistics-modal,
    .auth-modal {
        width: 95vw;
        margin: 0 10px;
    }

    .pomodoro-modal-header {
        padding: 20px 24px;
    }

    .pomodoro-modal-header h2 {
        font-size: 20px;
    }

    .pomodoro-modal-body {
        padding: 24px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 20px;
    }

    .card-value {
        font-size: 24px;
    }

    .streak-card {
        padding: 20px;
        gap: 16px;
    }

    .streak-icon {
        width: 50px;
        height: 50px;
    }

    .streak-icon i {
        font-size: 24px;
    }

    .streak-message {
        font-size: 16px;
    }

    .chart-container {
        padding: 20px;
    }

    .chart-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .pomodoro-statistics-btn {
        width: calc(100% - 20px);
        max-width: 200px;
        height: 45px;
        font-size: 13px;
        margin: 20px auto 0 auto;
    }

    .statistics-modal,
    .auth-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .pomodoro-modal-header {
        padding: 16px 20px;
    }

    .pomodoro-modal-body {
        padding: 20px;
    }

    .chart-wrapper {
        height: 200px;
    }
}

/* Light Theme Styles */
body[data-theme="light"] .pomodoro-modal {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    color: #1e293b;
}

body[data-theme="light"] .pomodoro-modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .pomodoro-modal-header h2 {
    color: #1e293b;
}

body[data-theme="light"] .pomodoro-modal-close {
    color: #1e293b;
}

body[data-theme="light"] .pomodoro-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .auth-modal-content p {
    color: rgba(30, 41, 59, 0.8);
}

body[data-theme="light"] .benefit-item span {
    color: rgba(30, 41, 59, 0.9);
}

body[data-theme="light"] .statistics-loading p {
    color: rgba(30, 41, 59, 0.7);
}

body[data-theme="light"] .statistics-error p {
    color: rgba(30, 41, 59, 0.8);
}

body[data-theme="light"] .statistics-content h3 {
    color: #1e293b;
}

body[data-theme="light"] .statistics-content h4 {
    color: rgba(30, 41, 59, 0.9);
}

body[data-theme="light"] .summary-card {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .card-value {
    color: #1e293b;
}

body[data-theme="light"] .card-label {
    color: rgba(30, 41, 59, 0.7);
}

body[data-theme="light"] .chart-container {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
