*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
:root {
  --purple:  #8B5CF6;
  --purple2: #7C3AED;
  --purple3: #6D28D9;
  --cyan:    #06B6D4;
  --yellow:  #F59E0B;
  --bg:      #0B0F1A;
  --card:    #111827;
  --muted:   #6B7280;
  --border:  rgba(255,255,255,0.07);
  --r-xl:    22px;
  --r-lg:    18px;
  --r-md:    14px;
}
html { background: var(--bg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #fff;
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
.page {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.scroll-area {
  padding: 6px 15px 100px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  z-index: 2;
}

/* STARS */
#stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle var(--d,4s) ease-in-out infinite var(--delay,0s);
}
@keyframes twinkle {
  0%,100% { opacity: var(--lo,.06); transform: scale(1); }
  50%      { opacity: var(--hi,.35); transform: scale(1.3); }
}

/* TOP BAR */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 15px 10px;
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 65%, transparent 100%);
}
.back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 22px; font-weight: 300;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: background .15s; font-family: inherit;
}
.back-btn:active { background: rgba(255,255,255,0.14); }
.top-title { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.moon-placeholder {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #e8c87a 0%, #c89040 45%, #8b5c18 80%, #4e3008 100%);
  box-shadow: 0 0 14px rgba(200,145,50,.45), inset 0 1px 2px rgba(255,255,255,.25);
  border: 1.5px solid rgba(200,145,50,.4);
}

/* MARATHON HERO CARD */
.marathon-card {
  border-radius: var(--r-xl);
  overflow: hidden; position: relative;
  min-height: 200px;
  border: 1px solid rgba(139,92,246,.4);
  box-shadow: 0 8px 40px rgba(109,40,217,.28), 0 2px 8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  background: #0e042a;
  cursor: pointer; transition: transform .15s;
}
.marathon-card:active { transform: scale(.99); }
.m-bg {
  position: absolute; inset: 0;
  background-image: url('../../img/space-nebula.webp');
  background-size: cover; background-position: center top;
  opacity: .9;
}
.m-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(108deg, rgba(8,2,24,.95) 0%, rgba(12,4,36,.80) 38%, rgba(6,2,18,.30) 70%, rgba(2,1,10,.10) 100%);
}
.m-planets {
  position: absolute; inset: 0;
  background-image: url('../../img/planets.webp');
  background-size: cover; background-repeat: no-repeat;
  background-position: center center;
  opacity: .65; z-index: 1;
  mix-blend-mode: screen;
}
.m-rocket {
  position: absolute; right: 2px; top: -2px;
  width: 170px; height: 170px;
  background-image: url('../../img/rocket.webp');
  background-size: 88% 88%; background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  animation: rocketFloat 3s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 52% 48%, #000 44%, rgba(0,0,0,.75) 62%, rgba(0,0,0,.2) 80%, transparent 92%);
  mask-image: radial-gradient(ellipse 72% 72% at 52% 48%, #000 44%, rgba(0,0,0,.75) 62%, rgba(0,0,0,.2) 80%, transparent 92%);
}
@keyframes rocketFloat {
  0%,100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-9px) rotate(-8deg); }
}
.marathon-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: var(--r-xl);
  box-shadow: inset 0 0 60px rgba(109,40,217,.15);
  animation: cardPulse 4s ease-in-out infinite;
  pointer-events: none; z-index: 5;
}
@keyframes cardPulse {
  0%,100% { opacity: .5; }
  50%      { opacity: 1; }
}
.m-body { position: relative; z-index: 4; padding: 20px 18px 18px; }
.m-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.5);
  border-radius: 20px; padding: 4px 12px;
  font-size: 10.5px; font-weight: 800; color: #F59E0B;
  letter-spacing: .7px; text-transform: uppercase; margin-bottom: 8px;
}
.m-title {
  font-size: 46px; font-weight: 900; letter-spacing: -2px; line-height: .95;
  color: #fff;
  text-shadow: 0 0 50px rgba(139,92,246,.8), 0 2px 6px rgba(0,0,0,.6);
  margin-bottom: 9px;
}
.m-desc { font-size: 12.5px; color: rgba(255,255,255,.72); line-height: 1.5; margin-bottom: 14px; max-width: 54%; }
.m-pills { display: flex; gap: 8px; margin-bottom: 15px; }
.m-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px; padding: 5px 13px;
  font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.82);
}
.m-btn {
  width: 100%; padding: 13px 20px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 55%, #a78bfa 100%);
  border: none; border-radius: 14px;
  font-size: 13.5px; font-weight: 800; color: #fff;
  letter-spacing: .6px; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 22px rgba(109,40,217,.6);
  transition: box-shadow .2s, transform .15s; font-family: inherit;
}
.m-btn:active { transform: scale(.98); box-shadow: 0 2px 10px rgba(109,40,217,.4); }

/* FULL-WIDTH GAME CARDS */
.fw-card {
  border-radius: var(--r-xl);
  overflow: hidden; position: relative;
  min-height: 88px; display: flex; align-items: stretch;
  border: 1px solid var(--border);
  cursor: pointer; transition: transform .15s;
  color: #fff; text-decoration: none;
}
.fw-card:active { transform: scale(.99); }
.fw-card::before {
  content: '';
  position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.18), transparent);
  z-index: 5;
}
.fw-body { flex: 1; padding: 12px 16px 11px 18px; position: relative; z-index: 3; max-width: 60%; }
.fw-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fw-icon {
  flex-shrink: 0;
  width: 78px; height: 78px; border-radius: var(--r-md);
  background: rgba(255,255,255,.09);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
}
.fw-icon img { width: 78px; height: 78px; object-fit: contain; display: block; }
.fw-title { font-size: 16px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 4px; line-height: 1.2; }
.fw-desc { font-size: 12px; color: rgba(255,255,255,.58); line-height: 1.45; margin-bottom: 10px; }
.fw-time { display: flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255,255,255,.42); font-weight: 500; }
.fw-globe-img {
  position: absolute; right: -30px; bottom: -28px;
  width: 195px; height: 195px;
  border-radius: 50%; object-fit: cover; z-index: 1; display: block;
}
.slovons-globe { box-shadow: 0 0 40px rgba(6,182,212,.35), 0 0 80px rgba(6,182,212,.15); }
.zgflash-globe { right: -22px; bottom: -32px; box-shadow: 0 0 40px rgba(245,158,11,.35), 0 0 80px rgba(245,158,11,.15); }
.fw-arrow {
  position: absolute; right: 14px; bottom: 14px; z-index: 4;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: rgba(255,255,255,.65);
}
.slovons-card {
  background: radial-gradient(ellipse 65% 100% at 100% 50%, rgba(6,182,212,.13) 0%, transparent 70%),
    linear-gradient(130deg, #040d2a 0%, #070f33 30%, #091640 55%, #0b1d52 100%);
  box-shadow: 0 4px 24px rgba(6,182,212,.14);
  border-color: rgba(6,182,212,.22) !important;
}
.zgflash-card {
  background: radial-gradient(ellipse 65% 100% at 100% 50%, rgba(245,158,11,.12) 0%, transparent 70%),
    linear-gradient(130deg, #180700 0%, #281100 30%, #371800 55%, #451f00 100%);
  box-shadow: 0 4px 24px rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.2) !important;
}

/* SECTION HEADER */
.section-hdr { display: flex; align-items: center; gap: 11px; padding: 2px 0; }
.hdr-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(255,255,255,.12)); }
.hdr-line.rev { background: linear-gradient(to left, transparent, rgba(255,255,255,.12)); }
.hdr-label { font-size: 10.5px; font-weight: 800; letter-spacing: 2.8px; color: rgba(255,255,255,.32); text-transform: uppercase; white-space: nowrap; }

/* 2×2 DUEL GRID */
.duel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.d-card {
  border-radius: var(--r-lg); padding: 11px 14px 10px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  cursor: pointer; transition: transform .15s;
  color: #fff; text-decoration: none;
}
.d-card:active { transform: scale(.97); }
.d-card::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.18), transparent);
}
.d-red   { background: linear-gradient(145deg, #2c0808 0%, #490c0c 50%, #5e1313 100%); box-shadow: 0 4px 18px rgba(185,28,28,.22); border-color: rgba(185,28,28,.32) !important; }
.d-blue  { background: linear-gradient(145deg, #060c2c 0%, #0c184e 50%, #122066 100%); box-shadow: 0 4px 18px rgba(30,64,175,.22); border-color: rgba(30,64,175,.32) !important; }
.d-purple-a { background: linear-gradient(145deg, #100826 0%, #1c0e44 50%, #281560 100%); box-shadow: 0 4px 18px rgba(91,33,182,.22); border-color: rgba(91,33,182,.32) !important; }
.d-purple-b { background: linear-gradient(145deg, #0c071e 0%, #180c38 50%, #221252 100%); box-shadow: 0 4px 18px rgba(76,29,149,.22); border-color: rgba(76,29,149,.32) !important; }
.d-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.d-icon {
  flex-shrink: 0;
  width: 88px; height: 88px; border-radius: var(--r-md);
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.d-icon img { width: 88px; height: 88px; object-fit: contain; display: block; }
.d-title { font-size: 13.5px; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; margin-bottom: 6px; }
.d-desc { font-size: 10.5px; color: rgba(255,255,255,.53); line-height: 1.45; margin-bottom: 12px; }
.d-footer { display: flex; align-items: center; justify-content: space-between; }
.d-time { display: flex; align-items: center; gap: 4px; font-size: 10px; color: rgba(255,255,255,.38); font-weight: 500; }
.d-arrow { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.6); }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: rgba(7,10,20,.97);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: flex-end; justify-content: space-around;
  padding: 10px 4px 24px; z-index: 200;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none;
  color: var(--muted); font-family: inherit;
  font-size: 10px; font-weight: 500;
  cursor: pointer; padding: 0 6px; min-width: 48px;
  transition: color .15s; text-decoration: none;
}
.nav-btn .nav-ico {
  width: 22px; height: 22px; display: block; margin-bottom: 1px;
}
.nav-btn .nav-ico img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  opacity: .45; transition: opacity .15s;
}
.nav-btn.active { color: var(--purple); }
.nav-btn.active .nav-ico img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(49%) sepia(97%) saturate(1283%) hue-rotate(235deg) brightness(101%) contrast(94%);
}
.nav-btn .nav-ico { font-size: 20px; line-height: 1; display: block; }
.nav-center { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -24px; }
.nav-disc {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 60%, #a78bfa 100%);
  box-shadow: 0 4px 26px rgba(109,40,217,.7), 0 0 0 3px var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 27px;
}
.nav-center-lbl { font-size: 10px; font-weight: 700; color: var(--purple); }
