/* =============================================
CLICK THE BUBBLES – style.css
Typingway | https://typingway.com/games/click-pop
============================================= */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Baloo+2:wght@700;800&display=swap');

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent:        #8b0000;
    --accent-bright: #c0392b;
    --accent-glow:   rgba(139,0,0,0.18);
    --accent-lite:   #f8e8e8;
    --bg:            #f2f6ff;
    --bg2:           #e8f0ff;
    --surface:       #ffffff;
    --text:          #1a1a2e;
    --text-muted:    #6b7280;
    --border:        #dde4f0;
    --shadow:        0 4px 24px rgba(30,40,80,0.10);
    --shadow-lg:     0 12px 40px rgba(30,40,80,0.16);
    --radius:        18px;
    --radius-sm:     10px;
    --font-body:     'Nunito', sans-serif;
    --font-display:  'Baloo 2', sans-serif;
    --hud-h:         68px;
    --trans:         cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 60% 50% at 20% 10%, rgba(173,216,250,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 90%, rgba(245,200,210,0.30) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 60% 40%, rgba(200,235,200,0.22) 0%, transparent 55%);
}

/**********SEO Article**************/
.game-article-bgry
{
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    max-width: 520px;
    text-align: left;
    box-shadow: var(--shadow);
    margin: 0 auto;
    margin-bottom: 18px;
}
.game-article-bgry h2, h3
{
    color: darkred;
    margin-top: 16px;
    margin-bottom: 16px;
}
.game-article-bgry ul
{
    padding-left: 18px;
}
.game-article-bgry ul li
{
    margin-top: 10px;
    margin-bottom: 10px;
}
.game-article-bgry a
{
    text-decoration: none;
    color: dodgerblue;
}
/**********SEO Article**************/


/* === SITE HEADER === */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    height: 54px;
}
.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
}
.logo-mark {
    width: 34px; height: 34px;
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
}
.site-nav { display: flex; gap: 18px; }
.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    transition: color .2s;
}
.nav-link:hover { color: var(--accent); }

/* === MAIN === */
main { flex: 1; padding-top: 54px; }

/* === SCREENS === */
.screen {
    display: none;
    min-height: calc(100vh - 54px);
}
.screen.active { display: flex; }

/* =============================================
START SCREEN
============================================= */
#start-screen {
    justify-content: center;
    align-items: center;
    padding: 40px 20px 60px;
}
.start-inner {
    max-width: 520px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

/* Game Logo */
.game-logo-wrap {
    position: relative;
    width: 120px; height: 120px;
}
.game-logo {
    width: 120px; height: 120px;
    object-fit: contain;
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(139,0,0,0.18);
}
.logo-fallback {
    display: none;
    width: 120px; height: 120px;
    position: relative;
    align-items: center;
    justify-content: center;
}
.logo-bubble {
    position: absolute;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}
.logo-bubble.b1 { width:64px;height:64px;background:radial-gradient(circle at 35% 35%,#ff9ab2,#e63946); top:8px;left:28px;animation-delay:0s; }
.logo-bubble.b2 { width:44px;height:44px;background:radial-gradient(circle at 35% 35%,#ffe082,#ff9800);top:52px;left:8px;animation-delay:.7s; }
.logo-bubble.b3 { width:36px;height:36px;background:radial-gradient(circle at 35% 35%,#a5d6a7,#43a047);top:60px;left:72px;animation-delay:1.3s; }

/* Title */
.game-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 8vw, 52px);
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
    letter-spacing: -1px;
}
.game-tagline {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
}

/* Pre-stats */
.stats-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    width: 100%;
}
.stat-box {
    flex: 1;
    max-width: 160px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--accent); }

/* How to play */
.how-to {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    width: 100%;
    text-align: left;
    box-shadow: var(--shadow);
}
.how-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 14px;
}
.how-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.how-list li {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.how-icon { font-size: 18px; flex-shrink: 0; width: 26px; text-align: center; }

/* =============================================
GAME SCREEN
============================================= */
#game-screen {
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

/* HUD */
.hud {
    height: var(--hud-h);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    gap: 10px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}
.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 120px;
}
.hud-right { justify-content: flex-end; }
.hud-center { flex: 1; display: flex; justify-content: center; }
.hud-block { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hud-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); }
.hud-val { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--accent); line-height: 1; }

/* COMBO */
.combo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.combo-x { font-family: var(--font-display); font-size: 13px; font-weight: 800; color: var(--text-muted); margin-right: 1px; }
#combo-display {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    transition: transform .12s var(--trans), color .2s;
}
#combo-display.bump { animation: comboBump .2s var(--trans); }
.combo-bar-track {
    width: 80px; height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.combo-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-bright), var(--accent));
    border-radius: 4px;
    width: 0%;
    transition: width .15s linear;
}

/* PAUSE BUTTON */
.btn-icon {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    width: 38px; height: 38px;
    font-size: 17px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--accent-lite); border-color: var(--accent); }

/* SLOW-MO BAR */
.slowmo-bar-wrap {
    position: absolute;
    top: calc(var(--hud-h) + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.slowmo-bar-wrap.active { opacity: 1; }
.slowmo-label { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #1565c0; text-transform: uppercase; }
.slowmo-track {
    width: 120px; height: 5px;
    background: #bbdefb;
    border-radius: 4px;
    overflow: hidden;
}
.slowmo-bar {
    height: 100%;
    background: linear-gradient(90deg, #42a5f5, #1565c0);
    border-radius: 4px;
    width: 100%;
    transition: width .1s linear;
}

/* ARENA */
.arena {
    flex: 1;
    position: relative;
    overflow: hidden;
    user-select: none;
}

/* =============================================
BUBBLES
============================================= */
.bubble {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    animation: bubbleIn .25s var(--trans) forwards;
    will-change: transform, opacity;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.bubble::before {
    content: '';
    position: absolute;
    width: 30%; height: 20%;
    top: 16%; left: 20%;
    background: rgba(255,255,255,0.55);
    border-radius: 50%;
    transform: rotate(-30deg);
    pointer-events: none;
}
.bubble::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(0,0,0,0.09) 100%);
    pointer-events: none;
}

/* Shrink countdown ring */
.bubble-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.5);
    animation: none;
}
.bubble-ring.ticking {
    animation: ringCountdown linear forwards;
}

.bubble-pts {
    font-family: var(--font-display);
    font-weight: 800;
    color: rgba(255,255,255,0.92);
    font-size: 13px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
    position: relative;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

/* Bubble color variants */
.bubble.c-red    { background: radial-gradient(circle at 38% 35%, #ff8a9a, #e63946 60%); box-shadow: 0 6px 22px rgba(230,57,70,.35); }
.bubble.c-orange { background: radial-gradient(circle at 38% 35%, #ffcc80, #ff7043 60%); box-shadow: 0 6px 22px rgba(255,112,67,.35); }
.bubble.c-yellow { background: radial-gradient(circle at 38% 35%, #fff59d, #fdd835 60%); box-shadow: 0 6px 22px rgba(253,216,53,.35); }
.bubble.c-green  { background: radial-gradient(circle at 38% 35%, #a5d6a7, #43a047 60%); box-shadow: 0 6px 22px rgba(67,160,71,.35); }
.bubble.c-teal   { background: radial-gradient(circle at 38% 35%, #80deea, #00897b 60%); box-shadow: 0 6px 22px rgba(0,137,123,.35); }
.bubble.c-blue   { background: radial-gradient(circle at 38% 35%, #90caf9, #1565c0 60%); box-shadow: 0 6px 22px rgba(21,101,192,.35); }
.bubble.c-purple { background: radial-gradient(circle at 38% 35%, #ce93d8, #7b1fa2 60%); box-shadow: 0 6px 22px rgba(123,31,162,.35); }
.bubble.c-pink   { background: radial-gradient(circle at 38% 35%, #f48fb1, #c2185b 60%); box-shadow: 0 6px 22px rgba(194,24,91,.35); }

/* BONUS bubbles */
.bubble.bonus-gold {
    background: radial-gradient(circle at 38% 35%, #fff9c4, #f9a825 60%);
    box-shadow: 0 0 22px 6px rgba(249,168,37,.55), 0 6px 22px rgba(249,168,37,.4);
    border: 2.5px solid rgba(255,255,255,0.7);
    animation: bubbleIn .25s var(--trans) forwards, goldenPulse 1s ease-in-out infinite .25s;
}
.bubble.bonus-slow {
    background: radial-gradient(circle at 38% 35%, #b3e5fc, #0288d1 60%);
    box-shadow: 0 0 20px 6px rgba(2,136,209,.45), 0 6px 22px rgba(2,136,209,.35);
    border: 2.5px solid rgba(255,255,255,0.7);
    animation: bubbleIn .25s var(--trans) forwards, slowPulse 1.2s ease-in-out infinite .25s;
}

/* Bubble shrink = countdown */
@keyframes bubbleCountdown {
    0%   { transform: scale(1); opacity: 1; }
    80%  { transform: scale(0.35); opacity: 0.7; }
    100% { transform: scale(0); opacity: 0; }
}
.bubble.counting {
    animation: bubbleIn .25s var(--trans) forwards;
}
.bubble.shrinking {
    animation: bubbleCountdown linear forwards !important;
    pointer-events: auto;
}
.bubble.missed {
    animation: bubbleMiss .28s ease-out forwards !important;
    pointer-events: none;
}
.bubble.popped {
    animation: bubblePop .22s ease-out forwards !important;
    pointer-events: none;
}

/* =============================================
PARTICLES
============================================= */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFly var(--dur, .7s) ease-out forwards;
    will-change: transform, opacity;
}

/* =============================================
FLOATING SCORE
============================================= */
.float-score {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 900;
    pointer-events: none;
    animation: floatUp .9s ease-out forwards;
    z-index: 50;
    white-space: nowrap;
}

/* =============================================
OVERLAYS
============================================= */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,15,40,0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    animation: fadeIn .2s ease;
}
.overlay.hidden { display: none; }
.overlay-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
}
.overlay-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
}

/* =============================================
GAME OVER SCREEN
============================================= */
#gameover-screen {
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}
.gameover-inner {
    max-width: 540px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}
.gameover-header { text-align: center; }
.gameover-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 9vw, 56px);
    font-weight: 900;
    color: var(--accent);
    line-height: 1.05;
}
.gameover-sub {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    margin-top: 6px;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}
.result-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow);
    transition: transform .2s;
}
.result-card:hover { transform: translateY(-2px); }
.result-card.accent { border-color: var(--accent); background: var(--accent-lite); }
.result-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); }
.result-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--accent); }
.new-best-badge {
    background: linear-gradient(135deg, #f9a825, #ff6f00);
    color: #fff;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    padding: 10px 26px;
    border-radius: 40px;
    box-shadow: 0 4px 18px rgba(249,168,37,.45);
    animation: badgePop .4s var(--trans);
    letter-spacing: .5px;
}
.new-best-badge.hidden { display: none; }
.gameover-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

/* =============================================
BUTTONS
============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 14px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    cursor: pointer;
    padding: 14px 36px;
    position: relative;
    overflow: hidden;
    transition: transform .15s var(--trans), box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn:active { transform: scale(.96); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 24px rgba(139,0,0,.30);
}
.btn-primary:hover {
    background: var(--accent-bright);
    box-shadow: 0 8px 28px rgba(139,0,0,.40);
    transform: translateY(-2px);
}
.btn-secondary {
    background: var(--surface);
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-lite); transform: translateY(-2px); }
.btn-shine {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    animation: btnShine 2.8s ease-in-out infinite;
}

/* =============================================
SHAKE ANIMATION (on miss)
============================================= */
.arena.shake { animation: arenaShake .3s ease-out; }

/* =============================================
SCREEN FLASH (on level up)
============================================= */
.arena.levelup-flash { animation: levelFlash .4s ease-out; }

/* =============================================
KEYFRAMES
============================================= */
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@keyframes bubbleIn {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes bubblePop {
    0%   { transform: scale(1); opacity: 1; }
    40%  { transform: scale(1.35); opacity: 0.9; }
    100% { transform: scale(0); opacity: 0; }
}
@keyframes bubbleMiss {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(0.6) rotate(12deg); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}
@keyframes ringCountdown {
    from { border-color: rgba(255,255,255,0.7); transform: scale(1); }
    to   { border-color: rgba(255,60,60,0.8);  transform: scale(0.4); }
}
@keyframes particleFly {
    0%   { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
@keyframes floatUp {
    0%   { transform: translate(-50%, 0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -60px) scale(1.2); opacity: 0; }
}
@keyframes comboBump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}
@keyframes arenaShake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-7px); }
    40%      { transform: translateX(7px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}
@keyframes levelFlash {
    0%,100% { background: var(--bg); }
    30%     { background: rgba(139,0,0,0.07); }
}
@keyframes goldenPulse {
    0%,100% { box-shadow: 0 0 18px 4px rgba(249,168,37,.5); }
    50%     { box-shadow: 0 0 32px 10px rgba(249,168,37,.8); }
}
@keyframes slowPulse {
    0%,100% { box-shadow: 0 0 18px 4px rgba(2,136,209,.4); }
    50%     { box-shadow: 0 0 30px 10px rgba(2,136,209,.7); }
}
@keyframes btnShine {
    0%,80%,100% { transform: translateX(-100%) rotate(30deg); }
    65%         { transform: translateX(100%) rotate(30deg); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes badgePop {
    0%   { transform: scale(0.6); opacity: 0; }
    70%  { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}

/* =============================================
DIFFICULTY SELECTOR
============================================= */
.difficulty-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.difficulty-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.difficulty-cards {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}
.diff-card {
    flex: 1;
    max-width: 160px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 16px 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: transform .18s var(--trans), border-color .18s, box-shadow .18s, background .18s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.diff-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.diff-card:active { transform: scale(.97); }
.diff-icon  { font-size: 22px; line-height: 1; }
.diff-name  { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--text); }
.diff-desc  { font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center; line-height: 1.5; }
.diff-badge {
    position: absolute;
    top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff;
    font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px;
    padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.diff-dots { display: flex; gap: 4px; margin-top: 4px; }
.diff-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background .2s; }

/* Easy */
.diff-easy:hover,
.diff-easy.active-diff { border-color: #43a047; background: #f1f8f1; box-shadow: 0 6px 22px rgba(67,160,71,.18); }
.diff-easy.active-diff .diff-name { color: #2e7d32; }
.diff-easy .diff-dots span:nth-child(1) { background: #43a047; }
.diff-easy.active-diff .diff-dots span  { background: #43a047; }

/* Medium */
.diff-medium:hover,
.diff-medium.active-diff { border-color: #f9a825; background: #fffdf0; box-shadow: 0 6px 22px rgba(249,168,37,.20); }
.diff-medium.active-diff .diff-name { color: #e65100; }
.diff-medium .diff-dots span:nth-child(1),
.diff-medium .diff-dots span:nth-child(2) { background: #f9a825; }
.diff-medium.active-diff .diff-dots span { background: #f9a825; }

/* Hard */
.diff-hard:hover,
.diff-hard.active-diff { border-color: var(--accent); background: var(--accent-lite); box-shadow: 0 6px 22px rgba(139,0,0,.18); }
.diff-hard.active-diff .diff-name { color: var(--accent); }
.diff-hard .diff-dots span,
.diff-hard.active-diff .diff-dots span { background: var(--accent); }

.diff-card.active-diff { transform: translateY(-3px); }

/* HUD difficulty badge */
.hud-diff-badge {
    font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px;
    padding: 3px 8px; border-radius: 20px; border: 1.5px solid currentColor; line-height: 1.4;
}
.hud-diff-badge.diff-easy   { color: #2e7d32; border-color: #43a047; background: #f1f8f1; }
.hud-diff-badge.diff-medium { color: #e65100; border-color: #f9a825; background: #fffdf0; }
.hud-diff-badge.diff-hard   { color: var(--accent); border-color: var(--accent); background: var(--accent-lite); }

/* Change mode button */
.btn-mode {
    background: #f5f5f5; color: var(--text); border: 2px solid var(--border);
    font-family: var(--font-display); font-weight: 800; font-size: 15px;
    padding: 14px 22px; border-radius: 14px; cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-mode:hover { background: var(--bg2); border-color: var(--text-muted); transform: translateY(-2px); }
.btn-mode:active { transform: scale(.96); }

/* =============================================
SITE FOOTER
============================================= */
.site-footer {
    background: rgba(255,255,255,0.8);
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
}
.footer-inner { max-width: 960px; margin: 0 auto; }
.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}
.footer-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.footer-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.footer-link:hover { text-decoration: underline; }

/* =============================================
RESPONSIVE
============================================= */
@media (max-width: 600px) {
    .hud { padding: 0 12px; gap: 6px; }
    .hud-val { font-size: 20px; }
    #combo-display { font-size: 28px; }
    .combo-bar-track { width: 60px; }
    .results-grid { grid-template-columns: repeat(2, 1fr); }
    .gameover-actions { flex-direction: column; }
    .btn { width: 100%; }
    .how-to { padding: 16px 18px; }
    .overlay-card { padding: 28px 22px; min-width: 200px; }
}
@media (max-width: 380px) {
    .hud-left, .hud-right { min-width: 80px; }
    .hud-block:first-child { display: none; }
}

/* =============================================
ACCESSIBILITY
============================================= */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
