:root {
    --bg-main: #0a0f1d;
    --bg-surface: #111827;
    --card-bg: rgba(22, 30, 49, 0.95);
    --card-border: #2e3a59;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.45);
    
    /* Neon & Game Colors */
    --color-yellow: #facc15;
    --color-red: #f43f5e;
    --color-green: #10b981;
    --color-blue: #38bdf8;
    --color-cyan: #06b6d4;
    --color-pink: #ec4899;
    --color-gold: #f59e0b;

    /* Ad Trash Colors */
    --ad-yellow: #ffff00;
    --ad-red: #ff0000;
    --ad-green: #00ff00;
    --ad-blue: #0000ff;
    --ad-border-color: #ff0055;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 50px;
}

/* ================= TOP FLASHING AD BANNER ================= */
.top-ad-banner {
    background: linear-gradient(90deg, #ff0000, #ff7700, #ffdd00, #00bb2d, #0088ff, #9900ff, #ff0077, #ff0000);
    background-size: 400% 400%;
    animation: rainbowShift 6s ease infinite;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #ffff00;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ad-label-pill {
    background: #000;
    color: #ffeb3b;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
    border: 1px solid #ffeb3b;
    white-space: nowrap;
}

.ad-content-marquee {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 2px #000, 0 0 5px #000;
    overflow: hidden;
    white-space: nowrap;
}

.blinking-text {
    animation: blinkText 0.6s infinite alternate;
    color: #ffff00;
}

@keyframes blinkText {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0.3; transform: scale(1.05); }
}

.ad-btn-blink {
    background: #ffff00;
    color: #d00000;
    font-weight: 900;
    font-size: 0.85rem;
    border: 2px dashed #ff0000;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    animation: pulseButton 0.8s infinite alternate;
    white-space: nowrap;
    text-decoration: underline;
}

.ad-btn-blink:hover {
    background: #ff0000;
    color: #ffff00;
}

.ad-badge {
    background: #ff0000;
    color: #fff;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 3px;
    border: 1px solid #fff;
}

/* ================= 3-COLUMN PAGE LAYOUT ================= */
.page-layout {
    display: flex;
    justify-content: center;
    max-width: 1440px;
    margin: 15px auto 40px;
    padding: 0 15px;
    gap: 20px;
}

.sidebar-ads {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.main-content-column {
    flex: 1;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ================= TOP UTILITY / SETTINGS BAR ================= */
.top-utility-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 10px;
}

.utility-left, .utility-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-live {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    color: var(--color-green);
    display: inline-flex;
    align-items: center;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.util-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.util-btn:hover {
    background: #334155;
    border-color: var(--color-blue);
    transform: translateY(-1px);
}

.ad-intensity-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #0f172a;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.intensity-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0 4px;
}

.intensity-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.intensity-btn.active {
    background: var(--color-red);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

/* ================= APP CONTAINER & HEADER ================= */
.app-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header {
    text-align: center;
    padding: 10px 0;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 2.2rem;
    color: #38bdf8;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
    letter-spacing: -1px;
}

.glow-neon {
    animation: neonFlicker 3s infinite alternate;
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 5px #38bdf8, 0 0 15px #38bdf8, 0 0 30px #0284c7;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.logo-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    transform: rotate(4deg);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* ================= IN-FEED AD ================= */
.infeed-ad {
    background: linear-gradient(135deg, #1e1b4b, #2e1065);
    border: 2px dashed #a855f7;
    border-radius: 10px;
    padding: 8px 14px;
    position: relative;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.ad-micro-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #a855f7;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 3px;
}

.infeed-content {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.infeed-icon {
    font-size: 1.8rem;
    animation: bounce 1.2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.infeed-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.3;
}

.infeed-text small {
    display: block;
    color: #d8b4fe;
    font-size: 0.8rem;
}

.ad-mini-btn {
    background: #ec4899;
    color: #fff;
    border: none;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
    white-space: nowrap;
    transition: transform 0.15s;
}

.ad-mini-btn:hover {
    transform: scale(1.05);
    background: #db2777;
}

/* ================= GAME CARD MAIN ================= */
.game-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(12px);
    min-height: 520px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Mode Selector Tabs */
.mode-selector-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.mode-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.mode-tab {
    background: #1e293b;
    border: 1px solid #334155;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mode-tab:hover {
    background: #334155;
    color: #fff;
}

.mode-tab.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: #818cf8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ================= SCREENS ================= */
.screen {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.screen.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Start Screen */
.welcome-hero {
    text-align: center;
    padding: 10px 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero-headline {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 8px auto 0;
    line-height: 1.5;
}

.modern-rules {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 16px;
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e293b;
}

.rules-header h3 {
    font-size: 1.1rem;
    color: #e2e8f0;
}

.rules-total-time {
    background: rgba(250, 204, 21, 0.15);
    color: var(--color-yellow);
    border: 1px solid rgba(250, 204, 21, 0.3);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.level-badge-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.badge-item {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 12px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.badge-item:hover {
    transform: translateX(4px);
    border-color: var(--color-blue);
}

.badge-num {
    background: #0f172a;
    color: var(--color-blue);
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #334155;
    flex-shrink: 0;
}

.badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-title {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 1.05rem;
}

.badge-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.features-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.feat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feat-icon {
    font-size: 1.5rem;
}

.feat-text strong {
    display: block;
    font-size: 0.85rem;
    color: #f8fafc;
}

.feat-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    border: 1px solid #818cf8;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #475569;
}

.btn-secondary:hover {
    background: #334155;
    color: #fff;
    transform: translateY(-2px);
}

.btn-cta {
    padding: 16px 24px;
}

.btn-text {
    font-size: 1.4rem;
    font-weight: 800;
}

.btn-subtext {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.85;
}

/* ================= TRANSITION SCREEN ================= */
.transition-box {
    text-align: center;
    padding: 40px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.level-tag {
    display: inline-block;
    background: #38bdf8;
    color: #0f172a;
    font-weight: 800;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    letter-spacing: 1px;
}

#transition-title {
    font-size: 2rem;
    color: #ffffff;
}

#transition-instruction {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 480px;
}

.countdown-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
}

.countdown {
    font-family: 'Press Start 2P', monospace;
    font-size: 4.5rem;
    color: var(--color-yellow);
    text-shadow: 0 0 25px rgba(250, 204, 21, 0.8);
    position: relative;
    z-index: 2;
}

.countdown-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--color-yellow);
    animation: ringPulse 1s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes ringPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.transition-tip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ================= GAMEPLAY SCREEN ================= */
.status-bar {
    display: flex;
    justify-content: space-between;
    background: #0f172a;
    border: 1px solid #1e293b;
    padding: 12px 16px;
    border-radius: 14px;
}

.status-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
}

.status-box .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-box .value {
    font-size: 1.6rem;
    font-weight: 800;
}

.highlight-yellow { color: var(--color-yellow); text-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
.highlight-green { color: var(--color-green); text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.highlight-cyan { color: var(--color-cyan); text-shadow: 0 0 10px rgba(6, 182, 212, 0.4); }
.highlight-pink { color: var(--color-pink); text-shadow: 0 0 10px rgba(236, 72, 153, 0.4); }
.highlight-red { color: var(--color-red); }

/* Level Time Progress Bar */
.time-progress-bar-container {
    width: 100%;
    height: 8px;
    background: #0f172a;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.time-progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #facc15, #f43f5e);
    background-size: 300% 100%;
    transition: width 0.25s linear;
}

.rule-banner {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid #475569;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.display-box {
    background-color: #0b1120;
    border: 2px solid #1e293b;
    border-radius: 16px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.color-target {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    transition: background-color 0.08s ease;
}

#word-display {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    display: none;
    user-select: none;
}

/* Floating Points Popup */
.floating-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-score {
    position: absolute;
    font-size: 1.6rem;
    font-weight: 800;
    animation: floatUp 0.8s ease-out forwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

@keyframes floatUp {
    0% { transform: translate(-50%, 0) scale(0.8); opacity: 1; }
    50% { transform: translate(-50%, -30px) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -60px) scale(1); opacity: 0; }
}

.feedback-message {
    height: 28px;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.feedback-message.correct { color: var(--color-green); text-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
.feedback-message.wrong { color: var(--color-red); text-shadow: 0 0 12px rgba(244, 63, 94, 0.6); }

/* Control Grid & Buttons */
.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.color-btn {
    border: none;
    border-radius: 16px;
    padding: 20px 14px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4), 0 8px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.06s ease, box-shadow 0.06s ease;
    user-select: none;
}

.color-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.4);
}

.btn-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.color-btn .key-hint {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-yellow {
    background: linear-gradient(180deg, #fde047 0%, #eab308 100%);
    color: #1e293b;
    border: 2px solid #fef08a;
}

.btn-red {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
    color: #ffffff;
    border: 2px solid #fca5a5;
}

.btn-green {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    color: #ffffff;
    border: 2px solid #86efac;
}

.btn-blue {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    color: #ffffff;
    border: 2px solid #93c5fd;
}

/* Screen Shake effect on mistake */
.screen-shake {
    animation: shakeEffect 0.3s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeEffect {
    10%, 90% { transform: translate3d(-3px, 0, 0); }
    20%, 80% { transform: translate3d(5px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ================= END GAME SCREEN ================= */
.end-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rank-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    display: inline-block;
}

.end-title {
    font-family: 'Press Start 2P', monospace;
    color: #38bdf8;
    font-size: 1.5rem;
    margin-top: 5px;
}

.end-evaluation {
    color: var(--text-muted);
    font-size: 1.15rem;
}

.final-score-container {
    background: #0f172a;
    border: 1px solid #1e293b;
    text-align: center;
    padding: 16px;
    border-radius: 14px;
}

.final-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.final-score {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-yellow);
    text-shadow: 0 0 25px rgba(250, 204, 21, 0.5);
    line-height: 1.1;
}

.final-mode-label {
    display: block;
    color: var(--color-blue);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Save Score Section */
.save-score-section {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 12px 16px;
}

.save-score-section h4 {
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.save-score-form {
    display: flex;
    gap: 10px;
}

.save-score-form input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
}

.save-score-form input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-save {
    background: var(--color-green);
    color: #fff;
    padding: 10px 18px;
    font-size: 1rem;
}

.btn-save:hover {
    background: #059669;
}

.save-status-msg {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-green);
}

/* Interstitial Ad */
.interstitial-ad {
    background: linear-gradient(135deg, #371435, #1d102e);
    border: 2px dashed #f43f5e;
    border-radius: 12px;
    padding: 12px 16px;
    position: relative;
    text-align: center;
}

.ad-label-tiny {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #f43f5e;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 3px;
}

.interstitial-body strong {
    color: #fb7185;
    font-size: 1rem;
}

.interstitial-body p {
    color: #fbcfe8;
    font-size: 0.85rem;
    margin: 4px 0 8px;
}

.end-actions {
    display: flex;
    gap: 12px;
}

.end-actions .btn {
    flex: 1;
}

/* ================= FOOTER ================= */
.footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding-top: 5px;
}

.footer-shortcuts {
    color: var(--text-muted);
}

kbd {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 2px 0 #0f172a;
    padding: 2px 7px;
    border-radius: 4px;
    color: #e2e8f0;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
}

/* ================= FAKE ADS STYLING ================= */
.ad-box {
    background: #ffffff;
    color: #000000;
    border: 3px solid #ff0000;
    border-radius: 8px;
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    font-family: Arial, Helvetica, sans-serif;
}

.ad-badge-corner {
    position: absolute;
    top: -10px;
    right: 8px;
    background: #ff0000;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.ad-box h4 {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.2;
    color: #cc0000;
}

.ad-box p {
    font-size: 0.85rem;
    line-height: 1.3;
    color: #222;
}

.ad-action-btn {
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 900;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-family: Arial, sans-serif;
    transition: transform 0.1s ease;
    box-shadow: 0 3px 0 rgba(0,0,0,0.3);
}

.ad-action-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Singles Ad */
.ad-singles {
    border-color: #ff007f;
    background: #fff0f6;
}

.ad-singles-img-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fake-avatar {
    width: 50px;
    height: 50px;
    background: #f43f5e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid #ff007f;
}

.online-indicator {
    color: #10b981;
    font-weight: 800;
    font-size: 0.75rem;
}

.pulse-anim {
    animation: pulseAdBtn 0.9s infinite alternate;
}

@keyframes pulseAdBtn {
    from { transform: scale(0.98); }
    to { transform: scale(1.03); filter: brightness(1.15); }
}

/* Tech Ad */
.ad-tech {
    background: #0f172a;
    color: #fff;
    border-color: #38bdf8;
}

.ad-tech h4 { color: #38bdf8; }
.ad-tech p { color: #cbd5e1; }

.fake-progress-bar {
    width: 100%;
    height: 12px;
    background: #334155;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #64748b;
}

.fake-progress-fill {
    width: 87%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #10b981);
    animation: fakeProgress 2s infinite ease-in-out;
}

@keyframes fakeProgress {
    0% { width: 10%; }
    50% { width: 94%; }
    100% { width: 10%; }
}

.green-btn {
    background: #10b981;
    color: #fff;
}

/* Doctor Ad */
.ad-doctor {
    background: #fefce8;
    border-color: #eab308;
}

.ad-doctor h4 { color: #854d0e; }
.ad-img-placeholder {
    font-size: 2rem;
    text-align: center;
    padding: 5px;
}

/* Wheel Ad */
.ad-wheel-box {
    background: #f8fafc;
    border-color: #f59e0b;
    text-align: center;
    align-items: center;
}

.mini-wheel-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 5px auto;
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: #ef4444;
    z-index: 10;
}

.fake-wheel {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #1e293b;
    position: relative;
    overflow: hidden;
    background: conic-gradient(
        #ef4444 0deg 90deg,
        #f59e0b 90deg 180deg,
        #10b981 180deg 270deg,
        #3b82f6 270deg 360deg
    );
    transition: transform 3s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.wheel-slice {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 1px 1px 2px #000;
}

.s1 { top: 15px; left: 35px; }
.s2 { top: 55px; left: 65px; }
.s3 { top: 75px; left: 25px; }
.s4 { top: 40px; left: 10px; }

.yellow-btn {
    background: #facc15;
    color: #000;
    border: 2px solid #ca8a04;
    width: 100%;
}

.wheel-result-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ef4444;
    min-height: 20px;
}

/* Virus Ad */
.ad-virus {
    background: #000;
    color: #fff;
    border: 3px solid #ff0000;
    animation: redBorderBlink 0.5s infinite alternate;
}

@keyframes redBorderBlink {
    from { border-color: #ff0000; box-shadow: 0 0 15px rgba(255, 0, 0, 0.6); }
    to { border-color: #ffff00; box-shadow: 0 0 5px rgba(255, 255, 0, 0.4); }
}

.virus-headline {
    color: #ff0000;
    font-weight: 900;
    font-size: 1.1rem;
    animation: blinkText 0.3s infinite alternate;
}

.fake-meter {
    background: #333;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.fake-meter-bar {
    width: 98.7%;
    height: 100%;
    background: #ff0000;
}

.red-btn {
    background: #ff0000;
    color: #fff;
}

.blink-fast {
    animation: blinkText 0.4s infinite alternate;
}

/* Car Ad */
.ad-car {
    background: #f0fdf4;
    border-color: #22c55e;
}
.car-icon { font-size: 2.2rem; text-align: center; }

/* Weird DIY Ad */
.ad-weird {
    background: #faf5ff;
    border-color: #a855f7;
}
.weird-icon { font-size: 1.8rem; text-align: center; }
.purple-btn {
    background: #a855f7;
    color: #fff;
}

.outline-btn {
    background: #fff;
    border: 2px solid #334155;
    color: #000;
}

/* Bottom Content Ad */
.bottom-content-ad {
    background: linear-gradient(90deg, #1e1b4b, #312e81);
    border: 3px solid #eab308;
    color: #fff;
}

.ad-casino-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.casino-text h3 {
    color: #facc15;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.casino-text p {
    color: #cbd5e1;
}

.gold-btn {
    background: linear-gradient(180deg, #fde047, #ca8a04);
    color: #000;
    white-space: nowrap;
    padding: 12px 20px;
}

.shake-btn {
    animation: shakeTiny 1.2s infinite;
}

@keyframes shakeTiny {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-3deg); }
    40% { transform: rotate(3deg); }
    60% { transform: rotate(-2deg); }
    80% { transform: rotate(2deg); }
}

/* ================= FLOATING NOTIFICATION TOAST ================= */
.fake-toast {
    position: fixed;
    top: 60px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    max-width: 320px;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
}

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

.toast-avatar {
    font-size: 2rem;
    flex-shrink: 0;
}

.toast-body strong {
    display: block;
    color: #34d399;
    font-size: 0.95rem;
}

.toast-body p {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin: 2px 0;
}

.toast-body small {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    align-self: flex-start;
}

.toast-close:hover {
    color: #fff;
}

/* ================= FLOATING CHAT WIDGET ================= */
.fake-chat-widget {
    position: fixed;
    bottom: 45px;
    right: 20px;
    width: 280px;
    background: #0f172a;
    border: 2px solid #ec4899;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 9998;
    overflow: hidden;
    font-family: inherit;
    transition: height 0.3s ease;
}

.chat-header {
    background: #ec4899;
    color: #ffffff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.chat-min-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
}

.chat-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #111827;
}

.chat-body.minimized {
    display: none;
}

.chat-bubble {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.3;
}

.chat-bubble.received {
    background: #1f2937;
    color: #f1f5f9;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-bubble.sent {
    background: #4f46e5;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.w-full {
    width: 100%;
}

/* ================= MODAL OVERLAYS ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-card {
    background: #1e293b;
    border: 2px solid #475569;
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
}

/* Scam Winner Modal */
.scam-modal {
    background: #ffffea;
    color: #000;
    border: 4px solid #ff0000;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

.modal-fake-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #eee;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 2px 6px;
    cursor: pointer;
    color: #666;
}

.modal-fake-close-btn:hover {
    background: #ffdddd;
    color: #ff0000;
}

.modal-header-flash {
    background: #ff0000;
    color: #ffff00;
    padding: 12px;
    font-weight: 900;
    font-size: 1.3rem;
    animation: blinkText 0.5s infinite alternate;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-prize-icon {
    font-size: 3.5rem;
}

.scam-modal h3 {
    font-size: 1.35rem;
    color: #cc0000;
    font-weight: 900;
}

.scam-modal p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4;
}

.modal-timer {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ff0000;
}

.modal-button-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.btn-giant-green {
    background: #00bb2d;
    color: #fff;
    border: 2px solid #00881f;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 187, 45, 0.4);
}

.btn-giant-sub {
    background: #e2e8f0;
    border: 1px solid #94a3b8;
    color: #475569;
    font-size: 0.8rem;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-real-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 4px;
}

/* Leaderboard Modal */
.leaderboard-card {
    background: #0f172a;
    border-color: #38bdf8;
    color: #fff;
    max-width: 620px;
}

.modal-header {
    background: #1e293b;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.modal-header h2 {
    font-family: 'Press Start 2P', monospace;
    font-size: 1.05rem;
    color: #38bdf8;
}

.modal-close-icon {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-close-icon:hover { color: #fff; }

.leaderboard-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
}

.lb-tab {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
}

.lb-tab.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
}

.leaderboard-table-wrap {
    max-height: 280px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.leaderboard-table th {
    background: #1e293b;
    padding: 10px 12px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.leaderboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1e293b;
}

.leaderboard-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.leaderboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.btn-primary-small {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 800;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-secondary-small {
    background: #1e293b;
    color: #ef4444;
    border: 1px solid #334155;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ================= COOKIE BANNER ================= */
.fake-cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 320px;
    max-width: 780px;
    background: rgba(15, 23, 42, 0.96);
    border: 2px solid #f59e0b;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 9995;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(8px);
}

.cookie-text {
    font-size: 0.88rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.cookie-text strong {
    color: #fbbf24;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-btn {
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.cookie-accept {
    background: #f59e0b;
    color: #000;
}

.cookie-more {
    background: #ef4444;
    color: #fff;
}

.cookie-dismiss {
    background: #334155;
    color: #cbd5e1;
}

/* ================= BOTTOM RUNNING TICKER ================= */
.bottom-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000000;
    border-top: 2px solid #ef4444;
    display: flex;
    align-items: center;
    z-index: 9999;
    height: 32px;
    overflow: hidden;
}

.ticker-badge {
    background: #ef4444;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.75rem;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.ticker-content {
    display: inline-flex;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffff00;
}

.ticker-item {
    margin-right: 40px;
}

@keyframes tickerScroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ================= CONFETTI CANVAS ================= */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10005;
}

/* ================= AD MODE STATES ================= */
body.ad-mode-low .sidebar-ads {
    display: none;
}
body.ad-mode-low .fake-toast {
    display: none;
}
body.ad-mode-low .fake-chat-widget {
    display: none;
}
body.ad-mode-low .top-ad-banner {
    filter: saturate(0.6);
}

body.ad-mode-insane .ad-box {
    animation: jitter 4s infinite;
}

@keyframes jitter {
    0%, 95%, 100% { transform: translate(0, 0); }
    96% { transform: translate(-2px, 1px); }
    98% { transform: translate(2px, -1px); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
    .sidebar-ads {
        display: none;
    }
    .fake-cookie-banner {
        right: 20px;
    }
}

@media (max-width: 650px) {
    .logo {
        font-size: 1.6rem;
    }
    .buttons-grid {
        gap: 8px;
    }
    .color-btn {
        padding: 14px 8px;
    }
    .btn-title {
        font-size: 1.2rem;
    }
    #word-display {
        font-size: 2.5rem;
    }
    .features-preview-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .top-utility-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .fake-chat-widget {
        display: none;
    }
}