/* Local Fonts - GDPR Compliance */
        @font-face {
            font-family: 'Inter';
            src: url('fonts/inter-300.ttf') format('truetype');
            font-weight: 300;
            font-style: normal;
        }

        @font-face {
            font-family: 'Inter';
            src: url('fonts/inter-400.ttf') format('truetype');
            font-weight: 400;
            font-style: normal;
        }

        @font-face {
            font-family: 'Inter';
            src: url('fonts/inter-500.ttf') format('truetype');
            font-weight: 500;
            font-style: normal;
        }

        @font-face {
            font-family: 'Inter';
            src: url('fonts/inter-600.ttf') format('truetype');
            font-weight: 600;
            font-style: normal;
        }

        @font-face {
            font-family: 'Outfit';
            src: url('fonts/outfit-300.ttf') format('truetype');
            font-weight: 300;
            font-style: normal;
        }

        @font-face {
            font-family: 'Outfit';
            src: url('fonts/outfit-400.ttf') format('truetype');
            font-weight: 400;
            font-style: normal;
        }

        @font-face {
            font-family: 'Outfit';
            src: url('fonts/outfit-700.ttf') format('truetype');
            font-weight: 700;
            font-style: normal;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            overflow: hidden;
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background: #050508;
            color: #fff;
        }

        #canvas {
            display: block;
            width: 100vw;
            height: 100vh;
        }

        /* Start-Overlay */
        #start-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, #10101a 0%, #050508 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
            transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1), visibility 2s;
        }

        #start-button {
            padding: 24px 48px;
            font-size: 20px;
            font-family: 'Outfit', sans-serif;
            font-weight: 500;
            letter-spacing: 0.5px;
            background: rgba(255, 255, 255, 0.03);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 60px;
            cursor: pointer;
            backdrop-filter: blur(20px);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #start-button:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.2);
            transform: scale(1.02) translateY(-2px);
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
        }

        #info-btn {
            margin-top: 25px;
            font-size: 14px;
            color: rgba(255, 255, 255, 0.4);
            background: none;
            border: none;
            cursor: pointer;
            text-decoration: underline;
            transition: color 0.3s;
        }

        #info-btn:hover {
            color: rgba(255, 255, 255, 0.7);
            background: none;
        }

        /* Info-Overlay */
        #info-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(10, 10, 15, 0.95);
            backdrop-filter: blur(30px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 110;
            opacity: 0;
            visibility: hidden;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #info-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        #legal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(10, 10, 15, 0.98);
            backdrop-filter: blur(30px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 120;
            opacity: 0;
            visibility: hidden;
            transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #legal-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        #legal-content {
            max-width: 800px;
            width: 90%;
            max-height: 85vh;
            padding: 40px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 30px;
            display: flex;
            flex-direction: column;
            transform: translateY(20px);
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #legal-overlay.visible #legal-content {
            transform: translateY(0);
        }

        #legal-body {
            overflow-y: auto;
            padding-right: 15px;
            margin-bottom: 20px;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
        }

        #legal-body::-webkit-scrollbar {
            width: 6px;
        }

        #legal-body::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

        #legal-body h1,
        #legal-body h2,
        #legal-body h3 {
            font-family: 'Outfit', sans-serif;
            color: #fff;
            margin-top: 30px;
            margin-bottom: 15px;
        }

        #legal-body h1 {
            font-size: 28px;
            margin-top: 0;
        }

        #legal-body h2 {
            font-size: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 10px;
        }

        #legal-body h3 {
            font-size: 16px;
        }

        #legal-body p,
        #legal-body li {
            font-size: 15px;
            line-height: 1.6;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 15px;
        }

        #close-legal {
            align-self: center;
            padding: 12px 40px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s;
        }

        #close-legal:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        #info-content {
            max-width: 600px;
            padding: 40px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 30px;
            text-align: center;
            transform: translateY(20px);
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #info-overlay.visible #info-content {
            transform: translateY(0);
        }

        #info-content h2 {
            font-family: 'Outfit', sans-serif;
            font-size: 32px;
            margin-bottom: 25px;
            background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.5) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        #info-content p {
            line-height: 1.8;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 20px;
            font-size: 16px;
        }

        .step-list {
            text-align: left;
            margin: 30px 0;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .step-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 15px;
        }

        .step-num {
            font-family: 'Outfit', sans-serif;
            font-size: 24px;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.2);
            min-width: 30px;
        }

        #close-info {
            padding: 12px 30px;
            margin-top: 20px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s;
        }

        #close-info:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        #controls {
            position: fixed;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            display: flex;
            gap: 15px;
            align-items: center;
            justify-content: center;
            padding: 12px 24px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 40px;
            backdrop-filter: blur(25px);
            opacity: 0;
            visibility: hidden;
            transition: opacity 2s, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
            max-width: 95vw;
            flex-wrap: wrap;
        }

        #controls.visible {
            opacity: 1;
            visibility: visible;
        }

        button,
        select {
            padding: 10px 20px;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            font-weight: 500;
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.75);
            cursor: pointer;
            transition: all 0.3s ease;
            outline: none;
        }

        select option {
            background: #1a1a24;
            color: white;
        }

        button:hover,
        select:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            border-color: rgba(255, 255, 255, 0.15);
        }

        button.active {
            background: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.35);
            color: #fff;
        }

        button.active:hover {
            background: rgba(255, 255, 255, 0.22);
        }

        #timer-display {
            font-family: 'Outfit', sans-serif;
            font-size: 16px;
            color: rgba(255, 255, 255, 0.6);
            min-width: 60px;
            text-align: center;
        }

        #footer-links {
            position: fixed;
            bottom: 15px;
            right: 25px;
            z-index: 105;
            display: flex;
            gap: 20px;
            font-size: 11px;
            letter-spacing: 0.5px;
        }

        #footer-links a {
            color: rgba(255, 255, 255, 0.2);
            text-decoration: none;
            transition: color 0.4s;
            font-weight: 400;
        }

        #footer-links a:hover {
            color: rgba(255, 255, 255, 0.6);
        }

        #phase-indicator {
            position: fixed;
            width: 100%;
            top: 25%;
            text-align: center;
            font-family: 'Outfit', sans-serif;
            font-size: 32px;
            font-weight: 300;
            letter-spacing: 4px;
            color: rgba(255, 255, 255, 0.1);
            text-transform: uppercase;
            pointer-events: none;
            transition: opacity 1s, color 1s;
        }

        #theme-selector {
            position: fixed;
            top: 30px;
            left: 30px;
            z-index: 10;
            display: flex;
            gap: 10px;
            opacity: 0;
            visibility: hidden;
            transition: all 1s ease;
        }

        #theme-selector.visible {
            opacity: 1;
            visibility: visible;
        }

        .streak-info {
            position: fixed;
            top: 30px;
            right: 30px;
            z-index: 10;
            font-family: 'Outfit', sans-serif;
            font-size: 14px;
            color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.05);
            padding: 8px 16px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
            opacity: 0;
            visibility: hidden;
            transition: all 1s ease;
        }

        .streak-info.visible {
            opacity: 1;
            visibility: visible;
        }

        /* Responsive Adjustments */
        @media (max-width: 768px) {

            #legal-content,
            #info-content {
                width: 95%;
                padding: 25px;
            }

            #controls {
                width: 90%;
                gap: 10px;
                padding: 10px;
                bottom: 30px;
            }

            button,
            select {
                padding: 8px 12px;
                font-size: 12px;
            }

            #phase-indicator {
                font-size: 24px;
            }
        }

        @media (max-width: 480px) {
            #theme-selector {
                top: 15px;
                left: 15px;
            }

            .streak-info {
                top: 15px;
                right: 15px;
                padding: 6px 12px;
                font-size: 12px;
            }

            #controls {
                flex-wrap: wrap;
                border-radius: 20px;
                bottom: 60px;
            }

            #footer-links {
                bottom: 15px;
                left: 0;
                right: 0;
                justify-content: center;
                gap: 15px;
            }

            #info-content h2 {
                font-size: 24px;
            }

            #info-content p {
                font-size: 14px;
            }
        }

        /* ==========================================
           CYCLE COUNTER
        ========================================== */
        #cycle-counter {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, calc(-50% + 90px));
            color: rgba(255, 255, 255, 0.3);
            font-family: 'Outfit', sans-serif;
            font-size: 14px;
            letter-spacing: 2px;
            pointer-events: none;
            z-index: 5;
            text-transform: uppercase;
        }

        /* ==========================================
           END OVERLAY
        ========================================== */
        #end-overlay {
            position: fixed;
            inset: 0;
            background: rgba(5, 5, 10, 0.85);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 130;
            opacity: 0;
            visibility: hidden;
            transition: opacity 1.5s ease, visibility 1.5s;
        }

        #end-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        #end-content {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            transform: translateY(20px);
            transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #end-overlay.visible #end-content {
            transform: translateY(0);
        }

        #end-icon {
            font-size: 72px;
            animation: float 3s ease-in-out infinite;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-10px);
            }
        }

        #end-content h2 {
            font-family: 'Outfit', sans-serif;
            font-size: 36px;
            font-weight: 300;
            letter-spacing: 3px;
            color: rgba(255, 255, 255, 0.9);
        }

        #end-stats-text {
            color: rgba(255, 255, 255, 0.4);
            font-size: 14px;
            letter-spacing: 1px;
        }

        #end-close {
            margin-top: 10px;
            padding: 16px 40px;
            font-family: 'Outfit', sans-serif;
            font-size: 16px;
            font-weight: 400;
            letter-spacing: 1px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 40px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        #end-close:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        /* ==========================================
           ONBOARDING OVERLAY
        ========================================== */
        #onboarding-overlay {
            position: fixed;
            inset: 0;
            background: radial-gradient(circle at center, #10101a 0%, #050508 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 150;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.8s ease, visibility 0.8s;
        }

        #onboarding-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        #onboarding-content {
            max-width: 480px;
            width: 90%;
            text-align: center;
            padding: 50px 40px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 32px;
            backdrop-filter: blur(20px);
        }

        .onboarding-step h2 {
            font-family: 'Outfit', sans-serif;
            font-size: 32px;
            font-weight: 300;
            letter-spacing: 2px;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 18px;
        }

        .onboarding-step p {
            color: rgba(255, 255, 255, 0.5);
            font-size: 15px;
            line-height: 1.7;
            margin-bottom: 32px;
        }

        .onboarding-next,
        #onboarding-finish {
            padding: 14px 38px;
            font-family: 'Outfit', sans-serif;
            font-size: 15px;
            letter-spacing: 1px;
            background: rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 40px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .onboarding-next:hover,
        #onboarding-finish:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        #onboarding-dots {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 28px;
        }

        .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transition: background 0.3s;
        }

        .dot.active {
            background: rgba(255, 255, 255, 0.7);
        }

        /* ==========================================
           NOTIFICATION BUTTON
        ========================================== */
        #notif-btn {
            font-size: 14px;
            padding: 8px 12px;
            min-width: 0;
        }