/* DinTon.live — Mobile-first Telegram Mini App */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
    width: 100%; height: 100%; overflow: hidden;
    background: linear-gradient(180deg, #0a1428 0%, #1a2540 50%, #0a1428 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none; -webkit-user-select: none;
    touch-action: manipulation;
}
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input { font-family: inherit; outline: none; }

/* ============ HUD ============ */
/* --tg-top-offset is set dynamically by main.js (safe-area + Telegram controls bar).
   FAILSAFE: pure-CSS fallback below — works even if JS hasn't run yet or fails.
   Uses iOS env(safe-area-inset-top) PLUS a 60px buffer for Telegram's ✕/⌄/⋯ row.
   Once JS runs, this gets overridden with a precise per-platform value. */
:root {
    /* CSS pre-paint default: use env() so iOS notch is respected even before JS sets the var.
       JS overrides this with a precise per-platform value (compact: ~8px, fullscreen: 110px). */
    --tg-top-offset: calc(env(safe-area-inset-top, 0px) + 8px);
}
/* Mobile fullscreen heuristic via CSS: if env(safe-area-inset-top) reports a non-zero notch,
   we're likely in fullscreen mode, so push the HUD below Telegram's ✕/⌄/⋯ row. */
@supports (top: env(safe-area-inset-top)) {
    @media (pointer: coarse) and (max-width: 900px) {
        :root { --tg-top-offset: max(calc(env(safe-area-inset-top, 0px) + 50px), 8px); }
    }
}
/* HUD wrapper: full-width, centered, no background — only the inner pill is visible. */
#hud {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: calc(var(--tg-top-offset) + 10px) 12px 6px;
    background: transparent;
    pointer-events: none;
}
/* HUD ascuns pe alte ecrane (Invite, Upgrade, Withdraw, Leaderboard, Game) —
   apare DOAR pe meniul principal, ca sa nu acopere butoanele Back si continutul. */
#hud.hud-hidden {
    display: none !important;
}
/* The "island" — ONE single rounded pill containing all 4 stats with thin separators.
   Centered horizontally → never overlaps Telegram's corner buttons on any device.
   Sits BELOW Telegram's ✕/⌄/⋯ row via --tg-top-offset, so it can use almost full width. */
.hud-bar {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    /* Smart width: mobile uses (viewport - 24px gutter), but capped at 560px on tablet/desktop
       so the island stays compact and professional on any screen size. */
    max-width: min(calc(100vw - 24px), 560px);
    box-sizing: border-box;
    border-radius: 999px;
    /* Fully opaque dark background — no content bleeds through, no character confusion. */
    background: #0a1530;
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(124, 192, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 8px 28px rgba(0,0,0,0.70),
        0 1px 0 rgba(0,0,0,0.40);
    pointer-events: auto;
    transition: opacity 0.4s ease;
}
#hud.hud-loading .hud-bar { opacity: 0.55; }

.hud-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
    white-space: nowrap;
    color: #eaf2ff;
}
.hud-stat .hud-icon { font-size: 12px; line-height: 1; }
.hud-stat .hud-dim  { opacity: 0.55; font-weight: 600; }
/* Clickable HUD pills — vizual feedback (cursor + hover + active) */
.hud-clickable {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
    position: relative;
}
.hud-clickable:hover {
    background: rgba(124,192,255,0.12);
    box-shadow: 0 0 0 1px rgba(124,192,255,0.25) inset;
}
.hud-clickable:active {
    transform: scale(0.94);
    background: rgba(124,192,255,0.20);
}
.hud-clickable:focus-visible {
    outline: 2px solid #7cc0ff;
    outline-offset: 1px;
}
/* Pe touch devices, hover-ul nu trebuie sa ramana "lipit" dupa tap */
@media (hover: none) {
    .hud-clickable:hover { background: transparent; box-shadow: none; }
}
.hud-unit {
    opacity: 0.6;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.5px;
    margin-left: 2px;
}
.hud-coin {
    width: 13px !important; height: 13px !important;
    flex-shrink: 0;
    animation: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* Per-stat tints */
.hud-hearts { color: #ffd0d8; }
.hud-ton    { color: #b9dcff; }
.hud-ton .hud-coin { filter: drop-shadow(0 0 4px rgba(0,152,234,0.55)); }
.hud-dinton { color: #ffe585; }
.hud-dinton .hud-coin { filter: drop-shadow(0 0 4px rgba(255,180,0,0.55)); }

/* Tier text inside the island uses tier-color classes set by JS (tier-free/bronze/silver/gold/diamond) */
.hud-tier {
    color: #d8d8d8; font-weight: 800; letter-spacing: 0.6px; font-size: 10px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(255,255,255,0.08);
}
.hud-tier.tier-free { background: rgba(255,255,255,0.08); color: #d8d8d8; }

/* Thin vertical separators between stats */
.hud-sep {
    width: 1px;
    height: 14px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18) 25%, rgba(255,255,255,0.18) 75%, transparent);
    flex-shrink: 0;
}

/* Narrow phones: shrink padding/font, hide currency labels to keep it compact */
@media (max-width: 400px) {
    .hud-bar { gap: 7px; padding: 6px 11px; }
    .hud-stat { font-size: 11px; gap: 3px; }
    .hud-coin { width: 12px !important; height: 12px !important; }
    .hud-tier { font-size: 9px; letter-spacing: 0.5px; }
    .hud-sep { height: 12px; }
    .hud-unit { display: none; } /* hide TON/DINTON labels — icons are enough */
}
@media (max-width: 340px) {
    .hud-bar { gap: 5px; padding: 5px 9px; }
    .hud-stat { font-size: 10px; }
}

/* SMALL PHONES (iPhone SE, iPhone 8, Android small): HUD mai sus + spatiu redus
   ca toate butoanele meniului sa fie accesibile fara/cu putin scroll. */
@media (max-width: 480px) {
    /* HUD mai aproape de marginea superioara - reducem buffer-ul */
    #hud { padding: calc(var(--tg-top-offset) + 2px) 10px 4px; }
}
@media (max-width: 380px) {
    #hud { padding: calc(var(--tg-top-offset) + 0px) 8px 3px; }
}
/* Ecrane SCURTE (iPhone SE landscape, dispozitive cu viewport <=700px) */
@media (max-height: 700px) {
    #hud { padding-top: calc(var(--tg-top-offset) + 2px); padding-bottom: 4px; }
}

/* Tablet & desktop (>=560px): more spacious, slightly bigger typography, full labels. */
@media (min-width: 560px) {
    #hud { padding-top: calc(var(--tg-top-offset) + 14px); padding-bottom: 8px; }
    .hud-bar {
        gap: 12px;
        padding: 9px 18px;
        border-radius: 999px;
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.12),
            0 12px 32px rgba(0,0,0,0.55),
            0 1px 0 rgba(0,0,0,0.40);
    }
    .hud-stat { font-size: 13px; gap: 5px; letter-spacing: 0.3px; }
    .hud-coin { width: 15px !important; height: 15px !important; }
    .hud-tier { font-size: 11px; letter-spacing: 1.2px; }
    .hud-unit { font-size: 11px; letter-spacing: 0.8px; }
    .hud-sep { height: 16px; }
}

/* Wide desktop (>=900px): even airier feel, but cap kicks in so it stays centered & compact. */
@media (min-width: 900px) {
    .hud-bar { gap: 14px; padding: 10px 20px; }
    .hud-stat { font-size: 14px; }
    .hud-coin { width: 16px !important; height: 16px !important; }
    .hud-tier { font-size: 12px; }
    .hud-sep { height: 18px; }
}

/* ============================================================
   HUD AS CARD — cand sta in interiorul #menuScreen (intre logo si butoane)
   ─────────────────────────────────────────────────────────────
   Pe meniu, HUD-ul nu mai e o "insula" fixed top, ci un CARD profesional
   intre logo si butoanele Play/Invite/Upgrade/etc. ID-urile interne raman
   aceleasi -> JS (updateHUD) scrie direct fara modificari.
   Pe alte ecrane (game, withdraw, etc.), #menuScreen e display:none deci
   card-ul dispare automat fara reguli speciale.
   ============================================================ */
/* ============================================================
   MENU HUD — design "Premium Single-Line Pillbox" (auto-scale)
   - Card pillbox UNIC cu 4 stat-uri pe acelasi rand, separatori subtili
   - clamp() pentru font/padding/icon → scaleaza fluid 320px → desktop
   - NICIODATA wrap, NICIODATA suprapuneri (single line GARANTAT)
   - Color tint subtil per stat (rosu/albastru/auriu) doar pe text
   ============================================================ */
#menuScreen #hud {
    position: static;
    padding: 0 12px;                 /* respiratie laterala, evita lipirea de marginile ecranului */
    width: 100%;
    max-width: 400px;                /* default mobile */
    margin: 0 auto 14px;             /* centrat orizontal */
    z-index: auto;
    pointer-events: auto;
    display: block;
    box-sizing: border-box;
}
/* Adaptiv pe latime: pe ecrane mai mari, HUD-ul devine mai aerisit */
@media (min-width: 480px) { #menuScreen #hud { max-width: 460px; } }
@media (min-width: 640px) { #menuScreen #hud { max-width: 520px; } }
@media (min-width: 900px) { #menuScreen #hud { max-width: 580px; } }
body[data-landscape] #menuScreen #hud         { max-width: 520px; }
body[data-device-class="tablet"] #menuScreen #hud  { max-width: 540px; }
body[data-device-class="desktop"] #menuScreen #hud { max-width: 580px; }
body[data-foldable] #menuScreen #hud           { max-width: 440px; }

#menuScreen #hud .hud-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-around;            /* spatiu egal in jur de elemente */
    width: 100%;
    box-sizing: border-box;
    gap: 6px;
    padding: 11px 14px;
    border-radius: 20px;
    background:
        linear-gradient(160deg, rgba(28, 50, 88, 0.82), rgba(8, 16, 36, 0.94));
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(124, 192, 255, 0.26);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(0,0,0,0.25),
        0 12px 32px rgba(0, 8, 24, 0.55),
        0 2px 6px rgba(0, 0, 0, 0.30);
    position: relative;
    overflow: hidden;
}
/* Glass top sheen — touch premium */
#menuScreen #hud .hud-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}
#menuScreen #hud .hud-bar > * { position: relative; z-index: 1; }

/* Separatori verticali subtili intre stat-uri */
#menuScreen #hud .hud-sep {
    display: block !important;
    width: 1px;
    height: 18px;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.18) 30%, rgba(255,255,255,0.18) 70%, transparent 100%);
    flex-shrink: 0;
    border: none;
    margin: 0;
}

/* Stat-urile — text + icon, fara chip dominant */
#menuScreen #hud .hud-stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
    flex: 0 1 auto;
    min-width: 0;                              /* permite shrink in flex */
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    white-space: nowrap;
    overflow: hidden;                          /* defensive: trunchiere in loc de overflow */
    text-overflow: ellipsis;
    gap: 4px;
    transition: transform 0.12s ease;
}
#menuScreen #hud .hud-stat.hud-clickable {
    margin: 0;
    padding: 3px 6px;
    border-radius: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
}
#menuScreen #hud .hud-stat.hud-clickable:hover {
    background: rgba(124,192,255,0.12);
    box-shadow: inset 0 0 0 1px rgba(124,192,255,0.22);
}
#menuScreen #hud .hud-stat.hud-clickable:active { transform: scale(0.94); }

/* Iconite + unit + tier — dimensiuni fixe per breakpoint.
   flex-shrink: 0 — iconitele NU se comprima niciodata (anti-clipping pe ecrane inguste). */
#menuScreen #hud .hud-coin     { width: 14px !important; height: 14px !important; flex-shrink: 0; }
#menuScreen #hud .hud-icon-svg { width: 14px; height: 14px; flex-shrink: 0; }
#menuScreen #hud .hud-unit {
    font-size: 9.5px;
    opacity: 0.55;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-left: 3px;
    flex-shrink: 0;                            /* nu lasa "TON"/"DINTON" sa se taie */
}
#menuScreen #hud .hud-tier {
    font-size: 10.5px;
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    font-weight: 800;
}

/* Tinta de culoare per stat (doar pe text) */
#menuScreen #hud .hud-hearts { color: #ffd0d8; }
#menuScreen #hud .hud-ton    { color: #b9dcff; }
#menuScreen #hud .hud-dinton { color: #ffe585; }

/* ─── Adaptari pe lățime (font + padding + gap discrete, nu clamp) ─── */
/* Ecrane medii (≥420px): font putin mai mare */
@media (min-width: 420px) {
    #menuScreen #hud .hud-bar { gap: 8px; padding: 12px 16px; }
    #menuScreen #hud .hud-stat { font-size: 12.5px; gap: 5px; }
    #menuScreen #hud .hud-coin { width: 15px !important; height: 15px !important; }
    #menuScreen #hud .hud-icon-svg { width: 15px; height: 15px; }
    #menuScreen #hud .hud-tier { font-size: 11.5px; padding: 3px 10px; }
    #menuScreen #hud .hud-unit { font-size: 10px; }
    #menuScreen #hud .hud-sep { height: 20px; }
}
/* Tablete / landscape (≥640px): aspect aerisit */
@media (min-width: 640px) {
    #menuScreen #hud .hud-bar { gap: 12px; padding: 14px 22px; border-radius: 22px; }
    #menuScreen #hud .hud-stat { font-size: 13.5px; gap: 6px; }
    #menuScreen #hud .hud-coin { width: 16px !important; height: 16px !important; }
    #menuScreen #hud .hud-icon-svg { width: 16px; height: 16px; }
    #menuScreen #hud .hud-tier { font-size: 12px; padding: 3px 11px; }
    #menuScreen #hud .hud-unit { font-size: 11px; }
    #menuScreen #hud .hud-sep { height: 22px; }
}

/* NOTA: NU atingem .logo-hero margin-bottom (-56/-46/-36/-26/-16 per breakpoint).
   Sunt necesare pentru a compensa spatiul transparent din PNG-ul logo-ului si trag
   HUD-card-ul sus sub dinozaur (lipit vizual). Logo-ul ramane unde era; gap-ul dispare. */

/* Phone safety net: pe TOATE ecranele de telefon (≤480px) ascundem unitatea
   "TON"/"DINTON" — iconitele (TON logo + D coin) sunt clare si neambigue.
   Acopera: iPhone SE 375, iPhone 14/15 390, Pro Max 430, Samsung 360-412,
   Galaxy Fold 280-344. Pe tablete (≥481px) label-urile reapar pentru lizibilitate. */
@media (max-width: 480px) {
    #menuScreen #hud .hud-unit { display: none; }
}
body[data-device-class="ultra-narrow"] #menuScreen #hud .hud-unit { display: none; }

/* SVG coin icons (TON + DINTON) */
.coin-svg, .coin-svg-sm {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
    animation: coin-pulse 3s ease-in-out infinite;
}
.coin-svg-sm { margin-right: 3px; }

/* Inline SVG icons replacing emoji */
.btn-svg, .hud-icon-svg, .inline-svg, .title-svg, .tier-medal-svg, .balance-svg {
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    flex-shrink: 0;
}
.btn .btn-svg { margin-right: 8px; }
.btn-icon .btn-svg { margin: 0; }
.hud-icon-svg { color: #ff4d6d; margin-right: 4px; filter: drop-shadow(0 1px 2px rgba(255,77,109,0.5)); }
h2 .title-svg { margin-right: 8px; color: #ffd700; vertical-align: -3px; filter: drop-shadow(0 1px 3px rgba(255,215,0,0.4)); }
/* .tier-card h3 — eliminat: noua structura foloseste .tier-mult-badge in loc de <h3> cu medalie */
.tier-medal-svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }

@keyframes coin-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 1px 3px rgba(124,192,255,0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 1px 6px rgba(124,192,255,0.7)); }
}

.tier-free { background: rgba(120,120,120,0.4); }
.tier-bronze { background: linear-gradient(135deg, #cd7f32, #8b4513); }
.tier-silver { background: linear-gradient(135deg, #c0c0c0, #808080); color: #000; }
.tier-gold { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; }
.tier-diamond { background: linear-gradient(135deg, #b9f2ff, #7cc0ff); color: #0a1428; }

/* ============ SCREENS — GLOBAL BACKGROUND ============ */
body {
    background-image: url('assets/dinton-bg.png?v=2026051804');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #0a1428; /* fallback */
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(10,20,40,0.55) 0%,
        rgba(10,20,40,0.65) 50%,
        rgba(10,20,40,0.85) 100%);
    pointer-events: none;
    z-index: 0;
}
.screen, .toast { z-index: 1; }
.overlay { z-index: 60; } /* > HUD (50), sub toast (100) — modal apare deasupra HUD */
/* HUD must stay above any screen content (menu logo, buttons) — that's why it sits at z-index: 50.
   Without this, the giant DinTon title can render on top of the HUD pill and mash characters. */
#hud { z-index: 50; }

.screen {
    /* FIX SCROLL CRITICAL: folosim --app-height (setat din JS via tg.viewportHeight)
       ca height EXACT al mini-app-ului. Pe Telegram modal, viewport-ul nu e 100vh ci
       o portiune din ecran. Fara asta, butoanele de jos depasesc zona vizibila si
       overflow:auto nu le poate aduce in scroll. */
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    height: 100vh;                          /* fallback legacy */
    height: 100dvh;                         /* dynamic viewport (browsere moderne) */
    height: var(--app-height, 100dvh);      /* override JS: exact viewport Telegram */
    /* CRITIC: padding-top trebuie sa fie SUFICIENT cat sa NU se acopere h2 de Telegram chrome.
       Pe ecrane modale (non-menu), HUD-ul e ascuns deci nu mai trebuie buffer pentru el,
       DAR titlul "Upgrade Your Tier"/etc. trebuie sa stea sub chrome (X-Inchide ~50-70px).
       Folosim max() ca sa garantam minim 70px pe orice device, chiar daca --tg-top-offset
       e 0/8/12 (Telegram vechi sau compact). */
    padding: max(calc(var(--tg-top-offset) + 60px), 76px) 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
    display: none; flex-direction: column; align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: transparent;
}
/* SMALL PHONES: reducem buffer-ul lateral + mentinem minimul vertical pentru titlu safe. */
@media (max-width: 480px) {
    .screen {
        padding: max(calc(var(--tg-top-offset) + 50px), 70px) 14px calc(env(safe-area-inset-bottom, 0px) + 16px);
    }
}
@media (max-width: 380px) {
    .screen {
        padding: max(calc(var(--tg-top-offset) + 44px), 64px) 10px calc(env(safe-area-inset-bottom, 0px) + 12px);
    }
}
/* Ecrane scurte (iPhone SE portrait <=700px height) — minimizeaza buffer-ul vertical */
@media (max-height: 700px) {
    .screen {
        padding-top: max(calc(var(--tg-top-offset) + 44px), 64px);
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    }
}
.screen.active { display: flex; }

/* ============ MENU ============ */

/* MENU SCREEN — logo + butoane peste backgroundul global.
   NU mai suprascriem padding-top aici — folosim valoarea din .screen care e calculata
   corect cu --tg-top-offset (HUD offset + breathing gap). Suprascrierea de 80px aici era
   un bug vechi care ignora HUD-ul si lipea logo-ul de top. */
.menu-bg-overlay { display: none; } /* nu mai e necesar — bg e global pe body */

/* MENU: padding MIC sus, padding lateral 0 (logo edge-to-edge).
   Scroll-ul se face DOAR pe .screen parinte — fara overflow duplicat aici.
   margin-top: auto SCOS — cauza spatiu mare sus cand continutul incape in ecran. */
#menuScreen.menu-with-bg {
    padding-top: calc(var(--tg-top-offset) + 12px);
    padding-left: 0;
    padding-right: 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
    justify-content: flex-start;
    gap: 0;
}
#menuScreen.menu-with-bg .logo-hero {
    flex: 0 0 auto;
    min-height: 0;
}
#menuScreen.menu-with-bg .menu-buttons {
    flex-shrink: 0;
    padding: 0 20px;
}
@media (max-width: 640px) {
    #menuScreen.menu-with-bg { padding-top: calc(var(--tg-top-offset) + 8px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
    #menuScreen.menu-with-bg .menu-buttons { padding: 0 14px; }
}
@media (max-height: 600px) {
    #menuScreen.menu-with-bg { padding-top: calc(var(--tg-top-offset) + 4px); }
}

/* Logo fallback (only if image fails to load) */
.logo { text-align: center; margin: 32px 0 40px; }
.logo-dino { font-size: 96px; filter: drop-shadow(0 0 30px rgba(124, 192, 255, 0.6)); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.logo h1 {
    font-size: 48px; font-weight: 900; letter-spacing: 2px;
    background: linear-gradient(135deg, #7cc0ff, #b9f2ff, #fff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(124, 192, 255, 0.4);
    margin: 8px 0;
}
.tagline { font-size: 14px; opacity: 0.7; letter-spacing: 3px; text-transform: uppercase; }

/* ============ HERO LOGO IMAGE (replaces text logo) ============
   PROPORTIONAL — logo centrat pe mijlocul ecranului, dimensiune echilibrata
   ca toate butoanele sa fie vizibile, fara scroll. */
.logo-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    /* margin-bottom NEGATIV mai mare → logo se lipeste de butonul PLAY (transparenta jos a imaginii). */
    margin: 0 auto -70px;
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
}
.logo-hero .logo-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    /* Mai mare: pana la 800px / 72vh, dar protejat sa nu astupe butoanele */
    max-height: clamp(420px, 70vh, 800px);
    object-fit: contain;
    filter: drop-shadow(0 20px 54px rgba(0, 152, 234, 0.65))
            drop-shadow(0 10px 26px rgba(0, 0, 0, 0.75));
    animation: float 4s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    display: block;
    margin: 0 auto;
}
/* Telefoane mari */
@media (max-width: 640px) {
    .logo-hero { margin: 0 auto -56px; padding: 0; }
    .logo-hero .logo-img { max-width: 100%; max-height: clamp(360px, 62vh, 680px); }
}
/* Telefoane medii */
@media (max-width: 480px) {
    .logo-hero { margin: 0 auto -46px; padding: 0; }
    .logo-hero .logo-img { max-width: 100%; max-height: clamp(320px, 58vh, 580px); }
}
/* Telefoane mici (iPhone SE) */
@media (max-width: 380px) {
    .logo-hero { margin: 0 auto -36px; padding: 0; }
    .logo-hero .logo-img { max-width: 100%; max-height: clamp(280px, 52vh, 480px); }
}
/* Landscape mobil */
@media (max-height: 600px) {
    .logo-hero { margin: 0 auto -26px; }
    .logo-hero .logo-img { max-height: clamp(200px, 46vh, 340px); }
}
@media (max-height: 480px) {
    .logo-hero { margin: 0 auto -16px; }
    .logo-hero .logo-img { max-height: clamp(150px, 38vh, 240px); }
}
.menu-tier-badge {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(120,120,120,0.4);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.menu-tier-badge.tier-free { background: rgba(120,120,120,0.4); color: #fff; }

.menu-buttons { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }

/* ============ DINTON CUMULATIVE STATS CARD ============ */
.dinton-stats-card {
    width: 100%;
    max-width: 360px;
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(204,102,0,0.08));
    border: 1px solid rgba(255,215,0,0.35);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(255,149,0,0.18);
    backdrop-filter: blur(10px);
}
.dinton-stat-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}
.dinton-stat-row svg {
    filter: drop-shadow(0 2px 10px rgba(255,215,0,0.6));
    animation: dinton-pulse 2s ease-in-out infinite;
}
@keyframes dinton-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.dinton-stat-info { flex: 1; }
.dinton-stat-label {
    font-size: 11px;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffd28a;
}
.dinton-stat-value {
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff9500);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 2px;
    line-height: 1.1;
}
.dinton-stat-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.4), transparent);
    margin: 12px 0 10px;
}
.dinton-stats-mini {
    display: flex;
    justify-content: space-around;
    gap: 8px;
}
.dinton-stats-mini > div {
    text-align: center;
    flex: 1;
}
.dinton-stats-mini span {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #7cc0ff;
}
.dinton-stats-mini small {
    display: block;
    font-size: 9px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    color: #b9d4f0;
}

/* ============ BUTTONS ============ */
.btn {
    padding: 14px 24px; border-radius: 12px;
    font-size: 16px; font-weight: 600; color: #fff;
    transition: transform 0.1s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
    /* Safety net pentru limbi cu cuvinte lungi (DE/IT/FI/UZ/FR) — wrap pe cuvinte intregi */
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, #00a8ff, #7cc0ff);
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.4);
}
.btn-primary:hover { box-shadow: 0 4px 30px rgba(0, 168, 255, 0.6); }
.btn-secondary { background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); }
.btn-large { padding: 18px; font-size: 20px; }
.btn-icon { background: rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 8px; color: #fff; }

.back-btn {
    position: absolute; top: calc(var(--tg-top-offset) + 8px); left: 16px;
    background: rgba(255,255,255,0.1); padding: 8px 14px;
    border-radius: 999px; color: #fff; font-size: 14px;
}

/* ============ GAME SCREEN ============ */
#gameScreen { padding: 0; }
/* HUD HTML din timpul jocului — bara compacta sus, glassmorphism modern,
   responsive (font reduce pe ecrane mici fara overflow). */
#gameHud {
    position: fixed; top: var(--tg-top-offset); left: 0; right: 0; z-index: 5;
    display: flex; justify-content: space-around; align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(180deg, rgba(10,20,40,0.78), rgba(10,20,40,0.55));
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(124,192,255,0.18);
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
    font-size: 13px;
    line-height: 1.2;
}
.game-stat {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 0; flex: 1 1 0;
    font-size: 11px; letter-spacing: 0.4px; opacity: 0.85;
    text-transform: uppercase; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-stat b { color: #7cc0ff; font-size: 15px; font-weight: 800; letter-spacing: 0; text-transform: none; opacity: 1; }
.live-earn b { color: #b9f2ff; }
/* Ecrane medii (Android, iPhone obisnuit) */
@media (max-width: 420px) {
    #gameHud { padding: 7px 10px; gap: 6px; }
    .game-stat { font-size: 10px; letter-spacing: 0.3px; }
    .game-stat b { font-size: 14px; }
    .game-stat .coin-svg-sm { width: 12px !important; height: 12px !important; margin-right: 2px; }
}
/* Telefoane mici (iPhone SE, Galaxy Fold) */
@media (max-width: 360px) {
    #gameHud { padding: 6px 8px; gap: 4px; }
    .game-stat { font-size: 9px; letter-spacing: 0.2px; }
    .game-stat b { font-size: 13px; }
}
/* Ecrane scurte (landscape mobil) — reduce padding vertical */
@media (max-height: 600px) {
    #gameHud { padding-top: 5px; padding-bottom: 5px; }
}
#gameCanvas {
    position: fixed; inset: 0;
    width: 100% !important; height: 100% !important;
    background: linear-gradient(180deg, #0a1428 0%, #1e2f5a 60%, #2a4070 100%);
    touch-action: none;
}

/* ============ OVERLAYS ============ */
/* z-index 60 > HUD (50) ca sa nu apara HUD-ul peste modal cand se deschide din menuScreen.
   Sub toast (100) ca sa vada utilizatorul confirmari "+1 Heart" peste overlay. */
.overlay {
    position: fixed; inset: 0; z-index: 60;
    background-image: url('assets/dinton-bg.png?v=2026051804');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex; align-items: center; justify-content: center;
}
.overlay::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,20,40,0.6), rgba(10,20,40,0.85));
    backdrop-filter: blur(2px);
    z-index: 0;
}
.overlay.hidden { display: none; }
/* Internal modal toggles — `.hidden` clas global la copiii din .streak-card / .comeback-card.
   Fara aceasta regula, classList.toggle('hidden') NU ascunde nimic (bug subtil). */
.streak-card .hidden,
.comeback-card .hidden { display: none !important; }
.overlay-card {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(26,37,64,0.85), rgba(10,20,40,0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 192, 255, 0.4);
    border-radius: 20px; padding: 32px;
    max-width: 320px; width: 90%; text-align: center;
    box-shadow: 0 20px 60px rgba(0,152,234,0.4);
}
.overlay-card h2 { margin-bottom: 20px; font-size: 28px; }
.score-result { font-size: 18px; margin-bottom: 24px; line-height: 1.8; }
.score-result b { color: #7cc0ff; font-size: 24px; }
.overlay-card button { width: 100%; margin-top: 8px; }

/* ============ GAME OVER CARD — premium glassmorphism ============ */
.game-over-card {
    /* IMPORTANT: overflow VISIBLE → trofeul de aur (top: -28px) sta deasupra
       cardului ca un medal floating, NU este clipped.
       Scroll-ul vertical e gestionat de .overlay (parinte) — vezi mai jos.
       COMPACTARE 2026-05-20: padding redus pentru a incadra tot modalul fara scroll. */
    overflow: visible;
    padding: 20px 18px !important;
    padding-top: 44px !important;
    max-width: 360px;
    background:
        radial-gradient(ellipse at top, rgba(124,192,255,0.12), transparent 60%),
        linear-gradient(135deg, rgba(26,37,64,0.92), rgba(10,20,40,0.94));
    border: 1px solid rgba(124, 192, 255, 0.35);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 24px 70px rgba(0, 120, 220, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.5);
    animation: goCardIn 0.5s cubic-bezier(0.2, 1, 0.3, 1) both;
    /* margin auto + flex parent → card centrat cand are loc, scrollable cand
       nu (cu overflow-y: auto pe parinte). */
    margin: auto;
}
/* SCROLL FALLBACK: cand cardul depaseste viewport-ul (ecran mic), overlay-ul
   permite scroll → utilizatorul ajunge la butonul "Meniu" prin scroll vertical.
   Trofeul ramane vizibil deasupra cardului pentru ca .overlay scroll-eaza
   intreg modal-ul (card + trofeu), NU clipeaza individual cardul.
   :has() suportat in Chrome 105+, Safari 15.4+, Firefox 121+ — Telegram WebView
   foloseste Chromium/WebKit modern, deci coverage 99%+. */
.overlay:has(.game-over-card) {
    overflow-y: auto;
    overflow-x: hidden;
    /* safe center = centreaza cand incape, top-aligneaza cand depaseste
       (permite scroll-up sa vezi trofeul) — fallback gracios la `center` */
    align-items: safe center;
    padding: 20px 0;
    /* Scrollbar discret pentru overlay */
    scrollbar-width: thin;
    scrollbar-color: rgba(124,192,255,0.4) transparent;
}
.overlay:has(.game-over-card)::-webkit-scrollbar { width: 6px; }
.overlay:has(.game-over-card)::-webkit-scrollbar-track { background: transparent; }
.overlay:has(.game-over-card)::-webkit-scrollbar-thumb {
    background: rgba(124,192,255,0.35);
    border-radius: 3px;
}
@keyframes goCardIn {
    from { transform: translateY(24px) scale(0.92); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Trophy badge — golden, floating (compact) */
.go-trophy {
    position: absolute;
    top: -28px; left: 50%;
    transform: translateX(-50%);
    width: 56px; height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #fff6cf 0%, #ffd24a 35%, #f3a800 65%, #a36a00 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow:
        0 0 28px rgba(255, 184, 0, 0.65),
        0 8px 24px rgba(0, 0, 0, 0.45),
        inset 0 2px 4px rgba(255, 255, 255, 0.6),
        inset 0 -3px 6px rgba(120, 60, 0, 0.4);
    animation: goTrophyFloat 2.6s ease-in-out infinite;
    z-index: 2;
}
.go-trophy svg {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}
.go-trophy::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,210,80,0.35), transparent 70%);
    z-index: -1;
    animation: goTrophyPulse 2.6s ease-in-out infinite;
}
@keyframes goTrophyFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-5px); }
}
@keyframes goTrophyPulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 0.85; transform: scale(1.15); }
}

/* Title — gradient text (compact) */
.go-title {
    font-size: 18px !important;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin: 0 0 3px !important;
    background: linear-gradient(180deg, #ffffff 0%, #7cc0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.go-subtitle {
    font-size: 11px;
    letter-spacing: 0.4px;
    opacity: 0.6;
    margin: 0 0 10px;
}

/* Stat tiles (compact) */
.go-stats {
    display: flex; flex-direction: row;
    gap: 6px;
    margin-bottom: 8px;
}
.go-stat {
    flex: 1 1 0;
    background: linear-gradient(135deg, rgba(124,192,255,0.08), rgba(124,192,255,0.02));
    border: 1px solid rgba(124, 192, 255, 0.22);
    border-radius: 12px;
    padding: 7px 10px;
    /* Pattern modern de dashboard: label DEASUPRA, valoare DEDESUBT.
       Rezolva overflow pentru RU "ЗАРАБОТАНО" (10ch), IT "GUADAGNATO" (10ch),
       ES "PUNTUACIÓN" (10ch) + valori lungi 0.00000XXX TON pe toate ecranele. */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    min-width: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.go-stat:hover { transform: translateY(-1px); border-color: rgba(124,192,255,0.4); }
.go-stat-label {
    font-size: 9px;
    letter-spacing: 1.2px;
    opacity: 0.6;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.go-stat-value {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;       /* numere lungi tip 0.00000429 pot fi rupte la nevoie */
    line-height: 1.15;
}
.go-stat--ton .go-stat-value {
    /* Numar + TON pe acelasi rand cu wrap controlat */
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
    font-size: 14px;             /* TON value e mai lung (0.00000429) → font putin mai mic */
}
.go-stat--ton .go-stat-value b {
    color: #5ec3ff;
    text-shadow: 0 0 14px rgba(94,195,255,0.45);
    font-weight: 800;
    word-break: break-all;
    font-size: 14px;
}
.go-stat--ton .go-stat-value small {
    font-size: 8.5px;
    letter-spacing: 1px;
    opacity: 0.65;
    margin-left: 0;
    font-weight: 700;
}

/* ============ TIER SCREEN ============ */
.screen h2 {
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
    padding-top: 4px;
    line-height: 1.15;
    /* Pe Telegram VECHI, chrome-ul (X-Inchide) ocupa varful — adaugam buffer
       safety pe ecrane modale (Upgrade/Invite/Withdraw/Leaderboard) ca titlul
       sa NU se ascunda. Pe menuScreen nu se aplica (nu are h2 mare). */
    margin-top: max(0px, calc(8px - var(--tg-top-offset, 0px) + 8px));
}
/* Pe ecrane SCURTE titlul devine mai mic ca sa nu mananca content-ul */
@media (max-height: 700px) {
    .screen h2 { font-size: 22px; margin-bottom: 4px; }
}
@media (max-width: 360px) {
    .screen h2 { font-size: 22px; }
}
.screen-desc { opacity: 0.75; margin-bottom: 22px; text-align: center; font-size: 14px; line-height: 1.45; padding: 0 8px; }
@media (max-width: 360px) {
    .screen-desc { font-size: 12.5px; margin-bottom: 16px; }
}
.tier-grid { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 10px; }
.tier-card {
    background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 192, 255, 0.2);
    border-radius: 14px; padding: 12px 14px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px;
    transition: all 0.2s;
}
.tier-card.popular { border-color: #ffd700; background: rgba(255, 215, 0, 0.08); }

/* Tier ACTIV — cumparat de user. Vizual clar diferit. */
.tier-card.active {
    border: 2px solid #34d399;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(52, 211, 153, 0.05));
    box-shadow: 0 0 0 1px rgba(52,211,153,0.3), 0 8px 24px rgba(52, 211, 153, 0.2);
    position: relative;
}
.tier-card.active::before {
    content: 'YOUR PACKAGE';
    position: absolute;
    top: -10px; left: 14px;
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    font-size: 9px; font-weight: 800; letter-spacing: 0.8px;
    padding: 3px 9px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.5);
}
.tier-card.active .tier-buy {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
    border: 1px solid #34d399;
    cursor: default;
    pointer-events: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.tier-card.active .tier-buy::before {
    content: '✓'; font-size: 14px; font-weight: 900;
}

.tier-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tier-card-info h3 { font-size: 16px; margin-bottom: 2px; }
.tier-card-info p.tier-desc { font-size: 11px; opacity: 0.72; margin: 4px 0 0; line-height: 1.35; }
.tier-card-info .tier-price { color: #7cc0ff; font-size: 18px; font-weight: 800; letter-spacing: 0.2px; }
.tier-card.active .tier-card-info .tier-price { color: #34d399; }

/* Motivational subtitle (Starter Boost / Best Value / etc.) */
.tier-subtitle {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #b9d4f0;
    opacity: 0.78;
    line-height: 1;
    margin-bottom: 2px;
}
.tier-card.popular .tier-subtitle { color: #ffd97a; opacity: 1; }
.tier-card.active  .tier-subtitle { color: #34d399; opacity: 1; }

/* Rewards line: "Nx rewards · N hearts" */
.tier-meta {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    line-height: 1.3;
    text-wrap: pretty;
}
@media (max-width: 360px) {
    .tier-meta { font-size: 10.5px; }
}
.tier-dot {
    opacity: 0.45;
    font-weight: 700;
    margin: 0 2px;
}
.tier-heart-icon {
    color: #ff6f9c;
    font-size: 12px;
    line-height: 1;
    text-shadow: 0 0 6px rgba(255,111,156,0.45);
    margin-left: 1px;
}
.tier-buy {
    background: linear-gradient(135deg, #00a8ff, #7cc0ff);
    color: #fff; padding: 10px 14px; border-radius: 10px;
    font-weight: 800; font-size: 13px; letter-spacing: 0.4px;
    border: 0; cursor: pointer; min-width: 78px;
    max-width: 100%;
    box-shadow: 0 4px 14px rgba(0,168,255,0.3);
    transition: transform 0.15s, box-shadow 0.2s;
    flex-shrink: 0;
    white-space: normal;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    text-align: center;
}
@media (max-width: 380px) {
    .tier-buy { font-size: 12px; padding: 9px 10px; min-width: 68px; letter-spacing: 0.2px; }
}
@media (max-width: 340px) {
    .tier-buy { font-size: 11px; padding: 8px 8px; min-width: 60px; }
}
.tier-buy:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,168,255,0.45); }
.tier-buy:active:not(:disabled) { transform: translateY(0); }

/* === BADGE multiplicator (x2, x5, x30, x100, x1000) === */
.tier-mult-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 52px; height: 52px; padding: 0 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7cc0ff, #00a8ff);
    color: #fff; font-weight: 900; font-size: 16px; letter-spacing: 0.4px;
    box-shadow: 0 6px 16px rgba(124,192,255,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    flex-shrink: 0;
    margin-right: 0;
}

/* === Pret cu reducere === */
.tier-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 1px; }
.tier-price-old {
    text-decoration: line-through;
    color: rgba(255,255,255,0.42);
    font-size: 12px; font-weight: 600;
}
.tier-discount-pill {
    display: inline-block;
    background: linear-gradient(135deg, #ff4d6d, #c9184a);
    color: #fff;
    font-size: 10px; font-weight: 800; letter-spacing: 0.4px;
    padding: 2px 8px; border-radius: 999px;
    margin: 0 0 3px;
    align-self: flex-start;
    box-shadow: 0 3px 10px rgba(201,24,74,0.4);
    animation: discountPulse 2.2s ease-in-out infinite;
}
@keyframes discountPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* === Popular tag pe colt === */
.tier-popular-tag {
    position: absolute;
    top: -10px; right: 14px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a1a;
    font-size: 9px; font-weight: 900; letter-spacing: 0.8px;
    padding: 3px 10px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(255,140,0,0.5);
}
.tier-card { position: relative; }
.tier-card.popular { border-color: #ffd700; background: linear-gradient(135deg, rgba(255,215,0,0.12), rgba(255,140,0,0.04)); }

/* === HUD/menu tier badge — fallback gradient pe tier-{key} === */
/* Cele 5 tier-uri default (admin poate edita prin badge_gradient inline) */
.hud-tier.tier-x2, .menu-tier-badge.tier-x2 { background: linear-gradient(135deg, #a8d4ff, #7cc0ff); color: #fff; }
.hud-tier.tier-x5, .menu-tier-badge.tier-x5 { background: linear-gradient(135deg, #9cf6c5, #42d392); color: #1a1a1a; }
.hud-tier.tier-x30, .menu-tier-badge.tier-x30 { background: linear-gradient(135deg, #ffd97a, #ffae42); color: #1a1a1a; }
.hud-tier.tier-x100, .menu-tier-badge.tier-x100 { background: linear-gradient(135deg, #ff9cce, #e94e8c); color: #fff; }
.hud-tier.tier-x1000, .menu-tier-badge.tier-x1000 { background: linear-gradient(135deg, #c9a0ff, #7a4dff); color: #fff; }

/* ============ WITHDRAW ============ */
.withdraw-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.balance-big { font-size: 32px; font-weight: 700; text-align: center; color: #b9f2ff; margin: 16px 0; }
.wallet-status { text-align: center; font-size: 13px; opacity: 0.7; padding: 8px; }
.wallet-status code { color: #7cc0ff; }
#withdrawAmount {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; padding: 14px; border-radius: 10px; font-size: 18px;
    width: 100%; text-align: center;
}
.history-list { margin-top: 24px; }
.history-item {
    padding: 12px; background: rgba(255,255,255,0.04);
    border-radius: 8px; margin-bottom: 8px;
    display: flex; justify-content: space-between; font-size: 14px;
}

/* ============ INVITE ============ */

/* Watch-Ad → +1 instant heart card (Adsgram integrated, fallback la modal intern) */
.invite-adheart-card {
    width: 100%;
    max-width: 400px;
    margin: 0 0 18px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(72, 219, 144, 0.14), rgba(154, 230, 180, 0.08));
    border: 1px solid rgba(72, 219, 144, 0.38);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    animation: inviteAdHeartPulse 2.6s ease-in-out infinite;
}
.invite-adheart-card.hidden { display: none; }
@keyframes inviteAdHeartPulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(72, 219, 144, 0.0), 0 0 0 0 rgba(72, 219, 144, 0.0); }
    50%      { box-shadow: 0 4px 18px rgba(72, 219, 144, 0.15), 0 0 0 4px rgba(72, 219, 144, 0.10); }
}
.invite-adheart-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #48db90, #2ec471);
    color: #052b18;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(46, 196, 113, 0.4);
}
.invite-adheart-body {
    min-width: 0;
    text-align: left;
    line-height: 1.3;
}
.invite-adheart-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    line-height: 1.3;
    text-wrap: pretty;
}
.invite-adheart-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    line-height: 1.35;
    text-wrap: pretty;
}
.btn-invite-adheart {
    background: linear-gradient(135deg, #48db90, #2ec471) !important;
    color: #052b18 !important;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 14px;
    box-shadow: 0 4px 14px rgba(46, 196, 113, 0.4) !important;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    white-space: normal;
    text-align: center;
}
@media (max-width: 360px) {
    .btn-invite-adheart { font-size: 12px; padding: 9px 12px; }
}
.btn-invite-adheart:active { transform: scale(0.97); }
.btn-invite-adheart:disabled {
    background: linear-gradient(135deg, #4a5a52, #3a4842) !important;
    color: rgba(255,255,255,0.55) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Mobile mic: rearanjeaza in 2 randuri (titlu + buton dedesubt) */
@media (max-width: 380px) {
    .invite-adheart-card {
        grid-template-columns: auto 1fr;
        grid-template-areas: "icon body" "btn btn";
        gap: 10px;
        padding: 12px;
    }
    .invite-adheart-icon { grid-area: icon; }
    .invite-adheart-body { grid-area: body; }
    .btn-invite-adheart { grid-area: btn; width: 100%; }
}

.invite-stats { display: flex; gap: 12px; width: 100%; max-width: 400px; margin-bottom: 24px; }
.stat-card {
    flex: 1; background: rgba(255,255,255,0.05); padding: 20px; border-radius: 12px;
    text-align: center;
}
.stat-num { font-size: 32px; font-weight: 700; color: #7cc0ff; }
.stat-label { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.invite-link-box {
    width: 100%; max-width: 400px; margin-top: 16px;
    background: rgba(0,0,0,0.4); padding: 12px; border-radius: 10px;
    display: flex; align-items: center; gap: 8px;
}
.invite-link-box code { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7cc0ff; }

/* ============ LEADERBOARD ============ */
.leaderboard-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.lb-tab {
    background: rgba(255,255,255,0.05); color: #fff; padding: 8px 14px;
    border-radius: 8px; font-size: 13px;
    white-space: normal; line-height: 1.2; text-align: center;
    flex: 1 1 auto; min-width: 0;
}
@media (max-width: 380px) {
    .lb-tab { padding: 7px 10px; font-size: 12px; }
}
.lb-tab.active { background: linear-gradient(135deg, #00a8ff, #7cc0ff); }
.leaderboard-list { width: 100%; max-width: 400px; }
.leaderboard-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: rgba(255,255,255,0.04);
    border-radius: 10px; margin-bottom: 8px;
}
.lb-rank { font-size: 18px; font-weight: 700; min-width: 30px; color: #ffd700; }
.lb-name { flex: 1; }
.lb-score { color: #7cc0ff; font-weight: 700; }

/* ============ SOCIAL NETWORKS ============
   Lista platforme cu reward — mobile-first, professional. */
.social-list {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 24px;
}
.social-loading {
    text-align: center;
    opacity: 0.55;
    padding: 32px 8px;
    font-size: 14px;
}
.social-card {
    --soc-color: #4ea3ff;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease, border-color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}
.social-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--soc-color);
    opacity: 0.85;
}
.social-card:hover { border-color: rgba(255,255,255,0.14); }
.social-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--soc-color) 18%, rgba(0,0,0,0.4));
    color: var(--soc-color);
    flex-shrink: 0;
}
.social-icon svg { display: block; }
.social-info {
    min-width: 0;
    overflow: hidden;
}
.social-label {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: pretty;
}
.social-reward {
    font-size: 12px;
    color: #ffd700;
    margin-top: 2px;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.social-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
}
.social-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 86px;
    border-radius: 8px;
    margin: 0;
    line-height: 1.2;
}
.social-claim {
    opacity: 0.55;
    cursor: not-allowed;
    transition: opacity 0.15s ease, transform 0.1s ease;
}
.social-claim:not(:disabled) { cursor: pointer; }
.social-claim.social-claim--ready {
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(255,215,0,0.4), 0 0 12px rgba(255,215,0,0.25);
}
.social-claim:disabled {
    background: rgba(66, 211, 146, 0.22) !important;
    color: #b6ffd9 !important;
    cursor: default;
    opacity: 1;
}

/* Mobile narrow (<420px): pune butoanele pe rand orizontal sub label */
@media (max-width: 420px) {
    .social-card {
        grid-template-columns: 40px 1fr;
        grid-template-areas:
            "icon info"
            "actions actions";
        row-gap: 10px;
    }
    .social-icon { grid-area: icon; width: 40px; height: 40px; }
    .social-icon svg { width: 22px; height: 22px; }
    .social-info { grid-area: info; }
    .social-actions {
        grid-area: actions;
        flex-direction: row;
        justify-content: stretch;
    }
    .social-actions .btn { flex: 1; min-width: 0; padding: 9px 10px; font-size: 13px; }
}

/* ============ GAME BANNER (in-game top + game-over modal) ============
   Forma IDENTICA in ambele pozitii. min-height garanteaza vizibilitate pe orice device,
   chiar daca WebView nu suporta aspect-ratio CSS modern (Android < Chrome 88). */
.game-banner-slot {
    width: min(340px, 92%);
    min-height: 72px;                /* fallback universal — slot vizibil mereu */
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.35);    /* placeholder cat timp se incarca img */
    display: block;
    position: relative;
    line-height: 0;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
/* Aspect-ratio modern — preferat cand WebView-ul il suporta */
@supports (aspect-ratio: 4 / 1) {
    .game-banner-slot { aspect-ratio: 4 / 1; min-height: 0; }
}
.game-banner-slot:active { transform: scale(0.98); }
.game-banner-slot.hidden { display: none; }

/* Imaginea ocupa toata latimea, inaltime auto = aspect natural — fara crop. */
.game-banner-slot img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;            /* click-ul ramane pe container */
}

/* Variant in joc — fixat la viewport, BINE SUB HUD (HUD are 2 randuri: label + valoare).
   padding 8 + label 13 + gap 2 + valoare 16 + padding 8 ≈ 47px inaltime HUD.
   + 14px gap = banner incepe la 61px sub var(--tg-top-offset).
   tg-top-offset acopera safe-area (notch iPhone, etc.). */
#gameBanner {
    position: fixed;
    top: calc(var(--tg-top-offset, 0px) + 78px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
}
#gameBanner:active { transform: translateX(-50%) scale(0.98); }

/* Variant in modal Game Over — in flow, intre score si butoane */
.game-banner-slot--modal {
    position: static;
    margin: 0 auto 16px;
}

/* ============ BOTTOM AD ============ */
.bottom-ad {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    z-index: 9;
    font-size: 12px; opacity: 0.8;
}

/* ============ TOAST ============ */
.toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.9); padding: 12px 20px; border-radius: 30px;
    z-index: 100; font-size: 14px;
    animation: toastIn 0.3s ease;
}
.toast.hidden { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============ RESPONSIVE ============ */
@media (max-height: 600px) {
    .logo-dino { font-size: 64px; }
    .logo h1 { font-size: 36px; }
    .logo { margin: 16px 0 24px; }
}

/* Very short screens (iPhone SE 1st gen, 568px height) — squeeze the menu so all 5
   buttons fit without scrolling, while keeping the HUD island fully visible at top. */
@media (max-height: 620px) {
    .screen { padding-top: calc(var(--tg-top-offset) + 50px); }
    .logo { margin: 8px 0 14px; }
    .logo h1 { font-size: 30px; }
    .tagline { font-size: 11px; letter-spacing: 2px; }
    .menu-buttons { gap: 8px; }
    .btn { padding: 11px 18px; font-size: 14px; }
    .btn-large { padding: 14px; font-size: 17px; }
}
/* Landscape phones (very wide but very short) — keep HUD compact and scrollable content. */
@media (max-height: 480px) and (orientation: landscape) {
    .screen { padding-top: calc(var(--tg-top-offset) + 30px); padding-bottom: 16px; }
    .logo h1 { font-size: 26px; }
    .tagline { font-size: 10px; }
    .logo { margin: 4px 0 10px; }
}

/* ============ FIRE BUTTON (in-game shoot) ============ */
.fire-btn {
    position: fixed;
    right: 18px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff8a3a 0%, #c64a18 60%, #6b1f00 100%);
    border: 2px solid rgba(255, 215, 0, 0.7);
    box-shadow:
        0 6px 22px rgba(255, 122, 50, 0.55),
        0 0 30px rgba(255, 215, 0, 0.35),
        0 0 0 4px rgba(255, 215, 0, 0.08) inset;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    display: none;  /* shown only by Game.start() via JS */
    align-items: center;
    justify-content: center;
    z-index: 50;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 90ms ease, filter 120ms ease;
}
.fire-btn.visible { display: flex; }
.fire-btn:active { transform: scale(0.92); filter: brightness(1.25); }
.fire-btn[disabled] {
    opacity: 0.45;
    filter: grayscale(0.6);
    cursor: not-allowed;
}
.fire-btn .fire-icon {
    position: absolute;
    font-size: 30px;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.fire-btn .fire-ammo {
    position: absolute;
    bottom: -2px;
    right: -2px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #ffd700;
    color: #2a1500;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #6b1f00;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
/* Responsive: ecrane mici (iPhone SE) → fire button mai mic ca sa nu acopere mult din gameplay */
@media (max-width: 380px) {
    .fire-btn { width: 58px; height: 58px; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
    .fire-btn .fire-icon { font-size: 26px; }
    .fire-btn .fire-ammo { min-width: 20px; height: 20px; font-size: 12px; border-width: 1.5px; }
}
@media (max-width: 340px) {
    .fire-btn { width: 52px; height: 52px; right: 12px; }
    .fire-btn .fire-icon { font-size: 22px; }
}
/* Landscape mobil — coboara fire button mai aproape de margine */
@media (max-height: 480px) and (orientation: landscape) {
    .fire-btn { width: 54px; height: 54px; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
}

/* ============ GAME OVER — UPGRADE CTA (drive to sale) — COMPACT ============ */
.go-upgrade-cta {
    margin: 6px 0 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.10), rgba(255, 138, 58, 0.10));
    border: 1px solid rgba(255, 215, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    animation: goCtaPulse 2.2s ease-in-out infinite;
}
.go-upgrade-cta.hidden { display: none; }
.go-upgrade-text { text-align: center; }
.go-upgrade-text strong { font-size: 12.5px; color: #fff; display: block; line-height: 1.25; }
.go-upgrade-text small { font-size: 10px; color: rgba(255,255,255,0.65); display: block; margin-top: 1px; line-height: 1.2; }
.btn-upgrade-cta {
    background: linear-gradient(135deg, #ffd700, #ff8a3a) !important;
    color: #1a0a00 !important;
    font-weight: 800;
    padding: 9px 12px !important;
    font-size: 13px !important;
    box-shadow: 0 4px 14px rgba(255, 138, 58, 0.45) !important;
}
@keyframes goCtaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.0); }
    50%      { box-shadow: 0 0 0 4px rgba(255,215,0,0.10); }
}

/* ============ GAME OVER — INVITE CTA (viral growth, +1 life per friend) ============ */
.go-invite-cta {
    margin: 10px 0 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.10), rgba(255, 122, 144, 0.10));
    border: 1px solid rgba(255, 122, 144, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    animation: goInvitePulse 2.4s ease-in-out infinite;
}
.go-invite-cta.hidden { display: none; }
.go-invite-text { text-align: center; }
.go-invite-text strong {
    font-size: 14px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}
.go-invite-text small {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    display: block;
    margin-top: 2px;
}
.btn-invite-cta {
    background: linear-gradient(135deg, #ff6f9c, #ff4d6d) !important;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(255, 77, 109, 0.45) !important;
}
.btn-invite-cta:active { transform: scale(0.98); }
@keyframes goInvitePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 144, 0.0); }
    50%      { box-shadow: 0 0 0 4px rgba(255, 122, 144, 0.10); }
}

/* ============ GAME OVER — CTA GRID (Invite + Watch Ad side-by-side) — COMPACT ============ */
.go-cta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    margin: 4px 0 4px;
    width: 100%;
    box-sizing: border-box;
}
.go-cta-card {
    margin: 0 !important;
    padding: 7px 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-height: 78px;
    min-width: 0;
    box-sizing: border-box;
}
.go-cta-text {
    text-align: center;
    min-width: 0;          /* permite shrink in flex/grid pentru texte lungi */
    /* IMPORTANT: NU rupe cuvinte la mijloc (asta facea "pri-eten" / "revi-no").
       overflow-wrap: break-word rupe DOAR daca un cuvant e mai lung decat
       container-ul (raruri extreme). word-break: normal = wrap doar la spatii. */
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;           /* fara hifenare automata */
    -webkit-hyphens: manual;
    /* Echilibreaza liniile in browsere moderne (Chrome 114+, Safari 17.5+) */
    text-wrap: pretty;
}
.go-cta-text strong {
    font-size: 11.5px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
    flex-wrap: wrap;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
}
.go-cta-text small {
    font-size: 9.5px;
    color: rgba(255,255,255,0.62);
    display: block;
    margin-top: 1px;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    text-wrap: pretty;
}
/* Texte foarte lungi (DE/FI/RU/HI) — micsoreaza fontul pe carduri inguste */
@media (max-width: 420px) {
    .go-cta-text strong { font-size: 12px; }
    .go-cta-text small { font-size: 10px; }
}
@media (max-width: 360px) {
    .go-cta-text strong { font-size: 11.5px; gap: 3px; }
    .go-cta-text small { font-size: 9.5px; }
    .go-cta-card { padding: 9px 8px; }
    .go-cta-grid { gap: 6px; }
}
/* Carduri foarte inguste (DE/FI/RU/AR/HI cu texte lungi) — micsorare suplimentara */
@media (max-width: 340px) {
    .go-cta-text strong { font-size: 10.5px; }
    .go-cta-text small { font-size: 9px; }
    .go-cta-card { padding: 8px 6px; }
    .go-cta-grid { gap: 5px; }
}
/* In grid, fortam invite cta sa pastreze stilul propriu (gradient + border) dar grid-friendly */
.go-cta-grid .go-invite-cta { margin: 0; padding: 7px 8px; min-width: 0; }
.go-cta-grid .go-adheart-cta { margin: 0; padding: 7px 8px; min-width: 0; }

/* ============ BUTOANE IN CARDURI CTA — fit text in toate limbile ============
   Base .btn = padding 14px 24px + font 16px → prea mare pentru cardurile in grid.
   "Пригласить" (RU 10ch), "Vizionează" (RO 10ch), "Запросити" (UK 9ch) etc.
   Solutie: padding/font reduse + permitem wrap pe 2 linii daca e cazul.
   white-space: normal (default) permite line break la spatii. */
.go-cta-card .btn {
    padding: 7px 8px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
    -webkit-hyphens: manual;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}
/* SVG icon — margin redus pentru a lasa loc textului */
.go-cta-card .btn .btn-svg { margin-right: 0; flex-shrink: 0; }
.go-cta-card .btn span { min-width: 0; }

/* Butoane principale game-over (Play Again + Menu) — "Nochmal spielen" (DE 15ch),
   "Pelaa uudelleen" (FI 15ch), "Tornar a jugar" (CA 14ch). Reducem font sa nu wrap-uiasca urat. */
.game-over-card > .btn {
    white-space: normal;
    line-height: 1.2;
    overflow-wrap: break-word;
    hyphens: manual;
    -webkit-hyphens: manual;
    /* COMPACT — Play Again + Menu mai mici, default .btn (14px 24px / 16px) prea mare */
    padding: 10px 16px;
    font-size: 14px;
    margin-top: 4px;
    border-radius: 10px;
}

/* Upgrade CTA button — "Aggiorna pacchetto" (IT 18ch), "Améliorer le pack" (FR 17ch) */
.btn-upgrade-cta {
    white-space: normal;
    line-height: 1.2;
    overflow-wrap: break-word;
    hyphens: manual;
    -webkit-hyphens: manual;
}

/* Sub 420px: text putin mai mic in butoanele din carduri */
@media (max-width: 420px) {
    .go-cta-card .btn { font-size: 12px; padding: 8px 8px; }
    .btn-upgrade-cta { font-size: 13.5px; }
}
/* Sub 380px: deja avem grid 1-col mai jos → butoanele primesc mai mult spatiu.
   In landscape mic insa, grid e tot 2-col, deci mai reducem. */
@media (max-width: 380px) {
    .go-cta-card .btn { font-size: 11.5px; padding: 8px 6px; letter-spacing: -0.1px; }
    .game-over-card > .btn { font-size: 13.5px; padding: 11px 14px; }
    .btn-upgrade-cta { font-size: 13px; padding: 10px 10px; }
}
/* Sub 340px (iPhone SE 1st gen, ecrane Android foarte mici) */
@media (max-width: 340px) {
    .go-cta-card .btn { font-size: 11px; padding: 7px 5px; letter-spacing: -0.2px; }
    .game-over-card > .btn { font-size: 12.5px; padding: 10px 12px; }
    .btn-upgrade-cta { font-size: 12px; padding: 9px 8px; }
}

/* WATCH AD HEART — gradient verde menta pentru diferentiere clara fata de invite (roz) */
.go-adheart-cta {
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(72, 219, 144, 0.10), rgba(154, 230, 180, 0.10));
    border: 1px solid rgba(154, 230, 180, 0.38);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    animation: goAdHeartPulse 2.6s ease-in-out infinite;
}
.go-adheart-cta.hidden { display: none; }
.btn-adheart-cta {
    background: linear-gradient(135deg, #48db90, #2ec471) !important;
    color: #052b18 !important;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(46, 196, 113, 0.45) !important;
}
.btn-adheart-cta:active { transform: scale(0.98); }
.btn-adheart-cta:disabled {
    background: linear-gradient(135deg, #4a5a52, #3a4842) !important;
    color: rgba(255,255,255,0.55) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.7;
}
@keyframes goAdHeartPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(72, 219, 144, 0.0); }
    50%      { box-shadow: 0 0 0 4px rgba(72, 219, 144, 0.10); }
}

/* Single column pe ecrane sub 380px sau short-height (landscape mic) */
@media (max-width: 380px), (max-height: 560px) {
    .go-cta-grid { grid-template-columns: 1fr; gap: 6px; }
    .go-cta-card { min-height: 0; }
}

/* ============ AD HEART MODAL (watch ad → +1 heart) ============ */
.ad-heart-modal-card {
    max-width: 420px;
    width: 100%;
    padding: 18px 18px 16px;
    border-radius: 18px;
    position: relative;
    background: linear-gradient(180deg, #1a2540, #0d1830);
    border: 1px solid rgba(154, 230, 180, 0.25);
    box-shadow: 0 14px 50px rgba(0,0,0,0.55);
    animation: adHeartIn 0.28s ease-out;
}
@keyframes adHeartIn { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.ad-heart-close {
    position: absolute;
    top: 8px; right: 10px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.ad-heart-close:hover { background: rgba(255,255,255,0.12); }

.ad-heart-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    padding-right: 28px;
}
.ad-heart-badge {
    font-size: 9.5px;
    letter-spacing: 1.6px;
    color: rgba(154, 230, 180, 0.95);
    background: rgba(72, 219, 144, 0.12);
    border: 1px solid rgba(72, 219, 144, 0.30);
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    font-weight: 700;
}
.ad-heart-title {
    margin: 4px 0 0;
    font-size: 18px;
    color: #fff;
    font-weight: 700;
    text-align: center;
}
.ad-heart-content {
    background: rgba(0,0,0,0.30);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    min-height: 140px;
    max-height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    text-align: center;
    word-break: break-word;
}
.ad-heart-content img { max-width: 100%; max-height: 200px; border-radius: 8px; }

.ad-heart-progress {
    margin: 12px 0 10px;
    height: 6px;
    background: rgba(255,255,255,0.10);
    border-radius: 999px;
    overflow: hidden;
}
.ad-heart-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #48db90, #2ec471);
    border-radius: 999px;
    transition: width 0.25s linear;
}

.ad-heart-countdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ad-heart-countdown-label {
    font-size: 12.5px;
    color: rgba(255,255,255,0.75);
}
.ad-heart-countdown-label b { color: #9ae6b4; font-weight: 700; }
.btn-claim-heart {
    flex: 1 1 160px;
    min-width: 0;
    padding: 10px 14px;
    font-size: 14px;
    background: linear-gradient(135deg, #48db90, #2ec471) !important;
    color: #052b18 !important;
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(46, 196, 113, 0.40) !important;
}
.btn-claim-heart:disabled {
    background: linear-gradient(135deg, #4a5a52, #3a4842) !important;
    color: rgba(255,255,255,0.55) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.ad-heart-foot {
    text-align: center;
    margin: 4px 0 0;
    font-size: 11.5px;
    color: rgba(255,255,255,0.55);
}
.ad-heart-foot b { color: #9ae6b4; }

/* Modal compact pe telefoane mici si landscape scurt */
@media (max-width: 380px) {
    .ad-heart-modal-card { padding: 14px 14px 12px; max-width: 92vw; }
    .ad-heart-title { font-size: 16px; }
    .ad-heart-content { min-height: 110px; max-height: 170px; }
    .ad-heart-countdown-row { flex-direction: column; align-items: stretch; }
    .ad-heart-countdown-label { text-align: center; }
}
@media (max-height: 480px) and (orientation: landscape) {
    .ad-heart-modal-card { padding: 12px 14px; max-height: 92vh; overflow-y: auto; }
    .ad-heart-content { min-height: 80px; max-height: 120px; }
    .ad-heart-header { margin-bottom: 6px; }
    .ad-heart-title { font-size: 15px; }
}

/* ============ NO HEARTS OVERLAY — apare cand userul incearca sa joace cu 0 inimi ============
   3 butoane: Invite Friends, Buy Package, Watch Ad. Design profesional, responsiv pe toate
   dispozitivele (ultra-narrow 280px, mobile, tablet, landscape, desktop). */
.no-hearts-card {
    max-width: 420px;
    width: min(92vw, 420px);
    padding: 22px 20px 18px;
    text-align: center;
    background: linear-gradient(160deg, #1a1b2e 0%, #14152a 100%);
    border: 1px solid rgba(255, 77, 109, 0.25);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
    position: relative;
    border-radius: 18px;
}
.no-hearts-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    color: rgba(255,255,255,0.7);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.no-hearts-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.no-hearts-icon {
    width: 76px;
    height: 76px;
    margin: 4px auto 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,77,109,0.22), rgba(255,77,109,0.05) 70%);
    color: #ff4d6d;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: nhPulse 2.4s ease-in-out infinite;
}
@keyframes nhPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,77,109,0.35); }
    50%      { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(255,77,109,0); }
}
.no-hearts-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #fff;
}
.no-hearts-sub {
    margin: 0 0 18px;
    font-size: 13.5px;
    color: rgba(255,255,255,0.65);
    line-height: 1.4;
}
.no-hearts-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.nh-btn {
    display: grid;
    grid-template-columns: 44px 1fr 18px;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}
.nh-btn:hover { background: rgba(255,255,255,0.07); transform: translateY(-1px); }
.nh-btn:active { transform: translateY(0); }
.nh-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.nh-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: #fff;
    flex-shrink: 0;
}
.nh-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nh-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    text-wrap: pretty;
}
.nh-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.62);
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
    -webkit-hyphens: manual;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: pretty;
}
.nh-chev {
    font-size: 22px;
    color: rgba(255,255,255,0.4);
    line-height: 1;
    text-align: right;
}
/* Variante de buton — culori distincte per actiune */
.nh-btn-invite {
    border-color: rgba(74, 222, 128, 0.28);
    background: linear-gradient(135deg, rgba(74,222,128,0.10), rgba(34,197,94,0.04));
}
.nh-btn-invite:hover { border-color: rgba(74,222,128,0.45); box-shadow: 0 8px 22px rgba(34,197,94,0.18); }
.nh-btn-invite .nh-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.nh-btn-buy {
    border-color: rgba(99, 102, 241, 0.30);
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.05));
}
.nh-btn-buy:hover { border-color: rgba(139,92,246,0.50); box-shadow: 0 8px 22px rgba(99,102,241,0.22); }
.nh-btn-buy .nh-icon { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.nh-btn-ad {
    border-color: rgba(255, 77, 109, 0.30);
    background: linear-gradient(135deg, rgba(255,77,109,0.12), rgba(244,63,94,0.05));
}
.nh-btn-ad:hover { border-color: rgba(255,77,109,0.55); box-shadow: 0 8px 22px rgba(255,77,109,0.22); }
.nh-btn-ad .nh-icon { background: linear-gradient(135deg, #f43f5e, #ff4d6d); }
.no-hearts-foot {
    margin: 8px 0 0;
    font-size: 11.5px;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
}

/* Compact pe telefoane mici (< 380px) si ultra-narrow (Galaxy Fold inchis) */
@media (max-width: 380px) {
    .no-hearts-card { padding: 18px 14px 14px; border-radius: 16px; }
    .no-hearts-icon { width: 64px; height: 64px; margin: 2px auto 10px; }
    .no-hearts-icon svg { width: 52px; height: 52px; }
    .no-hearts-title { font-size: 19px; }
    .no-hearts-sub { font-size: 12.5px; margin-bottom: 14px; }
    .nh-btn { padding: 10px 12px; gap: 10px; grid-template-columns: 40px 1fr 16px; }
    .nh-icon { width: 40px; height: 40px; border-radius: 10px; }
    .nh-icon svg { width: 20px; height: 20px; }
    .nh-title { font-size: 13.5px; }
    .nh-desc { font-size: 11.5px; }
}
@media (max-width: 300px) {
    .no-hearts-card { padding: 14px 10px 12px; }
    .nh-btn { grid-template-columns: 36px 1fr 14px; padding: 9px 10px; gap: 8px; }
    .nh-icon { width: 36px; height: 36px; }
    .nh-icon svg { width: 18px; height: 18px; }
    .nh-desc { font-size: 11px; }
}
/* Landscape scurt — modal scrollabil, padding redus */
@media (max-height: 520px) and (orientation: landscape) {
    .no-hearts-card { max-height: 92vh; overflow-y: auto; padding: 14px 16px 12px; }
    .no-hearts-icon { width: 52px; height: 52px; margin: 0 auto 8px; }
    .no-hearts-icon svg { width: 42px; height: 42px; }
    .no-hearts-title { font-size: 18px; }
    .no-hearts-sub { font-size: 12px; margin-bottom: 10px; }
    .no-hearts-actions { gap: 8px; margin-bottom: 8px; }
    .nh-btn { padding: 9px 12px; }
    .no-hearts-foot { font-size: 10.5px; }
}
/* Reduced motion — fara pulse pe inima */
@media (prefers-reduced-motion: reduce) {
    .no-hearts-icon { animation: none; }
    .nh-btn { transition: none; }
}

/* ============ UNIVERSAL DEVICE AUDIT — toate clasele de telefoane/tablete ============
   JS (main.js applySafeArea) seteaza body[data-device-class] + boolean data-tall/data-landscape/data-foldable.
   Aici aplicam tweak-uri precise pentru fiecare clasa, peste regulile @media existente.
   Scop: 0 dezastre vizuale pe ORICE dispozitiv — Galaxy Fold, iPhone SE, Pixel,
   S22 Ultra (ultra-tall), iPad portrait, Telegram Desktop, dispozitive cu notch lateral. */

/* SIDE SAFE-AREA — landscape iPhone cu notch, foldable: nu lasa HUD/back sa intre sub notch */
.screen {
    padding-left:  max(20px, env(safe-area-inset-left,  0px), var(--tg-safe-left,  0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px), var(--tg-safe-right, 0px));
}
#hud {
    padding-left:  max(12px, env(safe-area-inset-left,  0px), var(--tg-safe-left,  0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px), var(--tg-safe-right, 0px));
}
.fire-btn {
    right: max(18px, env(safe-area-inset-right, 0px), var(--tg-safe-right, 0px));
}

/* ULTRA-NARROW (≤320px — Galaxy Fold inchis, telefoane vechi sub iPhone SE 1) */
body[data-device-class="ultra-narrow"] .hud-bar { gap: 4px; padding: 4px 8px; }
body[data-device-class="ultra-narrow"] .hud-stat { font-size: 9.5px; }
body[data-device-class="ultra-narrow"] .hud-tier { font-size: 8.5px; padding: 2px 6px; }
body[data-device-class="ultra-narrow"] .hud-coin { width: 10px !important; height: 10px !important; }
/* Pe ecrane <360px, ascunde label-urile "TON"/"DINTON" — iconitele coloreaza clar tipul.
   Asa nu mai e nevoie sa taiem nimic cu text-overflow: ellipsis. */
@media (max-width: 360px) {
    #menuScreen #hud .hud-unit { display: none; }
}
body[data-device-class="ultra-narrow"] .screen { padding-left: 8px; padding-right: 8px; }
body[data-device-class="ultra-narrow"] .screen h2 { font-size: 19px; }
body[data-device-class="ultra-narrow"] .screen-desc { font-size: 11.5px; padding: 0 4px; }
body[data-device-class="ultra-narrow"] .menu-buttons { padding: 0 10px; }
body[data-device-class="ultra-narrow"] .btn { padding: 10px 14px; font-size: 13px; }
body[data-device-class="ultra-narrow"] .btn-large { padding: 12px; font-size: 15px; }

/* ULTRA-TALL ASPECT (≥2:1 — S22 Ultra, Pixel 7 Pro): mai mult spatiu vertical pentru logo,
   evita ca butoanele meniului sa para "pierdute" jos */
body[data-tall] #menuScreen.menu-with-bg { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); }
body[data-tall] .logo-hero { margin-bottom: -50px; }

/* LANDSCAPE pe telefoane (orientation landscape + height<600) — totul mai compact, side-by-side */
body[data-landscape] #hud { padding-top: calc(var(--tg-top-offset) + 0px); padding-bottom: 2px; }
body[data-landscape] .screen { padding-top: max(calc(var(--tg-top-offset) + 24px), 48px); padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
body[data-landscape] .screen h2 { font-size: 18px; margin-bottom: 2px; }
body[data-landscape] .screen-desc { font-size: 11.5px; margin-bottom: 10px; }
body[data-landscape] .tier-grid { max-width: 560px; }
body[data-landscape] .menu-buttons { max-width: 480px; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
body[data-landscape] .menu-buttons .btn { flex: 1 1 calc(50% - 8px); min-width: 140px; }
body[data-landscape] .logo-hero { margin-bottom: -10px; }
body[data-landscape] .logo-hero .logo-img { max-height: clamp(120px, 38vh, 220px); }

/* TABLET portrait (iPad, Android tablet ≥640 width) — content centrat compact, nu intins */
body[data-device-class="tablet"] .screen { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }
body[data-device-class="tablet"] .tier-grid,
body[data-device-class="tablet"] .menu-buttons { max-width: 480px; margin: 0 auto; }
body[data-device-class="tablet"] .screen h2 { font-size: 34px; }
body[data-device-class="tablet"] .screen-desc { font-size: 15px; max-width: 520px; margin-left: auto; margin-right: auto; }
body[data-device-class="tablet"] .logo-hero .logo-img { max-height: clamp(420px, 55vh, 620px); }

/* DESKTOP (Telegram Desktop ≥1024) — content cap centrat, latime nu se intinde infinit */
body[data-device-class="desktop"] .screen { padding-left: 24px; padding-right: 24px; }
body[data-device-class="desktop"] .tier-grid,
body[data-device-class="desktop"] .menu-buttons { max-width: 460px; margin: 0 auto; }
body[data-device-class="desktop"] .logo-hero .logo-img { max-height: clamp(380px, 50vh, 560px); }

/* FOLDABLE (telefon pliabil deschis ~720-840px, touch device) — pastreaza ratio mobile */
body[data-foldable] .menu-buttons { max-width: 420px; margin: 0 auto; }
body[data-foldable] .tier-grid    { max-width: 480px; margin: 0 auto; }
body[data-foldable] .screen h2    { font-size: 30px; }

/* iOS PWA / Telegram cu home indicator jos — safe-area-bottom garantat pe TOATE ecranele */
.screen { padding-bottom: max(20px, env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px)); }
.fire-btn { bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 22px), calc(var(--tg-safe-bottom, 0px) + 22px)); }

/* Foarte SCURT + LANDSCAPE (telefoane cu max-height 380, ex iPhone SE landscape) */
@media (max-height: 380px) and (orientation: landscape) {
    .screen { padding-top: max(calc(var(--tg-top-offset) + 14px), 36px); }
    .screen h2 { font-size: 16px; margin-bottom: 0; }
    .screen-desc { font-size: 10.5px; margin-bottom: 6px; }
    #hud { padding-top: calc(var(--tg-top-offset) + 0px); padding-bottom: 0; }
    .hud-bar { padding: 4px 10px; }
}

/* HIGH-DPI (Retina/QHD) — nu deformeaza coin SVG; deja sunt vectoriale, dar bordurile la 0.5px
   pe DPR≥2 pot disparea. Adaugam minim 1px pe device-uri high-DPI. */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .hud-bar { border-width: 1px; }
    .tier-card { border-width: 1px; }
}

/* REDUCED MOTION — userii care au activat "reduce motion" in setarile sistemului
   nu vor mai vedea animatiile float/pulse/etc. (accesibilitate + battery). */
@media (prefers-reduced-motion: reduce) {
    .logo-hero .logo-img,
    .coin-svg, .coin-svg-sm,
    .dinton-stat-row svg,
    .go-upgrade-cta, .go-invite-cta, .go-adheart-cta, .invite-adheart-card {
        animation: none !important;
    }
    .hud-clickable { transition: none; }
}

/* ============================================================
   WALLET CARD (Withdraw screen) — 2 states, professional polish
   ============================================================ */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.wallet-card {
    width: 100%;
    background: linear-gradient(180deg, rgba(14,30,50,0.78), rgba(14,30,50,0.62));
    border: 2px solid rgba(124,192,255,0.4);
    border-radius: 16px;
    padding: 18px 16px;
    box-sizing: border-box;
    box-shadow:
        0 10px 28px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.wallet-card[data-state="connected"] {
    border-color: rgba(46,204,113,0.65);
    background: linear-gradient(180deg, rgba(14,40,28,0.78), rgba(10,30,22,0.62));
    box-shadow:
        0 10px 32px rgba(46,204,113,0.22),
        0 0 0 1px rgba(46,204,113,0.3),
        inset 0 1px 0 rgba(255,255,255,0.07);
}

/* TON coin glow in withdraw balance + size emphasis */
.ton-coin-svg {
    filter: drop-shadow(0 2px 8px rgba(0,152,234,0.6));
}
.wallet-card .wallet-card-connected { display: none; }
.wallet-card .wallet-card-disconnected { display: flex; }
.wallet-card[data-state="connected"] .wallet-card-disconnected { display: none; }
.wallet-card[data-state="connected"] .wallet-card-connected { display: block; }

/* Disconnected layout */
.wallet-card-disconnected {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.wallet-card-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(124,192,255,0.12);
    color: #7cc0ff;
    flex-shrink: 0;
}
.wallet-card-text { display: flex; flex-direction: column; gap: 2px; }
.wallet-card-title { font-size: 15px; font-weight: 600; color: #fff; }
.wallet-card-sub   { font-size: 12px; opacity: 0.7; line-height: 1.4; }
.wallet-card-cta   { width: 100%; margin-top: 4px; }

/* Connected layout */
.wallet-card-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px; font-size: 14px;
}
.wallet-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0 4px rgba(46,204,113,0.22), 0 0 12px rgba(46,204,113,0.6);
    flex-shrink: 0;
    animation: walletPulse 2s infinite;
}
@keyframes walletPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(46,204,113,0.22), 0 0 12px rgba(46,204,113,0.6); }
    50%      { box-shadow: 0 0 0 7px rgba(46,204,113,0.10), 0 0 16px rgba(46,204,113,0.85); }
}
.wallet-card-label {
    font-weight: 700;
    color: #2ecc71;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 13px;
}
.wallet-name {
    opacity: 0.75;
    font-size: 12px;
    margin-left: auto;
    color: #cfd8dc;
    font-weight: 500;
}

.wallet-addr-row {
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(124,192,255,0.18);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
.wallet-addr-full {
    flex: 1; min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: #9ecdff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    user-select: all;
    -webkit-user-select: all;
}
.wallet-iconbtn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: #cfd8dc;
    border-radius: 8px;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    padding: 0;
}
.wallet-iconbtn:hover, .wallet-iconbtn:focus-visible {
    background: rgba(124,192,255,0.12);
    border-color: rgba(124,192,255,0.35);
    color: #7cc0ff;
    outline: none;
}
.wallet-iconbtn.copied { color: #2ecc71; border-color: rgba(46,204,113,0.4); }

.wallet-actions {
    display: flex; gap: 8px;
}
.wallet-actions .btn { flex: 1; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: #cfd8dc;
}
.btn-ghost:hover, .btn-ghost:focus-visible {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.22);
    outline: none;
}

/* Narrow phones — stack action buttons */
body[data-device-class="ultra-narrow"] .wallet-actions,
body[data-device-class="narrow"] .wallet-actions {
    flex-direction: column;
}
body[data-device-class="ultra-narrow"] .wallet-name {
    display: none; /* save horizontal space on Galaxy Fold inchis */
}
body[data-device-class="ultra-narrow"] .wallet-addr-full {
    font-size: 11px;
}

/* Tablet / Desktop — keep card constrained */
body[data-device-class="tablet"] .wallet-card,
body[data-device-class="desktop"] .wallet-card {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wallet-dot { animation: none; }
}

/* =====================================================
   v2026051907 — Game Over / NoHearts / Upsell polish
   - Disabled CTA state (informativ vs hidden)
   - Compact layout pe ecrane mici (<380w sau <700h)
   - Upsell modal post-ad reward
   ===================================================== */

/* CTA disabled — afisata in Game Over cand can_claim=false, dar cu motiv */
.go-cta-disabled {
    opacity: 0.55;
    filter: grayscale(0.35);
    pointer-events: none;
}
.go-cta-disabled .btn {
    cursor: not-allowed;
    opacity: 0.85;
}

/* ============ UPSELL MODAL ============ */
.upsell-card {
    max-width: 380px;
    padding: 24px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}
.upsell-badge {
    display: inline-block;
    align-self: center;
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff4757 0%, #ff7a90 100%);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 71, 87, 0.45);
    animation: upsellPulse 2s ease-in-out infinite;
}
.upsell-title {
    font-size: 1.55rem;
    margin: 4px 0 0;
    font-weight: 800;
    letter-spacing: -0.2px;
}
.upsell-mult {
    background: linear-gradient(135deg, #4ade80 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 900;
}
.upsell-sub {
    font-size: 0.9rem;
    line-height: 1.45;
    opacity: 0.82;
    margin: 0;
}
.upsell-perks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 6px 0 10px;
}
.upsell-perk {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: left;
}
.upsell-perk b { font-weight: 700; }
.upsell-perk-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}
.upsell-cta {
    background: linear-gradient(135deg, #4ade80 0%, #06b6d4 100%) !important;
    font-weight: 700;
    padding: 14px;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.upsell-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.45);
}
.upsell-later {
    background: transparent !important;
    color: #94a3b8 !important;
    font-size: 0.88rem;
    padding: 8px;
    border: 0 !important;
}

@keyframes upsellPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

/* ============ COMPACTARE PE ECRANE MICI ============ */
/* Trigger: latime sub 380px (iPhone SE, Android mic)
   SAU inaltime sub 700px (landscape pe mobil sau ecran mic vertical)
   NOTA: defaults sunt deja compacte. Aici reducem suplimentar pentru ecrane mici. */
@media (max-width: 380px), (max-height: 700px) {
    .game-over-card {
        padding: 14px 14px !important;
        padding-top: 38px !important;
        gap: 6px;
    }
    .go-trophy { width: 48px; height: 48px; top: -24px; }
    .go-trophy svg { width: 24px; height: 24px; }
    .go-title { font-size: 16px !important; margin: 0 0 2px !important; letter-spacing: 1.2px; }
    .go-subtitle { font-size: 10px; margin: 0 0 6px; }
    .go-stats { gap: 5px; margin-bottom: 6px; }
    .go-stat { padding: 6px 8px; border-radius: 10px; gap: 1px; }
    .go-stat-label { font-size: 8.5px; letter-spacing: 1px; }
    .go-stat-value { font-size: 15px; }
    .go-stat--ton .go-stat-value { gap: 2px; font-size: 12px; }
    .go-stat--ton .go-stat-value b { font-size: 12px; }
    .go-stat--ton .go-stat-value small { font-size: 8px; }

    /* Upgrade CTA */
    .go-upgrade-cta { padding: 6px 10px; gap: 5px; margin: 4px 0 3px; }
    .go-upgrade-text strong { font-size: 11.5px; line-height: 1.2; }
    .go-upgrade-text small { font-size: 9.5px; line-height: 1.2; }
    .btn-upgrade-cta { padding: 8px 10px !important; font-size: 12.5px !important; }

    /* CTA grid (Invite + Watch) */
    .go-cta-grid { gap: 5px; margin: 3px 0 3px; }
    .go-cta-card { padding: 6px 7px; gap: 5px; min-height: 70px; border-radius: 10px; }
    .go-cta-grid .go-invite-cta { padding: 6px 7px; }
    .go-cta-grid .go-adheart-cta { padding: 6px 7px; }
    .go-cta-text strong { font-size: 10.5px; line-height: 1.15; gap: 2px; }
    .go-cta-text small { font-size: 9px; line-height: 1.15; margin-top: 1px; }
    .go-cta-card .btn { padding: 6px 6px; font-size: 10.5px; }
    .btn-invite-cta, .btn-adheart-cta { padding: 6px 6px; font-size: 10.5px; }

    /* Action buttons — Play Again + Menu */
    .game-over-card > .btn { padding: 9px 12px; font-size: 13px; margin-top: 3px; }
    #btnPlayAgain { margin-top: 4px; }
    #btnBackToMenu { margin-top: 3px; }

    /* NoHearts overlay */
    .no-hearts-card { padding: 16px 14px; gap: 10px; }
    .no-hearts-icon svg { width: 44px; height: 44px; }
    .no-hearts-title { font-size: 1.15rem; }
    .no-hearts-sub { font-size: 0.82rem; margin: 0; }
    .nh-btn { padding: 10px 12px; gap: 10px; }
    .nh-icon svg { width: 18px; height: 18px; }
    .nh-title { font-size: 0.9rem; }
    .nh-desc { font-size: 0.74rem; }
    .no-hearts-foot { font-size: 0.7rem; }

    /* Upsell */
    .upsell-card { padding: 18px 16px; gap: 10px; }
    .upsell-title { font-size: 1.3rem; }
    .upsell-sub { font-size: 0.82rem; }
    .upsell-perk { padding: 8px 10px; font-size: 0.82rem; gap: 10px; }
    .upsell-perk-icon { width: 28px; height: 28px; }
    .upsell-perk-icon svg { width: 16px; height: 16px; }
    .upsell-cta { padding: 12px; font-size: 0.95rem; }
}

/* Foarte mic — landscape pe mobil sau ecran sub 600px inaltime */
@media (max-height: 600px) {
    .game-over-card {
        padding: 10px 12px !important;
        padding-top: 14px !important;
        gap: 6px;
    }
    /* Trofeul ocupa spatiu pretios pe ecrane joase → ascuns complet */
    .go-trophy { display: none; }
    .go-title { font-size: 16px !important; margin: 0 0 2px !important; }
    .go-subtitle { font-size: 10px; margin: 0 0 8px; }
    /* Stats pe orizontala (in loc de vertical) → economie de spatiu */
    .go-stats { flex-direction: row; gap: 6px; margin-bottom: 8px; }
    .go-stat {
        flex: 1;
        padding: 7px 9px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        text-align: center;
    }
    .go-stat-label { font-size: 8.5px; }
    .go-stat-value { font-size: 14px; }
    .go-upgrade-cta { padding: 7px 9px; }
    .go-upgrade-text strong { font-size: 11px; }
    .go-upgrade-text small { font-size: 9px; }
    .btn-upgrade-cta { padding: 7px 9px; font-size: 12px; }
    /* CTA grid stays 2-col chiar si pe short — landscape are latime suficienta */
    .go-cta-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .go-cta-card { padding: 7px 9px; min-height: 0; }
    .game-over-card .btn { padding: 8px; font-size: 13px; margin-top: 4px; }
    .no-hearts-card { padding: 14px 14px; }
    .no-hearts-icon { display: none; }
    .upsell-card { padding: 14px 14px; gap: 8px; }
    .upsell-perks { gap: 6px; }
}

/* ULTRA-MIC: telefoane mici cu inaltime sub 560px (iPhone SE landscape, etc.) */
@media (max-height: 560px) {
    .game-over-card {
        padding: 8px 10px !important;
        padding-top: 10px !important;
    }
    .go-title { font-size: 14px !important; }
    .go-subtitle { display: none; } /* Renuntam la subtitle */
    .go-stats { margin-bottom: 6px; }
    .go-stat { padding: 5px 7px; }
    .go-stat-value { font-size: 13px; }
    .go-upgrade-cta { padding: 6px 8px; gap: 6px; }
    .go-cta-grid { gap: 5px; }
    .go-cta-card { padding: 6px 8px; }
    .go-cta-text small { display: none; } /* Renuntam la sub-text in CTA */
    .game-over-card .btn { padding: 7px; font-size: 12.5px; }
}

/* Reduced motion — opreste pulse pe badge */
@media (prefers-reduced-motion: reduce) {
    .upsell-badge { animation: none; }
}

/* ===== Language picker (menu screen, bottom) ===== */
/* ===== Language selector — flag pill + dropdown (top-right of menu) ===== */
.lang-fab {
    position: absolute;
    top: calc(var(--tg-top-offset, 0px) + 10px);
    right: 12px;
    z-index: 40;
}
.lang-fab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    background: rgba(10, 20, 40, 0.62);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.28);
    transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.lang-fab-btn:hover { border-color: rgba(255,215,0,0.45); background: rgba(10,20,40,0.78); }
.lang-fab-btn:active { transform: scale(0.97); }
.lang-fab.open .lang-fab-btn { border-color: rgba(255,215,0,0.55); background: rgba(10,20,40,0.85); }
.lang-fab-flag { font-size: 16px; line-height: 1; flex-shrink: 0; }
.lang-fab-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lang-fab-chev { color: rgba(255,255,255,0.72); transition: transform .2s ease; flex-shrink: 0; }
.lang-fab.open .lang-fab-chev { transform: rotate(180deg); }

.lang-fab-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    max-height: min(58vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 6px;
    background: rgba(9, 16, 33, 0.96);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: langMenuIn .16s ease;
}
.lang-fab-menu[hidden] { display: none; }
@keyframes langMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lang-fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: rgba(255,255,255,0.86);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .14s ease, color .14s ease;
}
.lang-fab-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.lang-fab-item.is-active { background: rgba(255,215,0,0.14); color: #ffd700; font-weight: 700; }
.lang-fab-iflag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.lang-fab-iname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-fab-ichk { flex-shrink: 0; opacity: 0; color: #ffd700; }
.lang-fab-item.is-active .lang-fab-ichk { opacity: 1; }

/* RTL support (Arabic, Persian, Hebrew) */
html[dir="rtl"] .back-btn { transform: scaleX(-1); }
html[dir="rtl"] .lang-fab { right: auto; left: 12px; }
html[dir="rtl"] .lang-fab-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-fab-item { text-align: right; }

/* Responsive — telefoane mici */
@media (max-width: 640px) {
    .lang-fab { top: calc(var(--tg-top-offset, 0px) + 8px); right: 10px; }
    .lang-fab-btn { padding: 6px 10px; font-size: 12px; gap: 6px; }
    .lang-fab-name { max-width: 92px; }
    .lang-fab-menu { width: 200px; }
}
@media (max-width: 380px) {
    .lang-fab-btn { padding: 5px 9px; font-size: 11.5px; }
    .lang-fab-flag { font-size: 15px; }
    .lang-fab-name { max-width: 76px; }
    .lang-fab-menu { width: 184px; max-height: min(54vh, 320px); }
    .lang-fab-item { font-size: 13px; padding: 8px 9px; }
}

/* =========================================================================
   RETENTION FEATURES — Daily Login Streak + Comeback Offer
   ========================================================================= */

/* ---- STREAK CARD ---- */
.streak-card {
    max-width: 380px;
    width: 92%;
    padding: 28px 22px 22px;
    text-align: center;
    background: linear-gradient(160deg, #1a2240 0%, #0a1428 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 12px 60px rgba(255, 140, 0, 0.18), 0 0 0 1px rgba(255, 215, 0, 0.08);
    position: relative;
    overflow: hidden;
}
.streak-card::before {
    content: '';
    position: absolute;
    top: -40%; left: -40%; right: -40%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 165, 0, 0.18) 0%, transparent 65%);
    pointer-events: none;
}
.streak-close {
    position: absolute; top: 8px; right: 12px;
    background: transparent; border: none; color: #8aa0c0;
    font-size: 28px; line-height: 1; cursor: pointer;
    width: 32px; height: 32px; border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.streak-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.streak-flame {
    color: #ff8a3a;
    filter: drop-shadow(0 0 12px rgba(255, 138, 58, 0.6));
    margin-bottom: 6px;
    animation: streak-flame-pulse 1.8s ease-in-out infinite;
}
@keyframes streak-flame-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(255, 138, 58, 0.6)); }
    50%      { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(255, 200, 80, 0.9)); }
}
.streak-title {
    margin: 4px 0 2px; font-size: 22px; font-weight: 800;
    background: linear-gradient(90deg, #ffd700, #ff8a3a);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.4px;
}
.streak-sub { margin: 0 0 14px; color: #b8c4dc; font-size: 13px; }
.streak-sub b { color: #ffd700; font-weight: 700; }

.streak-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin: 0 0 18px;
}
.streak-day {
    aspect-ratio: 1 / 1.15;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    padding: 4px 2px;
    position: relative;
    font-size: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.streak-day-lbl { color: #6e7fa0; font-weight: 700; letter-spacing: 0.3px; }
.streak-day-reward { color: #d6e2f6; font-weight: 700; font-size: 11px; }
.streak-day-past {
    background: linear-gradient(160deg, rgba(124, 255, 229, 0.12), rgba(124, 255, 229, 0.04));
    border-color: rgba(124, 255, 229, 0.35);
}
.streak-day-past .streak-day-lbl { color: #7cffe5; }
.streak-day-past::after {
    content: '✓';
    position: absolute; top: 2px; right: 4px;
    color: #7cffe5; font-size: 9px; font-weight: 900;
}
.streak-day-today {
    background: linear-gradient(160deg, rgba(255, 215, 0, 0.22), rgba(255, 138, 58, 0.12));
    border-color: rgba(255, 215, 0, 0.65);
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
    animation: streak-today-pulse 1.6s ease-in-out infinite;
}
.streak-day-today .streak-day-lbl { color: #ffd700; }
.streak-day-today .streak-day-reward { color: #fff; }
@keyframes streak-today-pulse {
    0%, 100% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.45); }
    50%      { box-shadow: 0 0 28px rgba(255, 215, 0, 0.85); }
}
.streak-day-future {
    opacity: 0.62;
}
.streak-day-bonus {
    background: linear-gradient(160deg, rgba(255, 77, 109, 0.18), rgba(255, 138, 58, 0.10));
    border-color: rgba(255, 77, 109, 0.55);
}
.streak-day-bonus .streak-day-lbl { color: #ff7a90; }
.streak-day-bonusicon { position: absolute; top: 2px; right: 4px; }

.streak-reward-row {
    display: flex; justify-content: center; gap: 18px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.streak-reward-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    font-size: 13px; color: #e6ecf7; font-weight: 600;
}
.streak-reward-item b { color: #ffd700; font-weight: 800; }

.streak-missed {
    color: #ff9a8a; font-size: 12px; margin: 0 0 10px;
    padding: 8px 12px;
    background: rgba(255, 100, 80, 0.10);
    border-radius: 8px;
    border-left: 3px solid #ff7060;
}
.streak-best {
    color: #b8c4dc; font-size: 12px; margin: 0 0 10px;
}
.streak-best b { color: #ffd700; font-size: 14px; }

.btn-streak-claim {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ff8a3a 0%, #ffd700 100%);
    color: #1a1408;
    border: none;
    box-shadow: 0 8px 24px rgba(255, 138, 58, 0.4);
    text-transform: uppercase;
    margin-bottom: 8px;
    /* iOS Safari/Telegram Mobile: force tap-zone activ (fix click bug) */
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255,138,58,0.3);
    position: relative;
    z-index: 2;
}
/* Span interior nu trebuie sa intercepteze touch — paseaza la button */
.btn-streak-claim > span { pointer-events: none; }
.btn-streak-claim:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(255, 138, 58, 0.55);
}
.btn-streak-claim:disabled { opacity: 0.6; cursor: not-allowed; }

.streak-next {
    color: #8aa0c0; font-size: 12px; margin: 6px 0 0;
}
.streak-next b {
    color: #ffd700; font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 14px; letter-spacing: 1px;
}

.streak-celebrate {
    animation: streak-celebrate-pulse 0.7s ease-out;
}
@keyframes streak-celebrate-pulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.streak-float-reward {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 0 0 14px rgba(255, 215, 0, 0.9);
    pointer-events: none;
    z-index: 10;
    animation: streak-float-up 1.6s ease-out forwards;
}
.streak-float-reward b { color: #fff; }
@keyframes streak-float-up {
    0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    20%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -180%) scale(1); opacity: 0; }
}

/* ---- COMEBACK CARD ---- */
.comeback-card {
    max-width: 380px;
    width: 92%;
    padding: 28px 22px 22px;
    text-align: center;
    background: linear-gradient(160deg, #1a1f3a 0%, #0a1428 100%);
    border: 1px solid rgba(124, 255, 229, 0.25);
    box-shadow: 0 12px 60px rgba(80, 180, 255, 0.20), 0 0 0 1px rgba(124, 255, 229, 0.08);
    position: relative;
    overflow: hidden;
}
.comeback-card::before {
    content: '';
    position: absolute;
    top: -40%; left: -40%; right: -40%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(80, 180, 255, 0.18) 0%, transparent 65%);
    pointer-events: none;
}
.comeback-close {
    position: absolute; top: 8px; right: 12px;
    background: transparent; border: none; color: #8aa0c0;
    font-size: 28px; line-height: 1; cursor: pointer;
    width: 32px; height: 32px; border-radius: 8px;
}
.comeback-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.comeback-icon {
    color: #7cffe5;
    filter: drop-shadow(0 0 14px rgba(124, 255, 229, 0.7));
    margin-bottom: 6px;
    animation: comeback-gift-bounce 2s ease-in-out infinite;
}
@keyframes comeback-gift-bounce {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    50%      { transform: scale(1.08) rotate(2deg); }
}

.comeback-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7cffe5, #5cb8ff);
    color: #0a1428;
    font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
    margin-bottom: 8px;
}
.comeback-title {
    margin: 2px 0 6px;
    font-size: 22px; font-weight: 800;
    background: linear-gradient(90deg, #7cffe5, #5cb8ff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.3px;
}
.comeback-sub { margin: 0 0 16px; color: #b8c4dc; font-size: 13px; }

.comeback-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    text-align: left;
}
.comeback-perks li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid #7cffe5;
    color: #e6ecf7;
    font-size: 13px;
}
.comeback-perks li:last-child { margin-bottom: 0; }
.comeback-perks li b { color: #7cffe5; font-weight: 800; }
.comeback-boost-emoji { font-size: 18px; }

.btn-comeback-claim {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #5cb8ff 0%, #7cffe5 100%);
    color: #0a1428;
    border: none;
    box-shadow: 0 8px 24px rgba(80, 180, 255, 0.45);
    text-transform: uppercase;
    margin-bottom: 8px;
    /* iOS Safari/Telegram Mobile: force tap-zone activ */
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(124,255,229,0.3);
    position: relative;
    z-index: 2;
}
.btn-comeback-claim > span { pointer-events: none; }
.btn-comeback-claim:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(80, 180, 255, 0.6);
}
.btn-comeback-claim:disabled { opacity: 0.6; cursor: not-allowed; }

.comeback-foot {
    color: #8aa0c0;
    font-size: 11px;
    margin: 4px 0 0;
    letter-spacing: 0.3px;
}

.comeback-celebrate {
    animation: streak-celebrate-pulse 0.7s ease-out;
}

/* ---- NEAR-MISS FLOATING TEXT (game.js) ---- */
/* Pictat direct pe canvas — fara CSS necesar, dar lasam clasa pentru toast eventual */
.near-miss-flash { /* hook reserved */ }

@media (max-width: 380px) {
    .streak-day { font-size: 9px; padding: 3px 1px; }
    .streak-day-reward { font-size: 10px; }
    .streak-title, .comeback-title { font-size: 19px; }
    .streak-reward-item { font-size: 12px; padding: 6px 10px; }
}
