/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #000000;
  --surface:  #181818;
  --surface2: #222222;
  --border:   #2A2A2A;
  --orange:   #E06020;
  --orange-d: #C04010;
  --orange-bg:#200000;
  --text:     #E0E0E0;
  --text2:    #8A8A8A;
  --text3:    #555;
  --green:    #43A047;
  --red:      #E53935;
  --radius:   10px;
  --sidebar-w:220px;
  --header-h: 56px;
  --trans:    .18s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  /* Subtle ambient gradient that responds to page */
  background-image:
    radial-gradient(ellipse 700px 500px at -10% -10%, rgba(224,96,32,.055) 0%, transparent 70%),
    radial-gradient(ellipse 500px 600px at 110% 110%, rgba(80,0,0,.06) 0%, transparent 70%);
  background-attachment: fixed;
}

/* ── Scroll Reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-left {
  opacity: 0; transform: translateX(-28px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.reveal-left.in-view { opacity: 1; transform: none; }
.reveal-scale {
  opacity: 0; transform: scale(.94);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal-scale.in-view { opacity: 1; transform: none; }
/* Stagger delays */
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }

/* ── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(115deg, #E06020 0%, #FF8848 45%, #E06020 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── Orb / Glow effects ─────────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  will-change: transform;
}
@keyframes orbFloat {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(22px, -18px) scale(1.04); }
  66%      { transform: translate(-12px, 10px) scale(.97); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0, 0); }
  50%      { transform: translate(-25px, 20px); }
}

/* ── Glow Button ────────────────────────────────────────────── */
.btn-glow {
  position: relative;
  overflow: hidden;
}
.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(115deg, #E06020, #FF8848, #E06020);
  background-size: 200%;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity .25s;
  animation: gradientShift 3s linear infinite;
}
.btn-glow:hover { box-shadow: 0 6px 28px rgba(224,96,32,.45), 0 2px 8px rgba(224,96,32,.2); }

/* ── Glass Card ─────────────────────────────────────────────── */
.glass-card {
  background: rgba(24,24,24,.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.06);
}
.glass-card:hover { border-color: rgba(224,96,32,.35); }

/* ── Animated border gradient ───────────────────────────────── */
.border-glow {
  position: relative;
}
.border-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(224,96,32,.5), transparent 50%, rgba(224,96,32,.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.border-glow:hover::before { opacity: 1; }

/* ── Noise texture overlay ──────────────────────────────────── */
.noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  opacity: .35;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ── Grid dot pattern ───────────────────────────────────────── */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ── Shimmer line ───────────────────────────────────────────── */
.shimmer-bar {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,96,32,.6), transparent);
  background-size: 300% 100%;
  animation: shimmerBar 3s linear infinite;
}
@keyframes shimmerBar {
  0%   { background-position: -100% center; }
  100% { background-position: 200% center; }
}

/* ── Tag pill ───────────────────────────────────────────────── */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(224,96,32,.1);
  border: 1px solid rgba(224,96,32,.25);
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
}

/* ── Stat counter card ──────────────────────────────────────── */
.counter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.counter-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,96,32,.5), transparent);
}
.counter-card:hover {
  border-color: rgba(224,96,32,.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 20px rgba(224,96,32,.08);
}
.counter-num { font-size: 32px; font-weight: 900; color: var(--orange); line-height: 1; }
.counter-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

/* ── Feature row ────────────────────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.feature-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color .2s, transform .2s;
}
.feature-item:hover { border-color: rgba(224,96,32,.3); transform: translateY(-2px); }
.feature-icon {
  width: 36px; height: 36px;
  background: rgba(224,96,32,.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange); flex-shrink: 0;
}
.feature-text strong { display: block; font-size: 13px; color: #fff; margin-bottom: 3px; }
.feature-text span { font-size: 11px; color: var(--text2); line-height: 1.5; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Layout ────────────────────────────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #0A0A0A;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--trans);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; color: #fff;
  flex-shrink: 0;
}

.logo-text { font-size: 13px; font-weight: 700; line-height: 1.2; }
.logo-text span { color: var(--orange); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }

.nav-section { padding: 16px 12px 4px; }
.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  margin: 1px 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--trans);
  position: relative;
}

.nav-item:hover { background: var(--surface); color: var(--text); }

.nav-item.active {
  background: var(--surface);
  color: var(--orange);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--orange);
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.nav-sub {
  padding-left: 14px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text3);
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--header-h);
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 90;
}

.header-burger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 4px;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.header-record {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
}

.header-record svg { color: var(--orange); }

/* ── Page wrapper ──────────────────────────────────────────── */
.page {
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
  min-height: 100vh;
  width: calc(100% - var(--sidebar-w));
}

.page-inner { padding: 20px; max-width: 960px; margin-left: auto; margin-right: auto; }
.page-inner.full-width { max-width: none; padding: 0; }

/* ── Overlay (mobile sidebar) ──────────────────────────────── */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 99;
}
.overlay.show { display: block; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  border: none;
  transition: all var(--trans);
}

.btn-primary {
  background: linear-gradient(135deg, #E06020, #C84010);
  color: #fff;
  transition: all .22s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #F07030, #D05020);
  box-shadow: 0 6px 24px rgba(224,96,32,.4), 0 1px 6px rgba(224,96,32,.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.btn-ghost {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--trans);
}
.card:hover { border-color: rgba(224,96,32,.3); }

/* ── Stat cards ── */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; text-align: center;
  transition: border-color .18s, transform .18s;
}
.stat-card:hover { border-color: rgba(224,96,32,.3); transform: translateY(-2px); }
.stat-number { font-size: 28px; font-weight: 900; color: var(--orange); }
.stat-label  { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }

/* ── Hero banner ───────────────────────────────────────────── */
.hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  background: linear-gradient(135deg, var(--orange-bg), #0A0A0A);
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .08;
}

.hero-content { position: relative; z-index: 2; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .05em;
}

.hero h1 { font-size: 28px; font-weight: 800; color: #fff; line-height: 1.2; }
.hero p { margin-top: 8px; color: var(--text2); font-size: 14px; max-width: 500px; }
.hero-btns { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Section heading ───────────────────────────────────────── */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.section-title svg { color: var(--orange); }

/* ── Match card ────────────────────────────────────────────── */
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--trans);
}
.match-card:hover { border-color: #3A3A3A; background: var(--surface2); }

.match-teams {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-team {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
}

.team-flag {
  width: 20px; height: 14px;
  background: var(--border);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text2);
  flex-shrink: 0;
}

.match-score {
  text-align: center;
  min-width: 64px;
}

.score-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 18px; font-weight: 700;
  color: #fff;
  display: flex; align-items: center; gap: 6px;
}

.score-sep { color: var(--text3); }

.match-meta {
  font-size: 11px; color: var(--text2);
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}

.live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(229,57,53,.15);
  color: var(--red);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
}
.live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1s infinite;
}

.sport-badge {
  background: var(--surface2);
  color: var(--text3);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── Game cards ────────────────────────────────────────────── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex; flex-direction: column;
  gap: 10px;
  transition: all var(--trans);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.game-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(224,96,32,.12);
}

.game-card-icon {
  width: 48px; height: 48px;
  background: rgba(224,96,32,.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
}

.game-card h3 { font-size: 15px; font-weight: 700; }
.game-card p { font-size: 12px; color: var(--text2); flex: 1; }

.game-record {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--orange);
}

.free-badge {
  display: inline-block;
  background: rgba(67,160,71,.15);
  color: var(--green);
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
}

/* ── App promo banner ──────────────────────────────────────── */
.app-banner {
  background: linear-gradient(135deg, var(--orange-bg) 0%, #0A0A0A 60%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
  position: relative; overflow: hidden;
}

.app-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../img/bg-secondary.png') center/cover;
  opacity: .06;
}

.app-banner-content { position: relative; z-index: 1; flex: 1; min-width: 200px; }
.app-banner h3 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.app-banner p { color: var(--text2); font-size: 13px; }

.app-banner-actions { position: relative; z-index: 1; }

.google-play-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 18px;
  color: var(--text2);
  font-size: 12px;
  transition: all var(--trans);
}
.google-play-btn:hover { border-color: var(--orange); color: var(--text); }
.google-play-btn span { display: flex; flex-direction: column; gap: 1px; }
.google-play-btn .gp-soon { font-size: 10px; color: var(--text3); }
.google-play-btn .gp-title { font-weight: 700; font-size: 14px; color: var(--text); }

/* ── Filters / tabs ────────────────────────────────────────── */
.filter-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px; font-weight: 500;
  color: var(--text2);
  transition: all var(--trans);
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  background: rgba(224,96,32,.12);
  border-color: var(--orange);
  color: var(--orange);
  font-weight: 600;
}

/* ── Articles ──────────────────────────────────────────────── */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--trans);
}
.article-card:hover { border-color: #3A3A3A; }

.article-cat {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--orange);
  margin-bottom: 8px;
}

.article-title {
  font-size: 15px; font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.article-text { font-size: 13px; color: var(--text2); line-height: 1.6; }
.article-date { font-size: 11px; color: var(--text3); margin-top: 10px; }

/* ── Quiz ──────────────────────────────────────────────────── */
.quiz-wrap { max-width: 640px; }

.quiz-progress {
  background: var(--surface2);
  height: 4px; border-radius: 2px;
  margin-bottom: 20px; overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width .4s ease;
}

.quiz-question {
  font-size: 17px; font-weight: 700; color: #fff;
  margin-bottom: 18px; line-height: 1.4;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; }

.quiz-option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 14px; font-weight: 500;
  color: var(--text);
  text-align: left;
  transition: all var(--trans);
}
.quiz-option:hover:not(:disabled) { border-color: var(--orange); background: rgba(224,96,32,.05); }
.quiz-option.correct { border-color: var(--green); background: rgba(67,160,71,.1); color: var(--green); }
.quiz-option.wrong { border-color: var(--red); background: rgba(229,57,53,.08); color: var(--red); }
.quiz-option:disabled { cursor: default; }

.quiz-score { font-size: 13px; color: var(--text2); margin-top: 12px; }

/* ── Game page layout ──────────────────────────────────────── */
.game-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h) - 40px);
  max-width: 700px;
}

.game-header {
  display: flex; align-items: center; gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.game-title { font-size: 20px; font-weight: 800; color: #fff; }
.game-subtitle { font-size: 12px; color: var(--text2); }

.game-stat {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end;
}
.game-stat-label { font-size: 10px; color: var(--text3); text-transform: uppercase; }
.game-stat-value { font-size: 18px; font-weight: 800; color: var(--orange); }

.game-body { flex: 1; overflow: hidden; }


/* ── Lottery grid ──────────────────────────────────────────── */
.lottery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.lottery-cell {
  aspect-ratio: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}

.lottery-cell:hover:not(.revealed) {
  border-color: var(--orange);
  background: rgba(224,96,32,.07);
}

.lottery-cell.revealed {
  cursor: default;
}

.lottery-cell.matched {
  border-color: var(--orange);
  box-shadow: 0 0 10px rgba(224,96,32,.3);
}

/* value colors */
.v-250 { color: #818cf8; border-color: rgba(129,140,248,.4); }
.v-500 { color: #22c55e; border-color: rgba(34,197,94,.4); }
.v-750 { color: #eab308; border-color: rgba(234,179,8,.4); }
.v-1000 { color: var(--orange); border-color: rgba(224,96,32,.5); }

/* ── Cards game ────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.playing-card {
  aspect-ratio: .72;
  border-radius: 7px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  font-size: 22px;
}

.playing-card:hover:not(.flipped) {
  border-color: var(--orange);
  transform: translateY(-3px);
}
.playing-card.flipped { cursor: default; }
.playing-card.ball { background: rgba(224,96,32,.1); border-color: rgba(224,96,32,.4); }
.playing-card.empty { color: var(--text3); }
.playing-card.ai-ball { background: rgba(229,57,53,.1); border-color: rgba(229,57,53,.3); }

/* ── Penalty game ──────────────────────────────────────────── */
.penalty-goal {
  position: relative;
  max-width: 340px;
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.goal-bg {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--orange-bg), #0A0A0A);
  opacity: .5;
}

.goal-frame {
  position: relative;
  padding-top: 56%;
}

.goal-post-h {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: #fff;
  z-index: 5;
}
.goal-post-l, .goal-post-r {
  position: absolute;
  top: 0; bottom: 0;
  width: 5px;
  background: #fff;
  z-index: 5;
}
.goal-post-l { left: 0; }
.goal-post-r { right: 0; }

.goal-corners {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  z-index: 10;
}

.corner-btn {
  border: 2px dashed rgba(224,96,32,.3);
  background: rgba(224,96,32,.05);
  border-radius: 8px;
  transition: all var(--trans);
  display: flex; align-items: center; justify-content: center;
}

.corner-btn:hover:not(:disabled) {
  border-color: var(--orange);
  background: rgba(224,96,32,.15);
}

.corner-btn:disabled { cursor: default; }

.keeper {
  position: absolute;
  bottom: 15%; left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  transition: all .4s ease;
}

.ball-anim {
  position: absolute;
  width: 24px; height: 24px;
  font-size: 22px;
  z-index: 9;
  pointer-events: none;
  transition: all .35s ease;
}

/* ── Result overlay ────────────────────────────────────────── */
.result-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
  border-radius: inherit;
  backdrop-filter: blur(4px);
}

.result-box {
  text-align: center;
  padding: 28px 24px;
}

.result-icon { font-size: 40px; margin-bottom: 10px; }
.result-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.result-score { font-size: 32px; font-weight: 900; color: var(--orange); margin-bottom: 8px; }
.result-record { font-size: 13px; color: var(--green); font-weight: 600; margin-bottom: 16px; }
.result-sub { font-size: 13px; color: var(--text2); margin-bottom: 16px; }

/* ── Loading spinner ───────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

/* ── Login page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 20px;
  position: relative;
}

.login-bg {
  position: absolute; inset: 0;
  background: url('../img/bg-hero.png') center/cover;
  opacity: .05;
}

.login-card {
  position: relative; z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%; max-width: 380px;
}

.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}

.login-logo .logo-icon { width: 44px; height: 44px; font-size: 22px; }

.login-title { font-size: 22px; font-weight: 800; color: #fff; }
.login-sub { font-size: 13px; color: var(--text2); margin-top: 3px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--trans);
  outline: none;
}
.form-input:focus { border-color: var(--orange); }

.form-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 8px;
  display: none;
}
.form-error.show { display: block; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1}50%{opacity:.3} }
@keyframes spin { to{transform:rotate(360deg)} }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none} }
@keyframes slideUp { from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none} }
@keyframes scaleIn { from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)} }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(224,96,32,0); }
  50% { box-shadow: 0 0 12px 2px rgba(224,96,32,.25); }
}

.fade-in { animation: fadeIn .25s ease both; }
.slide-up { animation: slideUp .3s ease both; }
.scale-in { animation: scaleIn .22s ease both; }

.shimmer-line {
  height: 2px; width: 100%;
  background: linear-gradient(90deg,transparent,var(--orange),transparent);
  background-size: 200%;
  animation: shimmer 2s linear infinite;
}

/* ── Page enter animation ── */
.page-inner { animation: fadeIn .28s ease both; }

/* ── Nav item hover with underline accent ── */
.nav-item { overflow: hidden; }
.nav-item::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 14px; right: 14px; height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform .2s ease;
  transform-origin: left;
  border-radius: 2px;
}
.nav-item:hover::after { transform: scaleX(1); }
.nav-item.active::after { display: none; }

/* ── Smooth sidebar open on mobile ── */
.sidebar { transition: transform .24s cubic-bezier(.4,0,.2,1); }

/* ── Card enter animations (stagger via nth-child) ── */
.game-card:nth-child(1) { animation: slideUp .3s .04s ease both; }
.game-card:nth-child(2) { animation: slideUp .3s .08s ease both; }
.game-card:nth-child(3) { animation: slideUp .3s .12s ease both; }
.game-card:nth-child(4) { animation: slideUp .3s .16s ease both; }

/* ── Orange glow on focused/active interactive elements ── */
.btn-primary:focus-visible,
.btn-play:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; animation: pulseGlow 1s ease; }

/* ── Smooth link highlight ── */
a:not(.nav-item):not(.sidebar-logo):not(.btn-primary):not(.btn-secondary):not(.btn-gplay) {
  transition: color .15s;
}

/* ── Utilities ─────────────────────────────────────────────── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--text2); }
.text-sm     { font-size: 12px; }
.fw-700      { font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Mobile responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-220px);
    width: 220px;
  }
  .sidebar.open { transform: translateX(0); }

  .header { left: 0; padding-left: 14px; }
  .header-burger { display: flex; }

  .page { margin-left: 0; width: 100%; }
  .page-inner { padding: 14px; }

  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 22px; }

  .game-grid { grid-template-columns: repeat(2, 1fr); }

  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .lottery-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }

  .game-page { height: auto; }

  .app-banner { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Enhanced WC Tab Animations ───────────────────────────── */
.wc-tab-panel { animation: fadeIn .3s ease both; }
.wc-tab {
  transition: color .18s, background .18s, box-shadow .18s;
}
.wc-tab.active {
  background: rgba(224,96,32,.12);
  box-shadow: 0 2px 0 var(--orange) inset;
}
.wc-tab:hover:not(.active) {
  background: rgba(255,255,255,.04);
  color: var(--text);
}

/* ── Article card hover glow ───────────────────────────────── */
.article-card {
  transition: border-color .22s, transform .22s, box-shadow .22s;
}
.article-card:hover {
  border-color: rgba(224,96,32,.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.4), 0 0 20px rgba(224,96,32,.06);
}

/* ── Nav item focus glow ───────────────────────────────────── */
.nav-item:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ── Btn-play glow ─────────────────────────────────────────── */
.btn-play {
  transition: all .2s ease;
}
.btn-play:hover {
  box-shadow: 0 4px 18px rgba(224,96,32,.35);
  transform: translateY(-2px);
}

/* ── Game card title gradient on hover ─────────────────────── */
.game-card:hover .game-card-name {
  color: var(--orange);
  transition: color .2s;
}

/* ── Counter card glowing number ───────────────────────────── */
@keyframes countPulse {
  0%,100% { text-shadow: 0 0 0 rgba(224,96,32,0); }
  50% { text-shadow: 0 0 20px rgba(224,96,32,.35); }
}
.counter-card .counter-num { animation: countPulse 3s ease-in-out infinite; }

/* ── Hero gradient text shimmer ────────────────────────────── */
.hero h1 .gradient-text { font-size: inherit; }

/* ── Scrollbar orange accent ───────────────────────────────── */
::-webkit-scrollbar-thumb:hover { background: rgba(224,96,32,.5); }

/* ── Section head dot pulse ────────────────────────────────── */
.section-head .dot {
  animation: countPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(224,96,32,.4);
}

/* ── Global button / interactive glow effects ──────────────── */

/* Nav items hover glow */
.nav-item {
  transition: color .18s, background .18s, box-shadow .18s;
}
.nav-item:hover:not(.active) {
  background: rgba(224,96,32,.07);
  box-shadow: inset 3px 0 0 rgba(224,96,32,.35);
}
.nav-item.active {
  box-shadow: inset 3px 0 0 var(--orange);
}

/* WC tab button glow */
.wc-tab {
  position: relative;
  overflow: hidden;
}
.wc-tab::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--orange);
  transition: left .22s ease, right .22s ease;
  border-radius: 2px 2px 0 0;
}
.wc-tab.active::before, .wc-tab:hover::before {
  left: 10%; right: 10%;
}

/* Filter buttons */
.filter-btn {
  transition: all .2s ease;
}
.filter-btn:hover {
  border-color: rgba(224,96,32,.5);
  box-shadow: 0 2px 10px rgba(224,96,32,.15);
}
.filter-btn.active {
  box-shadow: 0 2px 12px rgba(224,96,32,.25);
}

/* Group table row hover */
.grp-row:hover {
  background: rgba(224,96,32,.04);
  transition: background .15s;
}

/* Schedule match card hover */
.match-card:hover {
  border-color: rgba(224,96,32,.35) !important;
  transform: translateX(2px);
  transition: all .2s ease;
}

/* Bracket match hover */
.bkt-match:hover {
  border-color: rgba(224,96,32,.35) !important;
  box-shadow: 0 2px 12px rgba(224,96,32,.1);
  transition: all .2s ease;
}

/* Game cards on games.html */
.game-card {
  transition: border-color .22s, transform .22s, box-shadow .22s;
}
.game-card:hover {
  border-color: rgba(224,96,32,.5);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 30px rgba(224,96,32,.08);
}

/* Btn-play enhanced */
.btn-play {
  background: linear-gradient(135deg, #E06020, #C84010);
  transition: all .22s ease;
}
.btn-play:hover {
  box-shadow: 0 6px 22px rgba(224,96,32,.45);
  transform: translateY(-2px);
}

/* Quiz option hover */
.quiz-option {
  transition: border-color .18s, background .18s, transform .15s;
}
.quiz-option:hover:not(.correct):not(.wrong) {
  border-color: rgba(224,96,32,.5);
  background: rgba(224,96,32,.05);
  transform: translateX(3px);
}

/* History year button pulse on hover */
.hist-year-btn {
  position: relative;
  overflow: hidden;
}
.hist-year-btn::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: var(--orange);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .2s;
}
.hist-year-btn:hover::after, .hist-year-btn.active::after {
  opacity: 1;
}

/* Counter card number hover glow */
.counter-card:hover .counter-num {
  text-shadow: 0 0 20px rgba(224,96,32,.5);
  transition: text-shadow .2s;
}

/* Tag pill hover shimmer */
.tag-pill {
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.tag-pill:hover {
  box-shadow: 0 0 16px rgba(224,96,32,.2);
}

/* Sidebar logo glow */
.sidebar-logo:hover .logo-text span {
  text-shadow: 0 0 12px rgba(224,96,32,.5);
  transition: text-shadow .2s;
}

/* General link transitions */
a.nav-item, button.wc-tab, button.filter-btn {
  transition-property: color, background, border-color, box-shadow, transform;
  transition-duration: .2s;
}

/* ── Animated scroll-to on nav click ─────────────────────── */
html { scroll-behavior: smooth; }

/* ── Quiz next button glow ──────────────────────────────── */
.quiz-next-btn {
  background: linear-gradient(135deg, #E06020, #C84010) !important;
  transition: all .22s ease !important;
}
.quiz-next-btn:not(:disabled):hover {
  box-shadow: 0 6px 22px rgba(224,96,32,.4) !important;
  transform: translateY(-1px) !important;
  opacity: 1 !important;
}

/* ── Stat card glow on worldcup page ───────────────────── */
.stat-card {
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.stat-card:hover {
  border-color: rgba(224,96,32,.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 16px rgba(224,96,32,.08);
}
.stat-number { animation: countPulse 3.5s ease-in-out infinite; }

/* ── WC hero gradient text shimmer ─────────────────────── */
.wc-hero .gradient-text { font-size: inherit; font-weight: inherit; }

/* ── WC tab underline animation ─────────────────────────── */
.wc-tabs { position: relative; }
.wc-tabs::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,96,32,.2), transparent);
}

/* ── Hero btn-secondary hover ───────────────────────────── */
.wc-hero .btn-secondary:hover {
  background: rgba(255,255,255,.12) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.3) !important;
}

/* ── Penalty score glow ─────────────────────────────────── */
.s-num {
  transition: text-shadow .2s;
}
.s-num:not(:empty) { text-shadow: 0 0 20px rgba(255,255,255,.1); }

/* ── Page transitions ───────────────────────────────────────── */
@keyframes slideInPage {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.page-inner {
  animation: slideInPage 0.38s cubic-bezier(.22,1,.36,1) both;
}
.pen-page, .lot-page, .cards-page {
  animation: slideInPage 0.38s cubic-bezier(.22,1,.36,1) both;
}

/* ── Refined reveal transitions ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
}
.reveal.in-view { opacity: 1; transform: none; }

.reveal-left {
  opacity: 0; transform: translateX(-24px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
}
.reveal-left.in-view { opacity: 1; transform: none; }

.reveal-scale {
  opacity: 0; transform: scale(.94);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal-scale.in-view { opacity: 1; transform: none; }

/* Stagger children when parent is in view */
.reveal-stagger > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .45s cubic-bezier(.22,1,.36,1), transform .45s cubic-bezier(.22,1,.36,1);
}
.reveal-stagger.in-view > *:nth-child(1) { opacity:1; transform:none; transition-delay:.04s; }
.reveal-stagger.in-view > *:nth-child(2) { opacity:1; transform:none; transition-delay:.1s; }
.reveal-stagger.in-view > *:nth-child(3) { opacity:1; transform:none; transition-delay:.16s; }
.reveal-stagger.in-view > *:nth-child(4) { opacity:1; transform:none; transition-delay:.22s; }
.reveal-stagger.in-view > *:nth-child(5) { opacity:1; transform:none; transition-delay:.28s; }
.reveal-stagger.in-view > *:nth-child(n+6) { opacity:1; transform:none; transition-delay:.32s; }

/* ── Smooth link transitions ─────────────────────────────────── */
a, button { will-change: auto; }

/* ── Cross-platform flag images (Twemoji) ───────────────────── */
img.fi-img {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  image-rendering: crisp-edges;
  line-height: 1;
  /* Prevent layout shift */
  aspect-ratio: 1;
}
/* Override font-size on parent — fi-img is pixel-sized */
.team-flag-emoji img.fi-img,
.bm-flag img.fi-img { width: 20px; height: 20px; }
