/* ==================================================================
   ASVIORA GAMES - premium dark theme
   Palette sampled directly from assets/img/new_logo.jpg:
   emerald/lime green + metallic gold on the logo's charcoal backdrop
   ================================================================== */

:root {
  /* charcoal base, sampled from the logo's textured backdrop */
  --bg:          #0b0c0e;
  --bg-2:        #121317;
  --surface:     #17191d;
  --surface-2:   #202329;
  --line:        #2e3239;
  --line-soft:   #23262c;

  --text:        #eaeee8;
  --muted:       #a2ab99;
  --dim:         #757d6d;

  /* logo green — the crown, the ring and the "S" */
  --green:       #8fce3f;
  --green-2:     #6aa521;
  --green-dark:  #4a7616;
  --green-lt:    #b6e857;
  /* logo gold — the "A" blade and the wordmark */
  --gold:        #d9a63c;
  --gold-2:      #a97722;
  --gold-lt:     #f0c860;

  /* semantic aliases for new code */
  --cyan:        #8fce3f;
  --cyan-2:      #b6e857;
  --purple:      #d9a63c;
  --purple-2:    #f0c860;
  --steel:       #cfd4c8;

  --grad-green:  linear-gradient(135deg, #b6e857 0%, #5c9418 100%);
  --grad-gold:   linear-gradient(135deg, #f0c860 0%, #a97722 100%);
  --grad-mix:    linear-gradient(100deg, #8fce3f 0%, #cfe57a 38%, #f0c860 72%, #d9a63c 100%);
  --grad-steel:  linear-gradient(135deg, #f3f5ef 0%, #a9b09e 48%, #666d5c 100%);

  --danger:      #fb5c7d;
  --info:        #63b58a;

  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   24px;

  --shadow:      0 18px 44px -18px rgba(0,0,0,.8);
  --shadow-glow: 0 0 0 1px rgba(143,206,63,.24), 0 14px 40px -14px rgba(143,206,63,.3);

  --nav-h:       72px;
  --ease:        cubic-bezier(.22,.68,.35,1);
  --container:   1200px;

  /* set by header.php to the real uploaded logo */
  --logo-url:    url("../img/new_logo.jpg");
}

/* ---------------- reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient background glow, tinted with the logo's green + gold */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(720px 480px at 12% -8%,  rgba(143,206,63,.13), transparent 62%),
    radial-gradient(680px 460px at 92% 4%,   rgba(217,166,60,.13), transparent 60%),
    radial-gradient(900px 620px at 50% 110%, rgba(106,165,33,.08), transparent 65%),
    /* faint hex-grid, echoing the honeycomb texture inside the logo */
    repeating-linear-gradient(60deg,  rgba(143,206,63,.028) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(-60deg, rgba(217,166,60,.028) 0 1px, transparent 1px 46px);
}

/* ------------------------------------------------------------------
   LOGO WATERMARK  —  the logo itself sits behind every page
   ------------------------------------------------------------------ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--logo-url);
  background-repeat: no-repeat;
  background-position: center 44%;
  background-size: min(86vw, 940px) auto;
  opacity: .07;
  /* the logo file has its own charcoal backdrop — screen blending drops it,
     and the radial mask stops the image edge from showing as a rectangle */
  filter: saturate(1.45) contrast(1.12) brightness(1.05);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(closest-side ellipse at center 44%,
                        #000 42%, rgba(0,0,0,.55) 68%, transparent 88%);
          mask-image: radial-gradient(closest-side ellipse at center 44%,
                        #000 42%, rgba(0,0,0,.55) 68%, transparent 88%);
  animation: logoBreathe 14s ease-in-out infinite;
}
@keyframes logoBreathe {
  0%, 100% { opacity: .06;  transform: scale(1); }
  50%      { opacity: .095; transform: scale(1.035); }
}
@media (max-width: 640px) {
  body::after { background-size: 132vw auto; opacity: .055; }
}

/* a small, sharper logo crest that can be dropped into any panel */
.logo-crest {
  background-image: var(--logo-url);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5 {
  margin: 0 0 .6em;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
p  { margin: 0 0 1.1em; }

::selection { background: rgba(143,206,63,.28); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: #343841; border-radius: 8px; border: 3px solid var(--bg-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ---------------- layout ---------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
  position: relative;
  z-index: 1;
}
.section { padding: 84px 0; position: relative; z-index: 1; }
.section-sm { padding: 52px 0; }
.section-tint { background: linear-gradient(180deg, transparent, rgba(18,19,23,.85), transparent); }

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.between { justify-content: space-between; align-items: center; }
.center { text-align: center; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:26px}.mt-4{margin-top:40px}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:26px}
.text-muted { color: var(--muted); }
.text-dim { color: var(--dim); font-size: .88rem; }
.text-green { color: var(--green); }
.text-gold { color: var(--gold); }
.nowrap { white-space: nowrap; }

.gradient-text {
  background: var(--grad-mix);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- section heading ---------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green);
  background: rgba(143,206,63,.09);
  border: 1px solid rgba(143,206,63,.24);
  padding: 7px 15px; border-radius: 100px; margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
}
.head { max-width: 660px; margin-bottom: 42px; }
.head.center { margin-inline: auto; }
.head p { color: var(--muted); font-size: 1.03rem; margin: 0; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px;
  font: inherit; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; border-radius: 100px;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              background .22s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: var(--grad-green); color: #101a08;
  box-shadow: 0 10px 26px -10px rgba(143,206,63,.55);
}
.btn-primary:hover {
  color: #101a08; transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(143,206,63,.7);
}
.btn-gold {
  background: var(--grad-gold); color: #241a06;
  box-shadow: 0 10px 26px -10px rgba(217,166,60,.5);
}
.btn-gold:hover { color: #241a06; transform: translateY(-2px); }
.btn-ghost {
  background: rgba(255,255,255,.03); color: var(--text);
  border-color: var(--line);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }
.btn-danger { background: rgba(251,92,125,.12); color: var(--danger); border-color: rgba(251,92,125,.35); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 9px 17px; font-size: .84rem; }
.btn-xs { padding: 6px 13px; font-size: .76rem; }
.btn-lg { padding: 16px 34px; font-size: 1.03rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------------- cards ---------------- */
.card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card-hover:hover {
  transform: translateY(-5px);
  border-color: rgba(143,206,63,.34);
  box-shadow: var(--shadow-glow);
}
.card-flush { padding: 0; }

/* ---------------- badges & pills ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 100px;
  background: rgba(255,255,255,.05); color: var(--muted);
  border: 1px solid var(--line);
}
.badge-green { background: rgba(143,206,63,.13); color: var(--green); border-color: rgba(143,206,63,.3); }
.badge-gold  { background: rgba(217,166,60,.13); color: var(--gold);  border-color: rgba(217,166,60,.3); }
.badge-red   { background: rgba(251,92,125,.13); color: var(--danger);border-color: rgba(251,92,125,.3); }
.badge-info  { background: rgba(99,181,138,.13); color: var(--info);  border-color: rgba(99,181,138,.3); }

.coin-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: .86rem;
  padding: 7px 14px; border-radius: 100px;
  background: rgba(217,166,60,.1); color: var(--gold);
  border: 1px solid rgba(217,166,60,.28);
}

/* ==================================================================
   HEADER / NAV
   ================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(11,12,14,.72);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line-soft);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(11,12,14,.94);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.9);
}
.nav-wrap { display: flex; align-items: center; gap: 26px; width: 100%; min-width: 0; }

.brand { display: flex; align-items: center; gap: 11px; flex: 0 1 auto; min-width: 0; }
.brand img { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; flex-shrink: 0; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name {
  font-size: 1.06rem; font-weight: 900; letter-spacing: .04em;
  background: var(--grad-mix);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub { font-size: .58rem; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 9px 15px; border-radius: 100px;
  font-size: .93rem; font-weight: 600; color: var(--muted);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav-links a.active { color: var(--green); background: rgba(143,206,63,.1); }

.nav-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* user dropdown */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 13px 5px 5px; border-radius: 100px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: border-color .2s var(--ease);
}
.user-btn:hover { border-color: rgba(143,206,63,.4); }
.user-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.user-drop {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 232px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all .22s var(--ease);
}
.user-menu.open .user-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.user-drop-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.user-drop a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  font-size: .9rem; font-weight: 600; color: var(--muted);
}
.user-drop a:hover { background: rgba(143,206,63,.09); color: var(--green); }
.user-drop a.danger:hover { background: rgba(251,92,125,.1); color: var(--danger); }

/* burger */
.burger {
  display: none; width: 42px; height: 42px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 11px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform .28s var(--ease), opacity .2s var(--ease);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.mobile-nav {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 190;
  background: rgba(11,12,14,.98);
  backdrop-filter: blur(14px);
  padding: 26px 20px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .34s var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; font-size: 1.08rem; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a.active { color: var(--green); }
.mobile-nav a::after { content: "\203A"; color: var(--dim); font-size: 1.3rem; }
.mobile-nav .btn { margin-top: 12px; border-bottom: 0; justify-content: center; font-size: .97rem; }
.mobile-nav .btn::after { content: none; }
.mobile-nav .btn-primary { color: #101a08; }
.mobile-nav > .mt-3 { padding-top: 18px; }
body.nav-open { overflow: hidden; }

/* ==================================================================
   HERO
   ================================================================== */
.hero { position: relative; padding: 92px 0 78px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.08fr .92fr;
  gap: 54px; align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 38px; }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats .st-num {
  font-size: 1.75rem; font-weight: 900; line-height: 1;
  background: var(--grad-mix); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats .st-lbl {
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--dim); margin-top: 6px;
}

/* floating game tiles in hero */
.hero-visual { position: relative; min-height: 650px; }
.float-card {
  position: absolute;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 20px; padding: 14px 14px 16px;
  box-shadow: var(--shadow);
  animation: floaty 7s ease-in-out infinite;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  overflow: hidden;
}
.float-card:hover { border-color: rgba(143,206,63,.4); box-shadow: var(--shadow-glow); }
.float-card .fc-thumb {
  width: 100%; height: 118px; border-radius: 14px; margin-bottom: 10px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, #272a31, #121317 72%);
  border: 1px solid var(--line-soft);
}
.float-card .fc-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 13px; transition: transform .4s var(--ease); }
.float-card:hover .fc-thumb img { transform: scale(1.06); }
.float-card .fc-icon { font-size: 2.8rem; line-height: 1; }
.float-card .fc-title { font-weight: 800; font-size: 1.05rem; color: var(--text); padding: 0 2px; }
.float-card .fc-meta { font-size: .8rem; color: var(--dim); padding: 0 2px; }
/* stacked with a clear gap between each card, so they never touch */
.fc-1 { top: 0;     left: 0;   width: 250px; animation-delay: 0s; }
.fc-2 { top: 220px; right: 0;  width: 260px; animation-delay: -2.3s; }
.fc-3 { top: 440px; left: 8%;  width: 250px; animation-delay: -4.6s; }
/* keep the drift smaller than the gap so the float never closes it */
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(-.6deg); }
  50%     { transform: translateY(-8px) rotate(.8deg); }
}
.hero-orb {
  position: absolute; top: 50%; left: 50%;
  width: 360px; height: 360px; transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143,206,63,.2), transparent 66%);
  filter: blur(34px);
  animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:translate(-50%,-50%) scale(1);opacity:.75} 50%{transform:translate(-50%,-50%) scale(1.14);opacity:1} }

/* ==================================================================
   GAME CARDS
   ================================================================== */
.game-card { display: flex; flex-direction: column; padding: 0; }
.game-thumb {
  position: relative; aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, #272a31, #121317 72%);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-thumb .g-icon {
  font-size: 3.5rem; line-height: 1;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.6));
  transition: transform .45s var(--ease);
}
.card-hover:hover .game-thumb .g-icon { transform: scale(1.14) rotate(-7deg); }
.game-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(143,206,63,.09), transparent 55%);
}
.game-tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.game-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.game-body h3 { margin-bottom: 6px; font-size: 1.16rem; }
.game-body p { font-size: .9rem; color: var(--muted); margin-bottom: 16px; flex: 1; }
.game-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 15px; border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------------------------
   ARENA TILES — the Quiz and the Daily Spin use the same card as the
   three HTML5 games (see includes/arena.php) so all five read as one
   set. These two rules only tint them so they are still recognisable
   at a glance: quiz = green, spin = gold.
   ------------------------------------------------------------------ */
.arena-quiz .game-thumb {
  background: radial-gradient(circle at 50% 42%, #23301a, #121317 72%);
}
.arena-quiz .game-thumb::after {
  background: linear-gradient(200deg, rgba(143,206,63,.2), transparent 58%);
}
.arena-spin .game-thumb {
  background: radial-gradient(circle at 50% 42%, #322a17, #121317 72%);
}
.arena-spin .game-thumb::after {
  background: linear-gradient(200deg, rgba(217,166,60,.2), transparent 58%);
}
.arena-chess .game-thumb {
  background: radial-gradient(circle at 50% 42%, #1a2936, #121317 72%);
}
.arena-chess .game-thumb::after {
  background: linear-gradient(200deg, rgba(56,189,248,.2), transparent 58%);
}
.arena-quiz, .arena-spin, .arena-chess { position: relative; }
/* a thin coloured cap so the two extras stand out inside the grid */
.arena-quiz::before, .arena-spin::before, .arena-chess::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 3;
}
.arena-quiz::before { background: var(--grad-green); }
.arena-spin::before { background: var(--grad-gold); }
.arena-chess::before { background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%); }
.arena-quiz .g-icon, .arena-spin .g-icon, .arena-chess .g-icon { font-size: 3.9rem; }
.card-hover.arena-spin:hover .g-icon { transform: scale(1.1) rotate(22deg); }

/* count pill inside the category tabs */
.tabs .tab-n {
  display: inline-block; margin-left: 5px;
  padding: 0 6px; border-radius: 20px;
  font-size: .74em; font-weight: 800;
  background: rgba(255,255,255,.09);
}
.tabs a.active .tab-n { background: rgba(0,0,0,.18); }

/* ---------- daily-spin prize ladder (home page) ---------- */
.spin-ladder { display: flex; flex-direction: column; gap: 9px; }
.spin-ladder .sl-row { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.spin-ladder .sl-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.spin-ladder .sl-coin {
  width: 62px; flex-shrink: 0; font-weight: 800; color: var(--gold);
}
.spin-ladder .sl-bar {
  flex: 1; height: 7px; border-radius: 6px; overflow: hidden;
  background: var(--surface-2); min-width: 40px;
}
.spin-ladder .sl-bar i { display: block; height: 100%; border-radius: 6px; }
.spin-ladder .sl-pc { width: 38px; text-align: right; color: var(--dim); flex-shrink: 0; }

/* ==================================================================
   FEATURE / STEP / STAT
   ================================================================== */
.feature { text-align: left; }
.feature .f-ico {
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: rgba(143,206,63,.1); border: 1px solid rgba(143,206,63,.24);
  margin-bottom: 16px;
}
.feature h3 { font-size: 1.06rem; margin-bottom: 7px; }
.feature p { font-size: .9rem; color: var(--muted); margin: 0; }

.step { position: relative; padding-left: 62px; }
.step .s-num {
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 1.02rem;
  background: var(--grad-green); color: #101a08;
}
.step h3 { font-size: 1.02rem; margin-bottom: 5px; }
.step p { font-size: .89rem; color: var(--muted); margin: 0; }

.stat-card { text-align: center; padding: 28px 18px; }
.stat-card .sc-num {
  font-size: 2.15rem; font-weight: 900; line-height: 1;
  background: var(--grad-mix); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .sc-lbl {
  font-size: .74rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--dim); margin-top: 9px;
}

/* ==================================================================
   TABLES / LEADERBOARD
   ================================================================== */
.table-wrap {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-2);
}
/* Horizontal scroll for wide tables, with edge shadows that appear
   only while there is more content to scroll to. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(90deg, var(--bg-2) 30%, rgba(18,19,23,0)) left center,
    linear-gradient(90deg, rgba(18,19,23,0), var(--bg-2) 70%) right center,
    radial-gradient(farthest-side at 0 50%,   rgba(0,0,0,.42), rgba(0,0,0,0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.42), rgba(0,0,0,0)) right center;
  background-repeat: no-repeat;
  background-size: 44px 100%, 44px 100%, 15px 100%, 15px 100%;
  background-attachment: local, local, scroll, scroll;
}
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { border-width: 2px; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
table.tbl th {
  text-align: left; padding: 14px 18px;
  font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: var(--dim); background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 14px 18px; font-size: .92rem;
  border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
table.tbl tbody tr { transition: background .18s var(--ease); }
table.tbl tbody tr:hover { background: rgba(143,206,63,.045); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tr.is-me { background: rgba(143,206,63,.08); }

.rank {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  font-weight: 900; font-size: .86rem;
  background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--line);
}
.rank.r1 { background: var(--grad-gold); color: #241a06; border-color: transparent; }
.rank.r2 { background: linear-gradient(135deg,#e4e7de,#a3a99b); color: #16181c; border-color: transparent; }
.rank.r3 { background: linear-gradient(135deg,#e0a06a,#a86b32); color: #17110a; border-color: transparent; }

.u-cell { display: flex; align-items: center; gap: 11px; }
.u-cell img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.u-cell .u-name { font-weight: 700; font-size: .92rem; }
.u-cell .u-sub { font-size: .76rem; color: var(--dim); }

/* podium */
.podium { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; align-items: end; margin-bottom: 30px; }
.podium .p-item { text-align: center; padding: 24px 14px; }
.podium .p-1 { order: 2; padding-top: 34px; border-color: rgba(217,166,60,.4); }
.podium .p-2 { order: 1; }
.podium .p-3 { order: 3; }
.podium img {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 12px;
  object-fit: cover; border: 2px solid var(--line);
}
.podium .p-1 img { width: 74px; height: 74px; border-color: var(--gold); }
.podium .p-name { font-weight: 800; font-size: .96rem; }
.podium .p-score { font-size: 1.2rem; font-weight: 900; }
.podium .p-crown { font-size: 1.5rem; margin-bottom: 4px; }

/* ==================================================================
   FORMS
   ================================================================== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: var(--muted);
}
.form-label .req { color: var(--danger); }
.form-control, .form-select, textarea.form-control {
  width: 100%; padding: 13px 15px;
  font: inherit; font-size: .95rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.form-control::placeholder { color: #6d7466; }
.form-control:focus, .form-select:focus {
  outline: 0; border-color: var(--green);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(143,206,63,.13);
}
textarea.form-control { min-height: 130px; resize: vertical; line-height: 1.6; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393a1b3' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px; cursor: pointer;
}
.form-hint { font-size: .78rem; color: var(--dim); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- show / hide password ---- */
.pw-wrap { position: relative; display: block; }
.pw-wrap .form-control { padding-right: 46px; }
.pw-toggle {
  position: absolute; top: 0; right: 0;
  height: 100%; width: 44px;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--dim); cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.pw-toggle:hover { color: var(--green); background: rgba(143,206,63,.07); }
.pw-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.pw-toggle svg { width: 19px; height: 19px; pointer-events: none; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.is-on { color: var(--green); }
.pw-toggle.is-on .eye-on  { display: none; }
.pw-toggle.is-on .eye-off { display: block; }

.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .88rem; color: var(--muted); cursor: pointer;
}
.check input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--green-2); flex-shrink: 0; }

/* auth card */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 46px 20px; }
.auth-card { width: 100%; max-width: 452px; padding: 36px 32px; }
.auth-card .auth-logo { width: 62px; height: 62px; border-radius: 16px; margin: 0 auto 18px; }

/* alerts */
.alert {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 17px; margin-bottom: 18px;
  border-radius: var(--radius-sm); font-size: .91rem; font-weight: 600;
  border: 1px solid;
}
/* Only the leading icon holds its width. Pinning every span meant a long
   message could not wrap and ran straight out of the box. */
.alert > span:first-child { flex-shrink: 0; font-size: 1rem; }
.alert > span { min-width: 0; overflow-wrap: anywhere; }
.alert-success { background: rgba(143,206,63,.09); border-color: rgba(143,206,63,.3); color: var(--green); }
.alert-error   { background: rgba(251,92,125,.09); border-color: rgba(251,92,125,.3); color: var(--danger); }
.alert-info    { background: rgba(99,181,138,.09); border-color: rgba(99,181,138,.3); color: var(--info); }

/* ==================================================================
   BLOG
   ================================================================== */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-cover {
  aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  background: linear-gradient(135deg,#212429,#141519);
  display: grid; place-items: center;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card-hover:hover .post-cover img { transform: scale(1.06); }
.post-cover .pc-fallback { font-size: 2.4rem; opacity: .32; }
.post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .76rem; color: var(--dim); margin-bottom: 11px;
}
.post-body h3 { font-size: 1.12rem; margin-bottom: 9px; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--green); }
.post-body p { font-size: .89rem; color: var(--muted); margin-bottom: 15px; flex: 1; }

/* article */
.article { max-width: 780px; margin-inline: auto; }
.article-hero { margin-bottom: 34px; }
.article-hero img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line-soft); }
.article-content { font-size: 1.05rem; line-height: 1.82; color: #d2d6cb; }
.article-content h2 { font-size: 1.55rem; margin: 2em 0 .7em; color: var(--text); }
.article-content h3 { font-size: 1.24rem; margin: 1.7em 0 .6em; color: var(--text); }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 1.3em; }
.article-content li { margin-bottom: .55em; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; }
.article-content img { border-radius: var(--radius-sm); margin: 1.6em 0; border: 1px solid var(--line-soft); }
.article-content blockquote {
  margin: 1.7em 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--green); color: var(--muted); font-style: italic;
}
.article-content code {
  background: var(--surface-2); padding: 2px 7px; border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .88em; color: var(--gold);
}
.article-content pre {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px; overflow-x: auto;
}
.article-content pre code { background: none; padding: 0; color: var(--text); }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }

/* ==================================================================
   GAME PLAYER PAGE
   ================================================================== */
.play-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.play-frame {
  position: relative; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.play-frame iframe { width: 100%; height: 660px; border: 0; display: block; background: var(--bg-2); }
.play-side .side-box { margin-bottom: 18px; }
.play-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: .89rem; }
.kv + .kv { border-top: 1px solid var(--line-soft); }
.kv .k { color: var(--dim); }
.kv .v { font-weight: 700; }

/* ==================================================================
   CTA / NEWSLETTER
   ================================================================== */
.cta-band {
  border-radius: var(--radius-lg);
  padding: 54px 44px;
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(143,206,63,.15), transparent 60%),
    radial-gradient(600px 300px at 88% 100%, rgba(217,166,60,.13), transparent 60%),
    linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  text-align: center;
}
.subscribe { display: flex; gap: 10px; max-width: 440px; margin: 22px auto 0; }
.subscribe .form-control { flex: 1; }

/* ==================================================================
   FOOTER
   ================================================================== */
.site-footer {
  margin-top: 72px;
  background: linear-gradient(180deg, var(--bg-2), #08090b);
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 0; position: relative; z-index: 1;
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 36px; padding-bottom: 40px;
}
.foot-col h4 {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 16px; font-weight: 800;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 10px; }
.foot-col a { color: var(--muted); font-size: .91rem; }
.foot-col a:hover { color: var(--green); }
.foot-about p { font-size: .91rem; color: var(--muted); max-width: 330px; }

.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--muted);
  transition: all .24s var(--ease);
}
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { transform: translateY(-3px); color: #fff; border-color: transparent; }
.socials a.fb:hover { background: #1877f2; }
.socials a.ig:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.socials a.yt:hover { background: #ff0000; }
.socials a.wa:hover { background: #25d366; }
.socials a.tw:hover { background: #1d9bf0; }

.contact-lines { list-style: none; padding: 0; margin: 0; }
.contact-lines li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9rem; color: var(--muted); margin-bottom: 12px;
}
.contact-lines .ci { color: var(--green); flex-shrink: 0; }

/* ---------- install-as-an-app band ---------- */
.foot-install {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(520px 200px at 8% 0%,  rgba(143,206,63,.14), transparent 68%),
    radial-gradient(420px 200px at 96% 100%, rgba(217,166,60,.12), transparent 66%),
    var(--surface);
  box-shadow: 0 14px 40px -22px rgba(0,0,0,.9);
  position: relative; overflow: hidden;
}
.foot-install::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.foot-install .fi-icon img {
  width: 58px; height: 58px; border-radius: 15px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(143,206,63,.28), 0 10px 26px -12px rgba(143,206,63,.5);
}
.foot-install .fi-copy { flex: 1 1 260px; min-width: 0; }
.foot-install h4 {
  margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; color: var(--text);
}
.foot-install p { margin: 0; font-size: .89rem; color: var(--muted); line-height: 1.55; }
.foot-install .fi-actions {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.foot-install .fi-actions .btn { white-space: nowrap; }
/* a soft pulse once the browser has told us an install is actually possible */
.foot-install.ready .fi-icon img { animation: fiPulse 2.6s var(--ease) infinite; }
@keyframes fiPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(143,206,63,.28), 0 10px 26px -12px rgba(143,206,63,.5); }
  50%      { box-shadow: 0 0 0 1px rgba(143,206,63,.55), 0 12px 34px -10px rgba(143,206,63,.8); }
}
.foot-install.done { border-color: rgba(143,206,63,.45); }

@media (max-width: 640px) {
  .foot-install { flex-direction: column; text-align: center; padding: 24px 18px; }
  .foot-install .fi-actions { width: 100%; flex-direction: column; }
  .foot-install .fi-actions .btn { width: 100%; }
}

/* ---------- manual "add to home screen" sheet ---------- */
.install-sheet {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(8,9,11,.78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: isFade .2s var(--ease);
}
.install-sheet[hidden] { display: none; }
@keyframes isFade { from { opacity: 0 } to { opacity: 1 } }
.install-sheet .is-card {
  position: relative;
  width: 100%; max-width: 440px; max-height: 86vh; overflow-y: auto;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 80px -30px #000;
  animation: isRise .26s var(--ease);
}
@keyframes isRise { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }
.install-sheet h3 { font-size: 1.2rem; margin-bottom: 18px; padding-right: 28px; }
.install-sheet .is-close {
  position: absolute; top: 12px; right: 14px;
  border: 0; background: none; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--dim);
  padding: 4px 8px; border-radius: 8px;
}
.install-sheet .is-close:hover { color: var(--text); background: var(--surface-2); }
.install-sheet .is-steps h4 {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green); margin-bottom: 12px;
}
.install-sheet ol { margin: 0; padding-left: 20px; }
.install-sheet li { color: var(--muted); font-size: .93rem; margin-bottom: 11px; line-height: 1.6; }
.install-sheet li b { color: var(--text); }
.install-sheet .is-key {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--gold);
}

.foot-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 20px 0;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  font-size: .85rem; color: var(--dim);
}
.foot-bottom a { color: var(--muted); }

/* ==================================================================
   PAGE HEADER (inner pages)
   ================================================================== */
.page-hero {
  padding: 58px 0 44px;
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(760px 300px at 50% -30%, rgba(143,206,63,.11), transparent 65%);
  text-align: center;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: var(--muted); max-width: 620px; margin: 0 auto; }
.crumb { font-size: .84rem; color: var(--dim); margin-bottom: 14px; }
.crumb a { color: var(--muted); }

/* ==================================================================
   PAGINATION / TABS / EMPTY
   ================================================================== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 13px;
  display: grid; place-items: center;
  border-radius: 11px; font-size: .9rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: all .2s var(--ease);
}
.pagination a:hover { border-color: var(--green); color: var(--green); }
.pagination .current { background: var(--grad-green); color: #101a08; border-color: transparent; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tabs a {
  padding: 9px 18px; border-radius: 100px;
  font-size: .88rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.tabs a:hover { border-color: rgba(143,206,63,.4); color: var(--text); }
.tabs a.active { background: var(--grad-green); color: #101a08; border-color: transparent; }

.empty { text-align: center; padding: 62px 24px; }
.empty .em-ico { font-size: 3rem; opacity: .35; margin-bottom: 14px; }
.empty h3 { font-size: 1.14rem; }
.empty p { color: var(--muted); font-size: .93rem; max-width: 400px; margin: 0 auto 20px; }

/* progress bar */
.bar { height: 7px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 100px; background: var(--grad-green); transition: width .5s var(--ease); }

/* ==================================================================
   REVEAL ANIMATION
   ================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */

/* Nothing may push the page wider than the viewport. */
.container, .grid, .row, .card, .hero-grid, .play-layout, .foot-grid { min-width: 0; }
.grid > *, .row > *, .hero-grid > *, .play-layout > *, .foot-grid > * { min-width: 0; }
h1, h2, h3, h4, p, li, td, th, .u-name, .u-sub { overflow-wrap: break-word; }
.article-content a, .foot-col a, .contact-lines a { overflow-wrap: anywhere; }

@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .play-layout { grid-template-columns: 1fr; }
  .play-frame iframe { height: 560px; }
}

/* the nav now carries 8 links, so it needs the drawer a little earlier */
@media (max-width: 1180px) {
  .nav-links a { padding: 9px 11px; font-size: .89rem; }
  .nav-wrap { gap: 16px; }
}

@media (max-width: 1040px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .nav-cta .btn-ghost { display: none; }
  .nav-wrap { gap: 12px; }
  /* .nav-links carried the auto margin on desktop; hand it to .nav-cta here */
  .nav-cta { margin-left: auto; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { min-height: 580px; order: -1; }
  .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section { padding: 62px 0; }
  .cta-band { padding: 40px 24px; }
  .page-hero { padding: 46px 0 36px; }
}

/* ---- header has to survive narrow screens ----
   The signed-in username must stay visible at EVERY width:
   header pill -> "Hi, name" chip -> drawer identity card. */
@media (max-width: 780px) {
  .user-btn .u-handle { display: none; }     /* avatar only in the pill... */
  .hello-user { display: inline-flex; }      /* ...name moves to its own chip */
  .user-btn { padding: 5px; }
  .user-drop { right: 0; min-width: 210px; }
}
@media (max-width: 600px) {
  .coin-pill { display: none; }              /* shown in the drawer instead */
  .hello-user { max-width: 120px; }
}
/* below this the drawer's identity card carries the username */
@media (max-width: 470px) {
  .hello-user { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; --radius: 14px; }
  body { font-size: 15.5px; }
  .container { padding-inline: 16px; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }
  .section-sm { padding: 36px 0; }
  .hero { padding: 40px 0 44px; }

  /* The floating stack becomes a compact swipeable row —
     no absolute positioning, so nothing can overlap or overflow. */
  .hero-visual {
    min-height: 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    /* "safe" keeps the first card reachable when the row does overflow */
    justify-content: safe center;
    padding: 4px 16px 14px;
    margin-inline: -16px;
    scrollbar-width: none;
    background: radial-gradient(320px 180px at 50% 45%, rgba(143,206,63,.13), transparent 70%);
  }
  .hero-visual::-webkit-scrollbar { display: none; }
  .hero-orb { display: none; }
  .float-card {
    position: static;
    flex: 0 0 168px;
    width: auto;
    animation: none;
    scroll-snap-align: center;
    padding: 10px 10px 12px;
    border-radius: 16px;
  }
  .fc-1, .fc-2, .fc-3 { top: auto; left: auto; right: auto; bottom: auto; width: auto; display: block; }
  .float-card .fc-thumb { height: 96px; margin-bottom: 8px; }
  .float-card .fc-icon { font-size: 2.5rem; }
  .float-card .fc-title { font-size: .95rem; }
  .float-card .fc-meta { font-size: .75rem; }

  .hero-stats { gap: 0; display: grid; grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .hero-stats .st-num { font-size: 1.5rem; }
  .btn { padding: 12px 22px; }
  .btn-lg { padding: 14px 26px; font-size: .97rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand-sub { display: none; }
  .auth-card { padding: 28px 20px; }
  .auth-wrap { padding: 30px 16px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; padding-bottom: 30px; }
  .foot-bottom { flex-direction: column; text-align: center; gap: 8px; }
  .podium { grid-template-columns: 1fr; }
  .podium .p-1, .podium .p-2, .podium .p-3 { order: 0; padding-top: 24px; }
  .play-frame iframe { height: 560px; max-height: 82vh; }
  .play-head { gap: 12px; }
  .subscribe { flex-direction: column; }
  .article-content { font-size: 1rem; }
  table.tbl th, table.tbl td { padding: 12px 14px; }
  .site-footer { margin-top: 48px; padding-top: 42px; }
  .tabs { gap: 6px; }
  .tabs a { padding: 8px 14px; font-size: .83rem; }
  .card { padding: 20px 18px; }
  .cta-band { padding: 32px 20px; }
  .pagination a, .pagination span { min-width: 38px; height: 38px; font-size: .85rem; }
}

@media (max-width: 420px) {
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: .96rem; }
  .float-card { flex-basis: 152px; }
  .float-card .fc-thumb { height: 86px; }
  .badge { font-size: .66rem; padding: 4px 9px; }
  .hero-stats .st-num { font-size: 1.35rem; }
}

/* ==================================================================
   TOP CONTACT BAR — email, phone and the social profiles
   ================================================================== */
.topbar {
  position: relative; z-index: 201;
  background: linear-gradient(90deg, rgba(143,206,63,.1), rgba(217,166,60,.1));
  border-bottom: 1px solid var(--line-soft);
  font-size: .82rem;
}
.topbar-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 38px; flex-wrap: wrap;
}
.tb-left { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; min-width: 0; }
.tb-item {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tb-item span:first-child { color: var(--cyan); }
.tb-item:hover { color: var(--cyan); }

.tb-social { display: flex; align-items: center; gap: 6px; }
.tb-social a {
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  color: var(--dim); transition: all .2s var(--ease);
}
.tb-social a svg { width: 14px; height: 14px; }
.tb-social a:hover { color: #fff; transform: translateY(-1px); }
.tb-social a.fb:hover { background: #1877f2; }
.tb-social a.ig:hover { background: linear-gradient(45deg,#f09433,#dc2743,#bc1888); }
.tb-social a.yt:hover { background: #ff0000; }
.tb-social a.wa:hover { background: #25d366; }
.tb-social a.tw:hover { background: #1d9bf0; }

@media (max-width: 640px) {
  .topbar { font-size: .76rem; }
  .topbar-in { justify-content: center; gap: 10px; min-height: 34px; }
  .tb-left { gap: 14px; }
  .tb-phone { display: none; }
  .tb-item { max-width: 58vw; }
}

/* ==================================================================
   HEADER — signed-in identity (fix: username was hidden on mobile)
   ================================================================== */
.hello-user {
  display: none; align-items: baseline; gap: 6px;   /* enabled at <=780px */
  font-size: .86rem; font-weight: 700; color: var(--muted);
  max-width: 190px; overflow: hidden;
}
.hello-user b {
  color: var(--cyan); font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-btn .u-handle { font-weight: 800; }

/* the drawer now carries a full identity card */
.drawer-user {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 18px;
  background: linear-gradient(150deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line); border-radius: 14px;
}
.drawer-user img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.drawer-user .du-name { font-weight: 800; font-size: 1rem; line-height: 1.25; }
.drawer-user .du-sub  { font-size: .78rem; color: var(--dim); }
.mobile-nav .drawer-user::after { content: none; }

/* ==================================================================
   QUIZ
   ================================================================== */
.quiz-levels { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.level-card { text-align: center; padding: 28px 20px; position: relative; }
.level-card .lv-ico { font-size: 2.5rem; line-height: 1; margin-bottom: 12px; }
.level-card h3 { margin-bottom: 6px; }
.level-card .lv-meta { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.level-card.lv-easy  { border-color: rgba(143,206,63,.34); }
.level-card.lv-mid   { border-color: rgba(207,229,122,.34); }
.level-card.lv-hard  { border-color: rgba(217,166,60,.4); }

.quiz-shell { max-width: 780px; margin-inline: auto; }

.quiz-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.quiz-bar .qb-step { font-size: .82rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); }

/* countdown ring */
.timer-ring { position: relative; width: 62px; height: 62px; flex-shrink: 0; }
.timer-ring svg { width: 62px; height: 62px; transform: rotate(-90deg); display: block; }
.timer-ring .tr-track { fill: none; stroke: var(--surface-2); stroke-width: 6; }
.timer-ring .tr-bar {
  fill: none; stroke: var(--cyan); stroke-width: 6; stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke .3s var(--ease);
}
.timer-ring.warn .tr-bar { stroke: #fbbf24; }
.timer-ring.danger .tr-bar { stroke: var(--danger); }
.timer-ring .tr-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 900; font-size: 1.02rem;
}
.timer-ring.danger .tr-num { color: var(--danger); animation: tick .9s ease-in-out infinite; }
@keyframes tick { 0%,100% { transform: scale(1); } 50% { transform: scale(1.16); } }

.q-card { padding: 30px 28px; }
.q-text { font-size: 1.3rem; font-weight: 800; line-height: 1.42; margin-bottom: 24px; }
.q-image { border-radius: var(--radius-sm); margin-bottom: 20px; border: 1px solid var(--line-soft); }

.opt-list { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; text-align: left;
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
}
.opt:hover:not([disabled]) { border-color: var(--cyan); background: rgba(143,206,63,.07); transform: translateX(3px); }
.opt .opt-key {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 9px;
  font-weight: 900; font-size: .84rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.opt.is-right { border-color: #22c55e; background: rgba(34,197,94,.12); color: #86efac; }
.opt.is-right .opt-key { background: #22c55e; color: #04140a; border-color: transparent; }
.opt.is-wrong { border-color: var(--danger); background: rgba(251,92,125,.12); color: #fda4b5; }
.opt.is-wrong .opt-key { background: var(--danger); color: #1a0410; border-color: transparent; }
.opt[disabled] { cursor: default; }

.q-explain {
  margin-top: 20px; padding: 15px 17px;
  background: rgba(143,206,63,.07); border: 1px solid rgba(143,206,63,.24);
  border-radius: var(--radius-sm); font-size: .92rem; color: var(--muted);
}
.q-explain b { color: var(--cyan); }

.quiz-progress { display: flex; gap: 5px; margin-bottom: 20px; }
.quiz-progress i {
  flex: 1; height: 5px; border-radius: 100px; background: var(--surface-2);
  transition: background .3s var(--ease);
}
.quiz-progress i.ok  { background: #22c55e; }
.quiz-progress i.bad { background: var(--danger); }
.quiz-progress i.now { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* result screen */
.quiz-result { text-align: center; padding: 44px 28px; }
.quiz-result .qr-score {
  font-size: 3.4rem; font-weight: 900; line-height: 1;
  background: var(--grad-mix); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.quiz-result .qr-sub { color: var(--muted); margin-bottom: 26px; }
.qr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0; }
.qr-stats .qs { padding: 16px 10px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; }
.qr-stats .qs b { display: block; font-size: 1.3rem; font-weight: 900; }
.qr-stats .qs span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* ---- copy protection: applied to the question + answers ---- */
.noselect, .noselect * {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.noselect img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
@media print {
  .noselect { visibility: hidden !important; }
  .quiz-shell::before {
    content: "Quiz content cannot be printed.";
    display: block; color: #000; font: 700 18px/1.6 sans-serif;
  }
}

/* ==================================================================
   DAILY SPIN WHEEL
   ================================================================== */
.spin-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.spin-stage {
  position: relative; display: grid; place-items: center;
  padding: 34px 20px 30px;
  background:
    radial-gradient(520px 340px at 50% 42%, rgba(143,206,63,.13), transparent 68%),
    radial-gradient(420px 300px at 50% 90%, rgba(217,166,60,.12), transparent 66%),
    linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
.wheel-holder { position: relative; width: min(400px, 82vw); aspect-ratio: 1; }
.wheel {
  width: 100%; height: 100%; border-radius: 50%;
  transition: transform 5.4s cubic-bezier(.16,.84,.24,1);
  filter: drop-shadow(0 20px 44px rgba(0,0,0,.7));
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 27%; height: 27%; border-radius: 50%;
  background: linear-gradient(150deg, #202329, #0e0f12);
  border: 3px solid rgba(143,206,63,.5);
  box-shadow: 0 0 26px rgba(143,206,63,.35), inset 0 0 22px rgba(0,0,0,.8);
  display: grid; place-items: center;
  z-index: 3;
}
.wheel-hub .logo-crest { width: 74%; height: 74%; border-radius: 50%; opacity: .95; }
.wheel-pointer {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 4;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid var(--cyan);
  filter: drop-shadow(0 3px 10px rgba(143,206,63,.8));
}
.wheel.is-spinning { will-change: transform; }

.spin-prizes { list-style: none; margin: 0; padding: 0; }
.spin-prizes li {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; font-size: .9rem;
  border-bottom: 1px solid var(--line-soft);
}
.spin-prizes li:last-child { border-bottom: 0; }
.spin-prizes .sp-dot { width: 13px; height: 13px; border-radius: 4px; flex-shrink: 0; }
.spin-prizes .sp-amt { margin-left: auto; font-weight: 800; color: var(--gold); }

.spin-win {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; text-align: center;
  background: rgba(11,12,14,.9); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease);
  padding: 24px;
}
.spin-win.show { opacity: 1; visibility: visible; }
.spin-win .sw-amt {
  font-size: 3.2rem; font-weight: 900; line-height: 1;
  background: var(--grad-mix); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.countdown-next {
  display: inline-flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums; font-weight: 800; color: var(--cyan);
}

@media (max-width: 900px) {
  .spin-wrap { grid-template-columns: 1fr; }
  .quiz-levels { grid-template-columns: 1fr; }
  .qr-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .q-card { padding: 22px 18px; }
  .q-text { font-size: 1.12rem; }
  .opt { padding: 14px 15px; font-size: .95rem; }
}

/* print */
@media print {
  .site-header, .site-footer, .burger, .mobile-nav, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  body::before, body::after { display: none !important; }
}
