/* --- Design System (Midnight Forest Stage Presence) --- */
        :root {
            --color-bg-deep: #050811;
            --color-bg-forest: radial-gradient(circle at 50% 50%, #0c1a24 0%, #050811 100%);
            --color-primary: #10b981; /* Emerald Lime */
            --color-primary-glow: rgba(16, 185, 129, 0.15);
            --color-accent: #06b6d4; /* Luminous Cyan */
            --color-accent-glow: rgba(6, 182, 212, 0.15);
            --color-text-main: #f8fafc;
            --color-text-muted: #64748b;
            --color-glass-card: rgba(15, 23, 42, 0.55);
            --color-glass-border: rgba(255, 255, 255, 0.05);
            --color-slider-track: rgba(255, 255, 255, 0.1);
            --font-display: 'Outfit', sans-serif;
            --font-sans: 'Plus Jakarta Sans', sans-serif;
            --glass-blur: blur(20px);
            --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            user-select: none;
            outline: none;
        }

        body {
            background-color: var(--color-bg-deep);
            background-image: var(--color-bg-forest);
            color: var(--color-text-main);
            font-family: var(--font-sans);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            overflow-x: hidden;
            position: relative;
        }

        /* --- Canvas Background (Floating Fireflies) --- */
        #fireflies-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
        }

        /* --- Global Grid Grid --- */
        .decor-grid {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: linear-gradient(rgba(16, 185, 129, 0.02) 1px, transparent 1px),
                              linear-gradient(90deg, rgba(16, 185, 129, 0.02) 1px, transparent 1px);
            background-size: 50px 50px;
            z-index: 2;
            pointer-events: none;
        }

        /* --- App Container --- */
        .app-container {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 1100px;
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 30px;
            margin-top: 20px;
        }

        @media (max-width: 900px) {
            .app-container {
                grid-template-columns: 1fr;
            }
        }

        /* --- Header Brand --- */
        .brand-header {
            position: relative;
            z-index: 10;
            text-align: center;
            margin-bottom: 10px;
            width: 100%;
        }

        .brand-header-link {
            text-decoration: none;
            color: inherit;
            display: inline-block;
            cursor: pointer;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        }

        .brand-header-link:hover {
            transform: scale(1.025);
            opacity: 0.95;
        }

        .brand-header h1 {
            font-family: var(--font-display);
            font-size: 2.8rem;
            font-weight: 800;
            letter-spacing: 4px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            text-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
        }

        .brand-header h1 span.logo-text {
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .brand-header h1 span.logo-leaf {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.6rem;
            height: 2.6rem;
            animation: pulse-leaf 6s ease-in-out infinite;
            margin-right: 14px;
            vertical-align: middle;
        }
        .brand-header h1 span.logo-leaf img.logo-leaf-img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            mix-blend-mode: screen;
            filter: drop-shadow(0 0 8px rgba(158, 124, 255, 0.5)) drop-shadow(0 0 3px rgba(0, 245, 212, 0.3));
        }

        @keyframes pulse-leaf {
            0% { transform: scale(1) rotate(0deg); }
            50% { transform: scale(1.08) rotate(5deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        .brand-header p {
            font-size: 0.9rem;
            color: var(--color-text-muted);
            letter-spacing: 2px;
            margin-top: 6px;
            text-transform: uppercase;
            text-align: center;
        }

        /* --- Glass Panel Base --- */
        .glass-panel {
            background: var(--color-glass-card);
            border: 1px solid var(--color-glass-border);
            border-radius: 24px;
            padding: 35px;
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3),
                        inset 0 0 2px rgba(255, 255, 255, 0.05);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            overflow: hidden;
        }

        /* --- Timer Section (Left Panel) --- */
        .timer-panel {
            align-items: center;
            text-align: center;
            position: relative;
        }

        .btn-settings {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--color-text-muted);
            border-radius: 50%;
            width: 38px;
            height: 38px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition-smooth);
            z-index: 80;
        }
        .btn-settings:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--color-primary);
            transform: rotate(45deg) scale(1.05);
            box-shadow: 0 0 15px var(--color-primary-glow);
        }
        .btn-settings svg {
            width: 18px;
            height: 18px;
        }

        /* Settings Overlay Styling */
        .settings-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(8, 14, 28, 0.95);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border-radius: 24px;
            padding: 35px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            z-index: 95;
            opacity: 0;
            transform: scale(0.95);
            pointer-events: none;
            transition: var(--transition-smooth);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        .settings-overlay.active {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }
        .settings-title {
            font-family: var(--font-display);
            font-size: 1.3rem;
            font-weight: 600;
            letter-spacing: 1px;
            color: var(--color-text-main);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding-bottom: 12px;
            margin-bottom: 10px;
            text-align: left;
        }
        .settings-content {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin: 20px 0;
        }
        .settings-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .settings-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--color-text-main);
        }
        .settings-input-group {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 4px 8px;
        }
        .settings-number-input {
            width: 45px;
            background: transparent;
            border: none;
            color: var(--color-text-main);
            font-family: var(--font-sans);
            font-size: 0.95rem;
            font-weight: 600;
            text-align: center;
            outline: none;
            -moz-appearance: textfield;
        }
        .settings-number-input::-webkit-outer-spin-button,
        .settings-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .settings-unit {
            font-size: 0.8rem;
            color: var(--color-text-muted);
            margin-right: 4px;
        }
        .btn-adjust {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--color-text-main);
            border-radius: 6px;
            width: 28px;
            height: 28px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition-smooth);
        }
        .btn-adjust:hover {
            background: rgba(255, 255, 255, 0.12);
            color: var(--color-primary);
        }
        .settings-actions {
            display: flex;
            gap: 15px;
            margin-top: 10px;
        }
        .btn-settings-action {
            flex: 1;
            padding: 12px;
            border-radius: 12px;
            font-family: var(--font-sans);
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition-smooth);
            border: none;
        }
        .btn-settings-cancel {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--color-text-muted);
        }
        .btn-settings-cancel:hover {
            background: rgba(255, 255, 255, 0.08);
            color: var(--color-text-main);
        }
        .btn-settings-save {
            background: var(--color-primary);
            color: #000;
            box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
        }
        .btn-settings-save:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
        }

        .timer-tabs {
            display: flex;
            background: rgba(0, 0, 0, 0.25);
            padding: 6px;
            border-radius: 100px;
            width: 100%;
            max-width: 440px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.03);
        }

        .timer-tab {
            flex: 1;
            padding: 10px 8px;
            border-radius: 100px;
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--color-text-muted);
            cursor: pointer;
            transition: var(--transition-smooth);
            background: transparent;
            border: none;
            text-align: center;
        }

        .timer-tab.active {
            color: var(--color-text-main);
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        /* Circular Timer Display */
        .timer-circle-container {
            position: relative;
            width: 280px;
            height: 280px;
            margin-bottom: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .timer-svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        .timer-track {
            fill: none;
            stroke: rgba(255, 255, 255, 0.03);
            stroke-width: 8;
        }

        .timer-progress {
            fill: none;
            stroke: url(#timer-gradient);
            stroke-width: 8;
            stroke-linecap: round;
            stroke-dasharray: 816.8; /* 2 * PI * r (r=130) */
            stroke-dashoffset: 0;
            transition: stroke-dashoffset 0.3s linear;
        }

        @keyframes circle-breath {
            0% { filter: drop-shadow(0 0 5px var(--color-primary)); stroke-width: 8; opacity: 0.8; }
            50% { filter: drop-shadow(0 0 15px var(--color-accent)); stroke-width: 10; opacity: 1; }
            100% { filter: drop-shadow(0 0 5px var(--color-primary)); stroke-width: 8; opacity: 0.8; }
        }
        .timer-progress.breathing {
            animation: circle-breath 4s ease-in-out infinite;
        }

        .timer-time-wrapper {
            position: relative;
            z-index: 5;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .timer-numbers {
            font-family: var(--font-display);
            font-size: 4.5rem;
            font-weight: 400;
            letter-spacing: -2px;
            color: var(--color-text-main);
            text-shadow: 0 0 30px rgba(255, 255, 255, 0.08);
            line-height: 1;
        }

        .timer-label {
            font-size: 0.8rem;
            color: var(--color-text-muted);
            letter-spacing: 3px;
            margin-top: 10px;
            text-transform: uppercase;
        }

        .timer-controls {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-top: 10px;
        }

        .btn-control {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--color-text-main);
            border-radius: 100px;
            cursor: pointer;
            transition: var(--transition-smooth);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-play {
            width: 70px;
            height: 70px;
            background: var(--color-primary);
            border: none;
            box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
        }

        .btn-play:hover {
            transform: scale(1.08);
            box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
        }

        .btn-play svg {
            width: 24px;
            height: 24px;
            fill: #000;
        }

        .btn-secondary {
            width: 50px;
            height: 50px;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: scale(1.05);
        }

        .btn-secondary svg {
            width: 18px;
            height: 18px;
            fill: var(--color-text-main);
        }

        /* --- Panel Right Side --- */
        .right-side-panel {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        /* --- Soundscape Panel --- */
        .sound-card {
            padding: 20px; /* Optimized height */
            transition: padding var(--transition-smooth);
        }

        .sound-card.collapsed {
            padding-bottom: 16px;
        }

        .sound-card.collapsed .panel-title {
            border-bottom-color: transparent;
            padding-bottom: 0;
            margin-bottom: 0;
        }

        .panel-title {
            font-family: var(--font-display);
            font-size: 1.1rem;
            font-weight: 600;
            letter-spacing: 1px;
            margin-bottom: 20px;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding-bottom: 10px;
            transition: border-bottom var(--transition-smooth), margin-bottom var(--transition-smooth), padding-bottom var(--transition-smooth);
        }

        /* --- Sound Category Tabs --- */
        .mixer-cat-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
            overflow-x: auto;
            padding-bottom: 4px;
            scrollbar-width: none;
            transition: opacity 0.3s ease, max-height 0.4s ease;
        }
        .mixer-cat-tabs::-webkit-scrollbar {
            display: none;
        }
        .sound-card.collapsed .mixer-cat-tabs {
            max-height: 0;
            opacity: 0;
            margin-bottom: 0;
            pointer-events: none;
            overflow: hidden;
        }
        .cat-tab {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--color-text-muted);
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            white-space: nowrap;
            outline: none;
            backdrop-filter: blur(8px);
            font-family: inherit;
        }
        .cat-tab:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            transform: translateY(-1px);
            border-color: rgba(255, 255, 255, 0.2);
        }
        .cat-tab.active {
            background: rgba(16, 185, 129, 0.2);
            border-color: #10b981;
            color: #10b981;
            box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
            font-weight: 600;
        }

        .sound-grid {
            display: flex;
            flex-direction: column;
            gap: 10px; /* Optimized spacing */
            max-height: 520px;
            opacity: 1;
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.4s ease;
            overflow-y: auto;
            padding-right: 4px;
        }
        .sound-grid::-webkit-scrollbar {
            width: 4px;
        }
        .sound-grid::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
        }

        .sound-item.cat-hidden {
            display: none !important;
        }

        .sound-card.collapsed .sound-grid {
            max-height: 0;
            opacity: 0;
            margin-top: 0;
            pointer-events: none;
        }

        .sound-item {
            display: grid;
            grid-template-columns: 40px 1.6fr 1.2fr auto;
            align-items: center;
            gap: 12px; /* Optimized spacing */
            background: rgba(0, 0, 0, 0.15);
            padding: 10px 16px; /* Optimized height */
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.02);
            transition: var(--transition-smooth);
            cursor: pointer;
        }

        .sound-item:hover {
            background: rgba(255, 255, 255, 0.02);
            border-color: rgba(255, 255, 255, 0.05);
        }

        .sound-icon-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition-smooth);
            color: var(--color-text-muted);
        }

        .sound-item:hover .sound-icon-btn {
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255, 255, 255, 0.2);
            transform: scale(1.08);
        }

        .sound-icon-btn.active {
            background: var(--color-primary-glow);
            border-color: var(--color-primary);
            color: var(--color-primary);
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
        }

        .sound-item.active-volume:hover .sound-icon-btn {
            background: var(--color-primary-glow);
            border-color: var(--color-primary);
        }

        .sound-info {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .sound-name-wrapper {
            display: flex;
            align-items: center;
        }

        .sound-name {
            font-size: 0.85rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Equalizer Animation */
        .sound-equalizer {
            display: inline-flex;
            align-items: flex-end;
            gap: 2px;
            width: 12px;
            height: 10px;
            margin-left: 6px;
            opacity: 0;
            transition: opacity var(--transition-smooth);
        }

        .sound-item.active-volume .sound-equalizer {
            opacity: 1;
        }

        .eq-bar {
            width: 2px;
            height: 100%;
            background-color: var(--color-primary);
            border-radius: 1px;
            animation: eq-bounce 1s ease-in-out infinite alternate;
            transform-origin: bottom;
        }

        .eq-bar:nth-child(1) { animation-delay: 0.1s; animation-duration: 0.7s; }
        .eq-bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 1.0s; }
        .eq-bar:nth-child(3) { animation-delay: 0.5s; animation-duration: 0.8s; }

        @keyframes eq-bounce {
            0% { transform: scaleY(0.2); }
            100% { transform: scaleY(1); }
        }

        .sound-desc {
            font-size: 0.7rem;
            color: var(--color-text-muted);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* --- Sleek Toggle Switch --- */
        .switch {
            position: relative;
            display: inline-block;
            width: 38px;
            height: 22px;
            cursor: pointer;
            margin-left: 5px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .switch-slider {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: var(--transition-smooth);
            border-radius: 22px;
        }

        .switch-slider:before {
            position: absolute;
            content: "";
            height: 14px;
            width: 14px;
            left: 3px;
            bottom: 3px;
            background-color: var(--color-text-muted);
            transition: var(--transition-smooth);
            border-radius: 50%;
        }

        .sound-item:hover .switch-slider {
            border-color: rgba(255, 255, 255, 0.15);
            background-color: rgba(255, 255, 255, 0.08);
        }

        input:checked + .switch-slider {
            background-color: var(--color-primary-glow);
            border-color: var(--color-primary);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
        }

        input:checked + .switch-slider:before {
            transform: translateX(16px);
            background-color: var(--color-primary);
            box-shadow: 0 0 8px var(--color-primary);
        }

        /* Custom Slider Styling */
        .slider-wrapper {
            display: flex;
            align-items: center;
        }

        .volume-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 4px;
            border-radius: 2px;
            background: var(--color-slider-track);
            outline: none;
            cursor: pointer;
            transition: var(--transition-smooth);
        }

        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--color-text-muted);
            cursor: pointer;
            transition: var(--transition-smooth);
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        }

        .sound-item.active-volume .volume-slider::-webkit-slider-thumb {
            background: var(--color-primary);
            box-shadow: 0 0 10px var(--color-primary);
        }

        .sound-item.active-volume .volume-slider {
            background: linear-gradient(90deg, var(--color-primary) var(--volume-percent, 50%), var(--color-slider-track) var(--volume-percent, 50%));
        }

        /* --- Task Panel --- */
        .task-card {
            padding: 25px;
            flex-grow: 1;
        }

        .task-input-wrapper {
            display: flex;
            position: relative;
            margin-bottom: 20px;
        }

        .task-input {
            width: 100%;
            padding: 14px 20px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--color-glass-border);
            border-radius: 14px;
            color: var(--color-text-main);
            font-family: var(--font-sans);
            font-size: 0.9rem;
            transition: var(--transition-smooth);
        }

        .task-input:focus {
            border-color: var(--color-primary);
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
            background: rgba(0, 0, 0, 0.45);
        }

        .task-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 180px;
            overflow-y: auto;
            padding-right: 5px;
        }

        .task-list::-webkit-scrollbar {
            width: 4px;
        }

        .task-list::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }

        .task-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.02);
            border-radius: 12px;
            transition: var(--transition-smooth);
        }

        .task-item:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.05);
        }

        .task-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .task-checkbox {
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 6px;
            border: 2px solid var(--color-text-muted);
            cursor: pointer;
            transition: var(--transition-smooth);
            position: relative;
        }

        .task-checkbox:checked {
            background: var(--color-primary);
            border-color: var(--color-primary);
        }

        .task-checkbox:checked::after {
            content: '';
            position: absolute;
            left: 5px;
            top: 2px;
            width: 4px;
            height: 8px;
            border: solid #000;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        .task-text {
            font-size: 0.85rem;
            font-weight: 500;
            transition: var(--transition-smooth);
        }

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

        .task-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .task-pomo-badge {
            font-size: 0.75rem;
            color: var(--color-primary);
            background: rgba(16, 185, 129, 0.08);
            border: 1px solid rgba(16, 185, 129, 0.15);
            padding: 3px 10px;
            border-radius: 100px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .btn-master-mute {
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            color: var(--color-text-muted);
            transition: var(--transition-smooth);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: auto;
            border-radius: 50%;
        }

        .btn-master-mute:hover {
            color: var(--color-primary);
            background: rgba(255, 255, 255, 0.05);
            transform: scale(1.1);
        }

        .btn-master-mute .mute-icon-off {
            display: none;
        }

        .btn-master-mute.muted .mute-icon-on {
            display: none;
        }

        .btn-master-mute.muted .mute-icon-off {
            display: block;
            color: #ef4444; /* red accent when muted */
            filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.4));
        }

        .btn-mixer-toggle {
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            color: var(--color-text-muted);
            transition: var(--transition-smooth);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .btn-mixer-toggle:hover {
            color: var(--color-primary);
            background: rgba(255, 255, 255, 0.05);
            transform: scale(1.1);
        }

        .sound-card.collapsed .btn-mixer-toggle svg {
            transform: rotate(180deg);
        }

        .btn-task-delete {
            background: transparent;
            border: none;
            color: var(--color-text-muted);
            cursor: pointer;
            transition: var(--transition-smooth);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-task-delete:hover {
            color: #ef4444;
            transform: scale(1.1);
        }

        .btn-task-delete svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

        /* Empty State */
        .task-empty {
            text-align: center;
            padding: 20px 0;
            color: var(--color-text-muted);
            font-size: 0.8rem;
            letter-spacing: 1px;
        }

        /* --- Stats Board --- */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-top: 20px;
            width: 100%;
        }

        .stat-card {
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid var(--color-glass-border);
            border-radius: 16px;
            padding: 15px;
            text-align: center;
            transition: var(--transition-smooth);
        }

        .stat-card:hover {
            border-color: rgba(16, 185, 129, 0.15);
            background: rgba(0, 0, 0, 0.35);
        }

        .stat-value {
            font-family: var(--font-display);
            font-size: 1.6rem;
            font-weight: 600;
            color: var(--color-primary);
            text-shadow: 0 0 15px var(--color-primary-glow);
        }

        .stat-label {
            font-size: 0.7rem;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 4px;
        }

        /* --- Footer Info --- */
        .app-footer {
            margin-top: 40px;
            text-align: center;
            font-size: 0.75rem;
            color: var(--color-text-muted);
            letter-spacing: 1px;
            line-height: 1.6;
            z-index: 10;
        }

        .app-footer a {
            color: var(--color-primary);
            text-decoration: none;
            transition: var(--transition-smooth);
        }

        .app-footer a:hover {
            text-shadow: 0 0 10px var(--color-primary);
        }

        /* Language Selector styling */
        .lang-selector {
            position: absolute;
            top: 24px;
            right: 24px;
            display: flex;
            align-items: center;
            gap: 4px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            padding: 2px 6px 2px 10px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            z-index: 100;
        }
        @media (max-width: 600px) {
            .lang-selector {
                position: relative;
                top: auto;
                right: auto;
                margin: 0 auto 20px auto;
                width: max-content;
            }
        }
        .lang-icon {
            font-size: 10px;
            display: inline-flex;
            align-items: center;
            opacity: 0.85;
            margin-right: 2px;
        }
        .lang-btn {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.75);
            font-size: 10px;
            font-weight: 700;
            padding: 4px 8px;
            border-radius: 12px;
            cursor: pointer;
            transition: var(--transition-smooth);
        }
        .lang-btn:hover {
            color: var(--color-text-main);
        }
        .lang-btn.active {
            background: rgba(255, 255, 255, 0.10);
            color: var(--color-accent);
            box-shadow: 0 2px 8px rgba(6, 182, 212, 0.12);
        }

        .panel-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-family: var(--font-display);
            font-size: 1.25rem;
            color: var(--color-text-main);
            margin-bottom: 24px;
            font-weight: 600;
        }
        
        /* Footer Links Styling */
        .footer-links {
            margin-bottom: 12px;
            font-weight: 500;
            display: flex;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .footer-links a {
            color: var(--color-text-muted);
            text-decoration: none;
            transition: var(--transition-smooth);
            cursor: pointer;
        }
        .footer-links a:hover {
            color: var(--color-primary);
            text-shadow: 0 0 10px var(--color-primary-glow);
        }

        /* Full Viewport Info Overlay & Modals */
        .info-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(4, 7, 15, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            z-index: 200;
            opacity: 0;
            pointer-events: none;
            transition: var(--transition-smooth);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .info-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }
        .info-modal {
            background: var(--color-glass-card);
            border: 1px solid var(--color-glass-border);
            border-radius: 24px;
            width: 100%;
            max-width: 750px;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
            overflow: hidden;
            transform: scale(0.95);
            transition: var(--transition-smooth);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
        }
        .info-overlay.active .info-modal {
            transform: scale(1);
        }
        .info-header {
            padding: 20px 30px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .info-title {
            font-family: var(--font-display);
            font-size: 1.3rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .btn-info-close {
            background: transparent;
            border: none;
            color: var(--color-text-muted);
            cursor: pointer;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: var(--transition-smooth);
        }
        .btn-info-close:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--color-text-main);
        }
        .info-body {
            padding: 30px;
            overflow-y: auto;
            flex: 1;
            line-height: 1.7;
            font-size: 0.92rem;
            color: rgba(255, 255, 255, 0.85);
            text-align: left;
        }
        .info-body h3 {
            font-family: var(--font-display);
            font-size: 1.15rem;
            margin-top: 25px;
            margin-bottom: 12px;
            color: var(--color-primary);
            border-bottom: 1px solid rgba(16, 185, 129, 0.15);
            padding-bottom: 6px;
        }
        .info-body h3:first-child {
            margin-top: 0;
        }
        .info-body p {
            margin-bottom: 15px;
        }
        .info-body ul {
            margin-bottom: 20px;
            padding-left: 20px;
        }
        .info-body li {
            margin-bottom: 8px;
        }
        .guide-article {
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.03);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .guide-article h4 {
            font-family: var(--font-display);
            font-size: 1.1rem;
            color: var(--color-accent);
            margin-bottom: 10px;
        }

        /* --- Focus Science & Articles Section --- */
        .science-articles-section {
            width: 100%;
            max-width: 1100px;
            margin: 50px auto 10px auto;
            padding: 0 20px;
            z-index: 10;
        }

        .science-articles-section .section-title {
            font-family: var(--font-display);
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 24px;
            text-align: center;
            background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: 1px;
        }

        .articles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .article-card {
            background: var(--color-glass-card);
            border: 1px solid var(--color-glass-border);
            border-radius: 20px;
            padding: 24px;
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            transition: var(--transition-smooth);
            display: flex;
            flex-direction: column;
            text-align: left;
        }

        .article-card:hover {
            transform: translateY(-5px);
            border-color: rgba(16, 185, 129, 0.25);
            box-shadow: 0 15px 40px rgba(16, 185, 129, 0.1);
        }

        .article-card h3 {
            font-family: var(--font-display);
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--color-accent);
            margin-bottom: 12px;
        }

        .article-card p {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
            line-height: 1.6;
            margin-bottom: 20px;
            flex-grow: 1;
        }

        .article-card .btn-read {
            color: var(--color-primary);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: var(--transition-smooth);
        }

        .article-card .btn-read:hover {
            color: var(--color-text-main);
            transform: translateX(4px);
        }

        /* ==========================================================================
           Comprehensive Mobile & Tablet Responsive Design System
           ========================================================================== */

        /* --- Tablet & Medium Screens (max-width: 1024px) --- */
        @media (max-width: 1024px) {
            body {
                padding: 15px 12px 60px 12px;
            }
            .app-container {
                max-width: 100%;
                gap: 20px;
                grid-template-columns: 1fr;
            }
            .brand-header h1 {
                font-size: 2.3rem;
            }
            .glass-panel {
                padding: 24px;
            }
            .sound-grid {
                max-height: 480px;
            }
        }

        /* --- Smartphone & Mobile Screens (max-width: 768px) --- */
        @media (max-width: 768px) {
            body {
                padding: 10px 8px 50px 8px;
            }
            .top-bar {
                flex-wrap: wrap;
                gap: 10px;
                justify-content: center;
            }
            .brand-header {
                margin-bottom: 5px;
            }
            .brand-header h1 {
                font-size: 1.9rem;
                letter-spacing: 2px;
            }
            .brand-header h1 span.logo-leaf {
                width: 2rem;
                height: 2rem;
            }
            .glass-panel {
                padding: 20px 16px;
                border-radius: 18px;
            }
            .timer-circle {
                width: 230px;
                height: 230px;
            }
            .timer-display {
                font-size: 3.2rem;
            }
            .mixer-cat-tabs {
                gap: 6px;
                overflow-x: auto;
                padding-bottom: 6px;
                -webkit-overflow-scrolling: touch;
            }
            .cat-tab {
                padding: 6px 12px;
                font-size: 0.78rem;
            }
            .sound-item {
                grid-template-columns: 36px 1fr auto;
                gap: 8px;
                padding: 10px 12px;
            }
            .slider-wrapper {
                grid-column: span 3;
                margin-top: 4px;
            }
            .sound-desc {
                display: none;
            }
            .sound-name {
                font-size: 0.88rem;
            }
            .articles-grid {
                grid-template-columns: 1fr;
            }
            .modal-content {
                width: 92%;
                padding: 24px 18px;
            }
        }

        /* --- Small Smartphones (max-width: 480px) --- */
        @media (max-width: 480px) {
            .brand-header h1 {
                font-size: 1.6rem;
            }
            .timer-circle {
                width: 200px;
                height: 200px;
            }
            .timer-display {
                font-size: 2.8rem;
            }
            .timer-controls {
                gap: 12px;
            }
            .btn-control {
                padding: 12px 24px;
                font-size: 0.9rem;
            }
        }