/* ===============================================
   FOCUSFLOW - Professional Productivity Timer
   Dark Theme with Green Productivity Palette
   =============================================== */

:root {
    /* Professional Dark Theme Colors */
    --bg-primary: #0c1821;
    --bg-secondary: #1a2332;
    --bg-card: #1a2332;
    --bg-card-hover: #243447;
    
    /* Productivity Green Palette */
    --primary: #10b981;
    --primary-dark: #059669;
    --accent: #34d399;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Accent Colors - Solid */
    --primary-solid: #10b981;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Professional Green Gradients */
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-accent: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    
    /* Professional Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 32px rgba(16, 185, 129, 0.3);
    
    /* Professional Borders */
    --border: 1px solid #374151;
}

/* Light Theme Variables */
[data-theme="light"] {
    /* Professional Light Theme Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    
    /* Text Colors */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    
    /* Professional Light Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);
    
    /* Professional Light Borders */
    --border: 1px solid #e5e7eb;
}

/* Light Theme Specific Overrides */
[data-theme="light"] .background {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ===============================================
   PROFESSIONAL BACKGROUND
   =============================================== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0c1821 0%, #1a2332 100%);
}

.stars {
    display: none; /* Removed for professional theme */
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

/* ===============================================
   NAVIGATION
   =============================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: var(--border);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    grid-column: 2;
}


.theme-toggle {
    background: var(--bg-card);
    border: var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    grid-column: 3;
    justify-self: end;
}

.theme-toggle:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* ===============================================
   CONTAINER
   =============================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 1.5rem 2rem;
}

/* ===============================================
   TIMER HERO SECTION
   =============================================== */
.timer-hero {
    margin-bottom: 2rem;
}

.timer-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.timer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(96, 165, 250, 0.1), transparent);
    animation: glowPulse 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.timer-card > * {
    position: relative;
    z-index: 1;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn i {
    font-size: 1.5rem;
}

.mode-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.mode-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Timer Display */
.timer-display {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto 1.5rem;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.progress-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.time {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.session-info {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Timer Controls */
.timer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.play-btn i {
    margin-left: 3px;
}

.play-btn.playing i::before {
    content: "\f04c"; /* fa-pause */
    margin-left: 0;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-item small {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===============================================
   SECTIONS
   =============================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.section-header i {
    color: var(--primary);
}

.add-task-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-task-btn i {
    color: white;
    font-weight: 900;
}

.add-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ===============================================
   SECTION HEADERS
   =============================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-header h2 i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* ===============================================
   TASKS SECTION
   =============================================== */
.tasks-section {
    margin-bottom: 2rem;
}

.tasks-section .section-header {
    justify-content: space-between;
    text-align: left;
}

.tasks-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 150px;
}

.no-tasks,
.no-activity {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-secondary);
}

.no-tasks i,
.no-activity i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Task Item */
.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.3s ease;
}

.task-checkbox:hover {
    background: rgba(16, 185, 129, 0.1);
}

.task-item.completed .task-checkbox {
    background: var(--primary);
    color: white;
}

.task-content {
    flex: 1;
}

.task-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.task-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--primary);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-action-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
}

/* ===============================================
   ANALYTICS SECTION
   =============================================== */
.analytics-section {
    margin-bottom: 2rem;
    text-align: center;
}

.analytics-section .section-header {
    justify-content: center;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.analytics-card {
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.analytics-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ===============================================
   ACTIVITY SECTION
   =============================================== */
.activity-section {
    margin-bottom: 3rem;
    text-align: center;
}

.activity-section .section-header {
    justify-content: center;
}

.activity-feed {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border);
    border-radius: 16px;
    padding: 2rem;
    min-height: 200px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(96, 165, 250, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===============================================
   MODALS
   =============================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: var(--border);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: var(--border);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: var(--border);
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.setting-group input[type="number"] {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-group .unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.settings-toggles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-item label:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
}

.toggle-item input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.toggle-item input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-item input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    border: var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* ===============================================
   TOAST NOTIFICATION
   =============================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    color: var(--success);
    font-size: 1.2rem;
}

.toast span {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 968px) {
    .container {
        padding: 100px 1.5rem 2rem;
    }

    .timer-card {
        padding: 2rem;
    }

    .mode-selector {
        flex-direction: column;
    }

    .timer-display {
        width: 250px;
        height: 250px;
    }

    .time {
        font-size: 3rem;
    }

    .play-btn {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 0 1rem;
    }

    .logo span {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .add-task-btn {
        width: 100%;
        justify-content: center;
    }

    .toast {
        right: 1rem;
        left: 1rem;
    }
}
