        :root {
            --bg-1: #e2f8ff;
            --bg-2: #fff1b8;
            --bg-3: #ffb58b;
            --ink: #1a1a2e;
            --accent: #ff4757;
            --accent-2: #1e90ff;
            --gold: #ffc94a;
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            overflow-y: auto;
            background:
                radial-gradient(ellipse at top, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
            font-family: 'Fredoka', sans-serif;
            touch-action: none;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        canvas {
            display: block;
            width: 100vw;
            height: 100vh;
        }

        #page-heading {
            position: absolute;
            top: 16px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 4;
            text-align: center;
            pointer-events: none;
        }
        #page-heading h1 {
            margin: 0;
            font-family: 'Bungee', sans-serif;
            font-size: clamp(20px, 2.6vw, 34px);
            line-height: 1;
            color: var(--ink);
            text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
        }
        #page-heading h2 {
            margin: 4px 0 0 0;
            font-family: 'Fredoka', sans-serif;
            font-size: clamp(11px, 1.15vw, 14px);
            letter-spacing: 0.5px;
            color: rgba(26, 26, 46, 0.8);
            font-weight: 600;
            text-transform: uppercase;
        }

        /* Üst sol — Skor */
        #top-left {
            position: absolute;
            top: 20px;
            left: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;
            z-index: 5;
        }
        .stat-card {
            background: rgba(255, 255, 255, 0.95);
            padding: 12px 22px;
            border-radius: 18px;
            border: 4px solid var(--ink);
            box-shadow: 0 6px 0 rgba(0,0,0,0.15), 0 12px 24px rgba(0,0,0,0.1);
            min-width: 140px;
        }
        .stat-label {
            font-size: 12px;
            color: #888;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 1.5px;
            margin-bottom: 2px;
        }
        .stat-value {
            font-size: 32px;
            font-weight: 700;
            color: var(--ink);
            line-height: 1;
            font-family: 'Bungee', sans-serif;
        }
        #high-score-card .stat-value {
            color: var(--gold);
            -webkit-text-stroke: 1px var(--ink);
        }

        /* Üst sağ — Sonraki top önizleme + ses */
        #top-right {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: flex-end;
            z-index: 5;
        }
        #next-card {
            background: rgba(255, 255, 255, 0.95);
            padding: 10px 18px;
            border-radius: 18px;
            border: 4px solid var(--ink);
            box-shadow: 0 6px 0 rgba(0,0,0,0.15), 0 12px 24px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            gap: 12px;
            pointer-events: none;
        }
        #next-preview {
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #next-preview canvas {
            width: 50px !important;
            height: 50px !important;
        }
        #next-text {
            display: flex;
            flex-direction: column;
        }
        #sound-btn {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: white;
            border: 4px solid var(--ink);
            box-shadow: 0 6px 0 rgba(0,0,0,0.15);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            transition: transform 0.1s, box-shadow 0.1s;
            pointer-events: auto;
        }
        #sound-btn:active {
            transform: translateY(4px);
            box-shadow: 0 2px 0 rgba(0,0,0,0.15);
        }

        /* Tier (seviye) göstergesi - alt */
        #tier-display {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255,255,255,0.95);
            padding: 8px 14px;
            border-radius: 14px;
            border: 3px solid var(--ink);
            box-shadow: 0 4px 0 rgba(0,0,0,0.15);
            display: flex;
            gap: 6px;
            z-index: 5;
            pointer-events: none;
        }
        .tier-dot {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 2px solid var(--ink);
            opacity: 0.4;
            transition: opacity 0.3s, transform 0.3s;
        }
        .tier-dot.unlocked {
            opacity: 1;
            transform: scale(1.1);
            box-shadow: 0 0 8px currentColor;
        }

        /* Combo göstergesi */
        #combo-display {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Bungee', sans-serif;
            font-size: 80px;
            color: var(--gold);
            -webkit-text-stroke: 4px var(--ink);
            text-shadow: 0 8px 0 rgba(0,0,0,0.2);
            pointer-events: none;
            opacity: 0;
            z-index: 8;
        }
        @keyframes comboPop {
            0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-10deg); }
            30% { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(5deg); }
            70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
            100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) rotate(0); }
        }

        /* Game over modal */
        #game-over {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.8);
            background: white;
            padding: 40px 50px;
            border-radius: 28px;
            border: 6px solid var(--ink);
            text-align: center;
            opacity: 0;
            pointer-events: none;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 20px 60px rgba(0,0,0,0.4);
            z-index: 20;
            min-width: 300px;
        }
        #game-over.active {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
        }
        #game-over .game-over-title {
            margin: 0 0 6px 0;
            font-size: 44px;
            color: var(--accent);
            font-family: 'Bungee', sans-serif;
            -webkit-text-stroke: 2px var(--ink);
            text-shadow: 0 4px 0 rgba(0,0,0,0.15);
        }
        #game-over p {
            font-size: 16px;
            color: #777;
            margin: 0 0 20px 0;
            font-weight: 600;
        }
        .final-stats {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 24px;
        }
        .final-stat {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .final-stat-label {
            font-size: 11px;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 700;
        }
        .final-stat-value {
            font-size: 36px;
            font-weight: 700;
            font-family: 'Bungee', sans-serif;
            color: var(--ink);
        }
        .final-stat-value.gold {
            color: var(--gold);
            -webkit-text-stroke: 1px var(--ink);
        }
        #new-record {
            display: none;
            background: var(--gold);
            color: var(--ink);
            padding: 6px 14px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 13px;
            margin-bottom: 18px;
            border: 3px solid var(--ink);
            text-transform: uppercase;
            letter-spacing: 1px;
            animation: shake 0.5s infinite;
        }
        #new-record.active { display: inline-block; }
        @keyframes shake {
            0%, 100% { transform: rotate(-2deg); }
            50% { transform: rotate(2deg); }
        }
        #restart-btn {
            padding: 16px 36px;
            font-size: 22px;
            font-weight: 700;
            color: white;
            background: var(--accent-2);
            border: 4px solid var(--ink);
            border-radius: 14px;
            cursor: pointer;
            box-shadow: 0 6px 0 #1366a8;
            transition: transform 0.1s, box-shadow 0.1s;
            font-family: 'Fredoka', sans-serif;
            letter-spacing: 1px;
        }
        #restart-btn:active {
            transform: translateY(6px);
            box-shadow: 0 0 0 #1366a8;
        }

        #seo-content {
            position: relative;
            width: min(920px, calc(100vw - 28px));
            margin: 18px auto 26px auto;
            background: rgba(255, 255, 255, 0.9);
            border: 3px solid var(--ink);
            border-radius: 12px;
            padding: 10px 14px;
            z-index: 1;
            box-shadow: 0 4px 0 rgba(0,0,0,0.12);
        }
        #seo-content h2 {
            margin: 0 0 4px 0;
            font-size: 15px;
            font-family: 'Bungee', sans-serif;
            color: var(--ink);
            line-height: 1.1;
        }
        #seo-content p {
            margin: 0;
            font-size: 12px;
            line-height: 1.35;
            color: #2b2b3d;
            font-weight: 500;
        }

        /* Skor pop-up animasyonu */
        .score-popup {
            position: absolute;
            font-family: 'Bungee', sans-serif;
            font-size: 28px;
            color: white;
            -webkit-text-stroke: 2px var(--ink);
            text-shadow: 0 3px 0 rgba(0,0,0,0.3);
            pointer-events: none;
            z-index: 9;
            animation: scoreFloat 1.2s ease-out forwards;
        }
        @keyframes scoreFloat {
            0% { opacity: 0; transform: translateY(0) scale(0.5); }
            20% { opacity: 1; transform: translateY(-10px) scale(1.3); }
            100% { opacity: 0; transform: translateY(-80px) scale(1); }
        }

        @media (max-width: 600px) {
            #page-heading {
                top: calc(max(10px, env(safe-area-inset-top)) + 52px);
                width: 100%;
                padding: 0 12px;
            }
            #page-heading h1 {
                font-size: 28px;
            }
            #page-heading h2 {
                font-size: 11px;
            }

            /* --- Üst sol: kartları yan yana koy --- */
            #top-left {
                top: max(10px, env(safe-area-inset-top));
                left: 10px;
                flex-direction: row;
                gap: 6px;
                align-items: flex-start;
            }
            .stat-card {
                padding: 5px 10px;
                min-width: 0;
                border-width: 3px;
                border-radius: 12px;
                box-shadow: 0 4px 0 rgba(0,0,0,0.12);
            }
            .stat-label {
                font-size: 9px;
                letter-spacing: 0.8px;
                margin-bottom: 1px;
            }
            .stat-value { font-size: 20px; }

            /* --- Üst sağ: next + ses yan yana --- */
            #top-right {
                top: max(10px, env(safe-area-inset-top));
                right: 10px;
                flex-direction: row;
                align-items: center;
                gap: 6px;
            }
            #next-card {
                padding: 5px 10px;
                gap: 7px;
                border-width: 3px;
                border-radius: 12px;
                box-shadow: 0 4px 0 rgba(0,0,0,0.12);
            }
            #next-preview { width: 34px; height: 34px; }
            #next-preview canvas { width: 34px !important; height: 34px !important; }
            #next-text .stat-label { font-size: 9px; }
            #next-text .stat-value { font-size: 11px; }

            #sound-btn {
                width: 42px;
                height: 42px;
                font-size: 18px;
                border-width: 3px;
                box-shadow: 0 4px 0 rgba(0,0,0,0.12);
            }

            /* --- Alt tier noktaları --- */
            #tier-display {
                bottom: max(10px, env(safe-area-inset-bottom));
                padding: 5px 10px;
                gap: 4px;
                border-width: 2px;
                border-radius: 10px;
            }
            .tier-dot { width: 13px; height: 13px; border-width: 1.5px; }

            /* --- Combo --- */
            #combo-display {
                font-size: 48px;
                -webkit-text-stroke: 3px var(--ink);
            }

            /* --- Game over modal --- */
            #game-over {
                width: calc(100vw - 28px);
                max-width: 360px;
                padding: 22px 18px;
                min-width: 0;
                border-width: 4px;
                border-radius: 20px;
            }
            #game-over .game-over-title { font-size: 28px; -webkit-text-stroke: 1.5px var(--ink); }
            #game-over p { font-size: 13px; margin-bottom: 14px; }
            .final-stats { gap: 18px; margin-bottom: 16px; }
            .final-stat-label { font-size: 10px; }
            .final-stat-value { font-size: 26px; }
            #new-record { font-size: 11px; padding: 5px 12px; margin-bottom: 14px; }
            #restart-btn { padding: 12px 28px; font-size: 18px; border-width: 3px; }
            #seo-content {
                padding: 8px 10px;
            }
            #seo-content h2 { font-size: 12px; margin-bottom: 3px; }
            #seo-content p { font-size: 10px; line-height: 1.25; }

            /* --- Skor popup --- */
            .score-popup { font-size: 20px; -webkit-text-stroke: 1.5px var(--ink); }
        }

        /* Çok küçük ekranlar (SE, eski Android) */
        @media (max-width: 380px) {
            #page-heading {
                top: calc(max(10px, env(safe-area-inset-top)) + 48px);
            }
            #page-heading h1 {
                font-size: 24px;
            }
            #page-heading h2 {
                display: none;
            }
            .stat-value { font-size: 17px; }
            #next-preview { width: 28px; height: 28px; }
            #next-preview canvas { width: 28px !important; height: 28px !important; }
            .tier-dot { width: 10px; height: 10px; }
            #seo-content p {
                display: block;
                font-size: 10px;
                line-height: 1.3;
            }
        }
