/* ===== BLUE GUM HORIZON — Design System ===== */

/* --- Tokens --- */
:root {
  --c-primary: #1d4ed8;
  --c-primary-light: #3b82f6;
  --c-primary-dark: #1e3a8a;
  --c-accent: #60a5fa;
  --c-accent-soft: #dbeafe;
  --c-surface: #ffffff;
  --c-bg: #f8fafc;
  --c-bg-alt: #f1f5f9;
  --c-text: #1a1a2e;
  --c-text-muted: #64748b;
  --c-border: #e2e8f0;
  --c-success: #16a34a;
  --c-warning: #d97706;
  --c-danger: #dc2626;
  --radius-sm: .375rem;
  --radius-md: .625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", monospace;
  --space-xs: .25rem;
  --space-sm: .5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
}

/* --- Base --- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; color: var(--c-text); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
p { margin-bottom: var(--space-md); }
ul, ol { padding-left: var(--space-lg); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-outline:hover { background: var(--c-accent-soft); color: var(--c-primary-dark); }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }

/* --- Layout Sections --- */
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--c-bg-alt); }
.section-header { text-align: center; margin-bottom: var(--space-xl); }
.section-header p { color: var(--c-text-muted); max-width: 640px; margin: var(--space-sm) auto 0; font-size: 1.05rem; }

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 40%, #3b82f6 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(96,165,250,.25), transparent),
    radial-gradient(ellipse 500px 350px at 80% 20%, rgba(147,197,253,.2), transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero h1 { color: #fff; margin-bottom: var(--space-md); font-size: clamp(2rem, 5vw, 3.25rem); }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; margin-bottom: var(--space-lg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.hero .btn-primary { background: #fff; color: var(--c-primary); border-color: #fff; }
.hero .btn-primary:hover { background: var(--c-accent-soft); }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  padding: .3rem .75rem;
  border-radius: 2rem;
  font-size: .8rem;
  margin-bottom: var(--space-md);
  letter-spacing: .03em;
}

/* --- Cards Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--c-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}
.card-icon svg { width: 24px; height: 24px; color: var(--c-primary); }
.card h3 { margin-bottom: var(--space-sm); }
.card p { color: var(--c-text-muted); font-size: .92rem; margin-bottom: var(--space-md); }
.card .btn { width: 100%; }

/* --- Game Card (unique variant) --- */
.game-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.game-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.game-card-visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.game-card-visual svg { width: 56px; height: 56px; opacity: .9; }
.game-card-body { padding: var(--space-lg); }
.game-card-body h3 { margin-bottom: var(--space-xs); font-size: 1.15rem; }
.game-card-body p { color: var(--c-text-muted); font-size: .88rem; }
.game-card-body .btn { margin-top: var(--space-md); }
.game-card-tag {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  padding: .2rem .6rem;
  border-radius: 2rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--c-primary);
}

/* Game card gradients */
.gc-blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.gc-indigo { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.gc-sky { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.gc-violet { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.gc-emerald { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }

/* --- Inline Disclaimer --- */
.inline-disclaimer {
  background: var(--c-bg-alt);
  border-left: 3px solid var(--c-primary);
  padding: var(--space-sm) var(--space-md);
  font-size: .8rem;
  color: var(--c-text-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-md) 0;
}

/* --- Game UI Shared --- */
.game-container {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-lg);
}
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.game-stats {
  display: flex;
  gap: var(--space-md);
}
.game-stat {
  text-align: center;
  background: var(--c-bg-alt);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
}
.game-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--c-primary); }
.game-stat-label { font-size: .72rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.game-mode-switch {
  display: flex;
  gap: 2px;
  background: var(--c-bg-alt);
  border-radius: var(--radius-md);
  padding: 2px;
}
.game-mode-btn {
  padding: .4rem .8rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  color: var(--c-text-muted);
}
.game-mode-btn.active { background: var(--c-primary); color: #fff; }
.game-instructions {
  background: var(--c-accent-soft);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: .9rem;
}
.game-instructions h3 { font-size: 1rem; margin-bottom: var(--space-xs); }
.game-board { margin-bottom: var(--space-lg); }
.game-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.game-result {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: var(--space-md);
  font-weight: 600;
}
.game-result-success { background: #dcfce7; color: #166534; }
.game-result-info { background: var(--c-accent-soft); color: var(--c-primary-dark); }

/* --- FAQ Accordion --- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
  gap: var(--space-md);
}
.faq-question:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item.is-open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 0 0 0;
}
.faq-item.is-open .faq-answer {
  max-height: 600px;
  padding-bottom: var(--space-md);
}
.faq-answer p { color: var(--c-text-muted); font-size: .93rem; }

/* --- Content Sections --- */
.content-section { max-width: 760px; margin: 0 auto; }
.content-section h2 { margin-bottom: var(--space-md); padding-top: var(--space-lg); }
.content-section h3 { margin-bottom: var(--space-sm); padding-top: var(--space-md); }
.content-section ul { margin-bottom: var(--space-md); }
.content-section li { margin-bottom: var(--space-xs); color: var(--c-text-muted); }
.content-section p { color: #334155; }

/* --- Contact Form --- */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
}
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: .9rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  background: var(--c-surface);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error { color: var(--c-danger); font-size: .82rem; margin-top: .25rem; display: none; }
.form-group.has-error .form-error { display: block; }
.form-group.has-error input,
.form-group.has-error textarea { border-color: var(--c-danger); }

/* --- Feature Blocks --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}
.feature-row:nth-child(even) { direction: rtl; }
.feature-row:nth-child(even) > * { direction: ltr; }
.feature-visual {
  background: var(--c-accent-soft);
  border-radius: var(--radius-xl);
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-visual svg { width: 80px; height: 80px; color: var(--c-primary); }
@media (max-width: 768px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) { direction: ltr; }
  .feature-visual { height: 160px; }
}

/* --- Steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  counter-reset: step;
}
.step {
  text-align: center;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto var(--space-sm);
}
.step h3 { font-size: 1rem; margin-bottom: var(--space-xs); }
.step p { color: var(--c-text-muted); font-size: .88rem; }

/* --- Footer --- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: var(--space-2xl) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid #1e293b;
}
.footer-brand .logo-link { color: #fff; margin-bottom: var(--space-sm); display: inline-flex; }
.footer-tagline { font-size: .9rem; color: #94a3b8; max-width: 280px; }
.footer-links h3 { color: #e2e8f0; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-md); }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a { color: #94a3b8; text-decoration: none; font-size: .88rem; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-disclaimer {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid #1e293b;
  text-align: center;
}
.footer-disclaimer p { color: #94a3b8; font-size: .82rem; max-width: 700px; margin: 0 auto; }
.footer-disclaimer p:first-child { color: #e2e8f0; font-size: .88rem; margin-bottom: var(--space-sm); }
.footer-bottom {
  padding: var(--space-md) 0;
  text-align: center;
  font-size: .8rem;
  color: #64748b;
}
.footer-geo { display: inline; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Age Gate Modal --- */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.age-gate-overlay[hidden] { display: none; }
.age-gate-box {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.age-gate-icon { margin-bottom: var(--space-md); }
.age-gate-box h2 { margin-bottom: var(--space-sm); font-size: 1.35rem; }
.age-gate-box p { color: var(--c-text-muted); font-size: .92rem; }
.age-gate-disclaimer { font-size: .78rem !important; color: var(--c-text-muted); background: var(--c-bg-alt); padding: var(--space-sm); border-radius: var(--radius-sm); margin: var(--space-md) 0; }
.age-gate-actions { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-lg); }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.gap-sm { gap: var(--space-sm); }
.flex-wrap { display: flex; flex-wrap: wrap; }

/* --- Page Hero (sub-pages) --- */
.page-hero {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  color: #fff;
  padding: var(--space-xl) 0;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: var(--space-sm); }
.page-hero p { color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto; }

/* --- Number Match Game Specific --- */
.nm-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  max-width: 400px;
  margin: 0 auto var(--space-md);
}
.nm-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  background: var(--c-surface);
  user-select: none;
}
.nm-cell:hover { border-color: var(--c-primary); }
.nm-cell.selected { background: var(--c-accent-soft); border-color: var(--c-primary); }
.nm-cell.matched { background: #dcfce7; border-color: var(--c-success); }
.nm-cell.missed { background: #fee2e2; border-color: var(--c-danger); opacity: .6; }
.nm-number-pool {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  margin-bottom: var(--space-md);
}
.nm-num {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
  background: var(--c-surface);
  font-size: .9rem;
  user-select: none;
}
.nm-num:hover { border-color: var(--c-primary); }
.nm-num.picked { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* --- Spin Fun Wheel --- */
.wheel-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto var(--space-lg);
}
.wheel-svg {
  width: 100%;
  height: 100%;
  transition: transform 3s cubic-bezier(.17,.67,.12,.99);
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid var(--c-primary-dark);
  z-index: 2;
}
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary);
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.badge-display {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-md) 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .7rem;
  border-radius: 2rem;
  font-size: .78rem;
  font-weight: 600;
  background: var(--c-accent-soft);
  color: var(--c-primary);
}

/* --- Card Flip --- */
.cf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  max-width: 400px;
  margin: 0 auto var(--space-md);
}
.cf-card {
  aspect-ratio: 1;
  perspective: 600px;
  cursor: pointer;
}
.cf-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .4s;
  transform-style: preserve-3d;
}
.cf-card.flipped .cf-card-inner { transform: rotateY(180deg); }
.cf-card.matched .cf-card-inner { transform: rotateY(180deg); }
.cf-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  font-weight: 700;
}
.cf-front {
  background: var(--c-primary);
  color: #fff;
}
.cf-back {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  transform: rotateY(180deg);
}
.cf-card.matched .cf-back { background: #dcfce7; border-color: var(--c-success); }

/* --- Daily Pick --- */
.dp-symbols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  max-width: 360px;
  margin: 0 auto var(--space-md);
}
.dp-sym {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: 2rem;
  cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s;
  background: var(--c-surface);
  user-select: none;
}
.dp-sym:hover { border-color: var(--c-primary); }
.dp-sym.picked { background: var(--c-accent-soft); border-color: var(--c-primary); transform: scale(1.05); }
.dp-sym.matched { background: #dcfce7; border-color: var(--c-success); }
.dp-sym.missed { background: #fee2e2; border-color: var(--c-danger); opacity: .7; }

/* --- Quick Tap --- */
.qt-area {
  width: 100%;
  max-width: 400px;
  height: 300px;
  margin: 0 auto var(--space-md);
  background: var(--c-bg-alt);
  border-radius: var(--radius-lg);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.qt-target {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--c-primary);
  position: absolute;
  transition: transform .08s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qt-target:active { transform: scale(.9); }
.qt-countdown {
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-primary);
}
.qt-score-big {
  font-size: 4rem;
  font-weight: 700;
  color: var(--c-primary);
  text-align: center;
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .age-gate-overlay, .disclaimer-bar { display: none; }
  body { color: #000; }
}
