/* ============================================================================
   Betfred App — Sleek Dark + Neon design system
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  /* Brand */
  --brand-red: #ef4444;
  --brand-red-bright: #f87171;
  --brand-orange: #f59e0b;
  --brand-gold: #fbbf24;

  /* Surface */
  --bg: #07070b;
  --bg-grad: radial-gradient(ellipse at top, #16161f 0%, #07070b 60%);
  --surface-1: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.18);

  /* Text */
  --text: #f5f5f7;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;

  /* Semantic */
  --won: #10b981;
  --lost: #ef4444;
  --push: #94a3b8;
  --pending: #fbbf24;

  /* Effects */
  --glow-red: 0 0 24px rgba(239, 68, 68, 0.35);
  --glow-gold: 0 0 24px rgba(251, 191, 36, 0.35);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 8px 32px rgba(239, 68, 68, 0.2);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1180px;
  --header-h: 68px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-orange);
  font-weight: 500;
}

.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: var(--glow-gold);
}

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.mono  { font-family: var(--font-mono); }

/* ============================================================================
   Header
   ============================================================================ */

header.site {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
}

.brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem;
}

.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: var(--glow-red);
  color: #fff; font-weight: 800; font-size: 0.95rem;
}

.nav-links {
  display: flex; align-items: center; gap: var(--s-1);
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--text); background: var(--surface-1); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-cta {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 0.875rem; font-weight: 600;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  color: #fff;
  box-shadow: var(--glow-red);
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(239,68,68,0.5); }

.nav-toggle { display: none; padding: 8px; border-radius: var(--r-md); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(7,7,11,0.96); backdrop-filter: blur(16px);
    padding: var(--s-3); gap: var(--s-1);
    border-bottom: 1px solid var(--border);
  }
  .nav.open .nav-links a { padding: 12px 14px; }
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-size: 0.95rem; font-weight: 600;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  color: #fff;
  box-shadow: var(--glow-red);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(239,68,68,0.5); }

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

.btn-lg { padding: 18px 32px; font-size: 1rem; }

/* ============================================================================
   Sections / Cards
   ============================================================================ */

section { padding: var(--s-8) 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-5); margin-bottom: var(--s-6); flex-wrap: wrap;
}
.section-head h2 { max-width: 38ch; }
.section-head .sub { color: var(--text-dim); max-width: 50ch; margin-top: var(--s-2); }

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--border-bright); transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

.grid { display: grid; gap: var(--s-4); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================================
   Hero
   ============================================================================ */

.hero {
  padding: var(--s-9) 0 var(--s-8);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(239,68,68,0.18), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(245,158,11,0.15), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-7);
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: var(--s-6); } }

.hero h1 { margin: var(--s-3) 0 var(--s-4); }
.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand-red-bright), var(--brand-orange), var(--brand-gold));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.lead { color: var(--text-dim); font-size: 1.125rem; max-width: 54ch; margin-bottom: var(--s-5); }

.hero-cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-5); }

.trust-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5);
  color: var(--text-dim); font-size: 0.875rem;
}
.trust-row strong { color: var(--text); }

.hero-stats {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s-5);
  position: relative;
  overflow: hidden;
}
.hero-stats::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--r-xl);
  padding: 1px;
  background: linear-gradient(135deg, rgba(239,68,68,0.4), transparent 50%, rgba(245,158,11,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.hero-stats h3 { font-size: 0.875rem; color: var(--text-dim); font-weight: 500; margin-bottom: var(--s-4); text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================================================
   KPI tiles (performance widget)
   ============================================================================ */

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
@media (max-width: 720px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
}
.kpi-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-2); }
.kpi-value { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 700; color: var(--text); }
.kpi-value.pos { color: var(--won); }
.kpi-value.neg { color: var(--lost); }
.kpi-hint { font-size: 0.75rem; color: var(--text-faint); margin-top: var(--s-1); }

/* ============================================================================
   Tip card
   ============================================================================ */

.tip-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.tip-card:hover { border-color: var(--brand-red); transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

.tip-card.featured::before {
  content: 'FEATURED';
  position: absolute; top: 12px; right: -28px;
  transform: rotate(35deg);
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  color: #fff; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 4px 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.tip-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: 0.75rem; color: var(--text-dim); }
.tip-meta .badge {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: var(--r-pill); color: var(--text);
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7rem;
}

.tip-match { font-size: 1.05rem; font-weight: 600; color: var(--text); line-height: 1.3; }

.tip-pick {
  background: var(--surface-2);
  border-left: 3px solid var(--brand-orange);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
}
.tip-pick .pick-label { color: var(--text-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.tip-pick .pick-text { color: var(--text); font-weight: 600; }

.tip-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: 0.85rem; }
.tip-row .odds {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; color: var(--brand-gold);
}
.tip-row .confidence { color: var(--text-dim); display: inline-flex; gap: 2px; }
.tip-row .confidence .star { color: var(--brand-gold); }
.tip-row .confidence .dim { color: var(--text-faint); }

.tip-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  color: #fff; font-weight: 600; font-size: 0.85rem;
  margin-top: auto;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tip-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(239,68,68,0.4); }

.result-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.result-won  { background: rgba(16,185,129,0.12); color: var(--won); border: 1px solid rgba(16,185,129,0.25); }
.result-lost { background: rgba(239,68,68,0.12); color: var(--lost); border: 1px solid rgba(239,68,68,0.25); }
.result-push { background: rgba(148,163,184,0.12); color: var(--push); border: 1px solid rgba(148,163,184,0.25); }
.result-pending { background: rgba(251,191,36,0.12); color: var(--pending); border: 1px solid rgba(251,191,36,0.25); }

/* ============================================================================
   Fixtures list
   ============================================================================ */

.fixtures-list { display: flex; flex-direction: column; gap: var(--s-2); }

.fixture {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  gap: var(--s-4);
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  transition: border-color 0.15s, background 0.15s;
}
.fixture:hover { border-color: var(--border-bright); background: var(--surface-2); }

.fixture-time { font-family: var(--font-mono); font-size: 0.875rem; color: var(--brand-orange); font-weight: 600; }
.fixture-time small { display: block; color: var(--text-faint); font-size: 0.7rem; margin-top: 2px; }
.fixture-teams { font-weight: 600; }
.fixture-teams .vs { color: var(--text-faint); margin: 0 var(--s-2); font-weight: 400; }
.fixture-league { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
.fixture-cta {
  font-size: 0.75rem; font-weight: 600;
  padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--brand-red-bright);
  border: 1px solid var(--border-bright);
  text-align: center;
}
.fixture-cta:hover { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }

@media (max-width: 620px) {
  .fixture { grid-template-columns: 70px 1fr; }
  .fixture-cta { display: none; }
}

/* ============================================================================
   Content pages (about, review)
   ============================================================================ */

.prose { max-width: 70ch; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { margin-top: var(--s-7); margin-bottom: var(--s-3); }
.prose h3 { margin-top: var(--s-5); margin-bottom: var(--s-2); color: var(--text); }
.prose p { color: var(--text-dim); line-height: 1.7; }
.prose ul, .prose ol { padding-left: var(--s-5); color: var(--text-dim); }
.prose li + li { margin-top: var(--s-2); }
.prose strong { color: var(--text); }

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-5);
}
@media (max-width: 820px) { .feature-row { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5);
}
.feature .icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-3);
  font-size: 1.25rem;
}
.feature h3 { margin-bottom: var(--s-2); font-size: 1.05rem; }
.feature p { color: var(--text-dim); font-size: 0.9rem; }

.score-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3);
  margin-top: var(--s-4);
}
.score-tile {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--s-4);
}
.score-tile .label { color: var(--text-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s-2); }
.score-tile .value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; }
.score-tile .bar { height: 6px; background: var(--surface-3); border-radius: var(--r-pill); margin-top: var(--s-2); overflow: hidden; }
.score-tile .bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-red), var(--brand-orange), var(--brand-gold)); border-radius: var(--r-pill); }

/* ============================================================================
   CTA band
   ============================================================================ */

.cta-band {
  margin: var(--s-8) 0;
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(245,158,11,0.08));
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--s-5);
  align-items: center;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin-bottom: var(--s-2); }
.cta-band p { color: var(--text-dim); }
.cta-band .right { display: flex; justify-content: flex-end; }
@media (max-width: 820px) {
  .cta-band { grid-template-columns: 1fr; padding: var(--s-5); }
  .cta-band .right { justify-content: flex-start; }
}

/* ============================================================================
   Loading & empty states
   ============================================================================ */

.skeleton {
  position: relative; overflow: hidden;
  background: var(--surface-1);
  border-radius: var(--r-md);
  min-height: 160px;
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-2), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.empty {
  background: var(--surface-1); border: 1px dashed var(--border);
  border-radius: var(--r-lg); padding: var(--s-6); text-align: center;
  color: var(--text-dim);
}
.empty strong { color: var(--text); display: block; margin-bottom: var(--s-2); }

/* ============================================================================
   Footer
   ============================================================================ */

footer.site {
  margin-top: var(--s-8);
  border-top: 1px solid var(--border);
  padding: var(--s-7) 0 var(--s-5);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.4));
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-6); margin-bottom: var(--s-6); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s-5); } }

footer.site h4 { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-3); font-weight: 600; }
footer.site ul { list-style: none; }
footer.site li + li { margin-top: var(--s-2); }
footer.site a { color: var(--text-dim); font-size: 0.9rem; }
footer.site a:hover { color: var(--text); }

.rg-band {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  font-size: 0.8rem; color: var(--text-dim); line-height: 1.6;
}
.rg-band strong { color: var(--text); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-3);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-faint);
}

/* ============================================================================
   Sticky bottom CTA (mobile only)
   ============================================================================ */

.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  z-index: 40;
  display: none;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  color: #fff; font-weight: 700; font-size: 0.95rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), var(--glow-red);
}
@media (max-width: 820px) { .sticky-cta { display: block; } }

/* ============================================================================
   Utility
   ============================================================================ */

.hide { display: none !important; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: var(--s-3); }
.mt-5 { margin-top: var(--s-5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
