/* SimulateGames — refined SaaS UI */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #09090b;
  --bg-elevated: #111113;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.12);
  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.35);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "Consolas", ui-monospace, monospace;
  --max: 1120px;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  width: min(var(--max), 92vw);
  margin: 0 auto;
  padding: 0 4px;
}

/* Nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 8px;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand span { color: var(--accent); }
.brand small { display: none; }

.navlinks {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.navlinks > a:not(.btn) {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.navlinks > a:not(.btn):hover {
  color: var(--text);
  background: var(--surface);
}

.nav-text-btn {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-family: inherit;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.gold, .btn-gold {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn.gold:hover, .btn-gold:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
}

.btn.ghost {
  background: transparent;
}

.btn.block { width: 100%; }

.btn.lg {
  padding: 12px 20px;
  font-size: 0.9375rem;
}

/* Typography */
.page-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  padding-top: 24px;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.page-header .lead {
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.eyebrow::before { display: none; }

.hero {
  padding: 48px 0 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  text-transform: none;
  text-shadow: none;
}

.lead {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 48ch;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}

/* Cards & panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel::before { display: none; }

.card { padding: 24px; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.stat {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.stat b {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  display: block;
  color: var(--text);
  text-shadow: none;
}

.stat.hot {
  border-color: var(--accent-muted);
  background: var(--accent-muted);
}

.stat.hot b { color: var(--accent); }

.muted { color: var(--text-secondary); font-size: 0.875rem; }

.messages { margin: 0 0 20px; }
.msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text);
  font-size: 0.875rem;
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Forms */
label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

input, select {
  width: 100%;
  accent-color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.875rem;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.field {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Pills / badges */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.pill.league-nfl { color: #86efac; border-color: rgba(34, 197, 94, 0.3); background: var(--success-muted); }
.pill.league-mlb { color: #93c5fd; border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.1); }
.pill.league-nhl { color: #cbd5e1; }
.pill.league-mls { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.3); }
.pill.league-ncaaf { color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.pill.league-ncaab { color: #fdba74; border-color: rgba(249, 115, 22, 0.3); }

.badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Footer */
.footer {
  padding: 48px 0 32px;
  margin-top: 64px;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Tooltips */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  vertical-align: middle;
  margin-left: 4px;
}

.info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.info-bubble {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: min(260px, 80vw);
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.info-tip:hover .info-bubble,
.info-tip:focus .info-bubble,
.info-tip:focus-within .info-bubble {
  display: block;
}

.label-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ——— Pricing page ——— */
.pricing-page { padding-bottom: 64px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  border-color: var(--border-strong);
}

.pricing-card--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
  z-index: 1;
}

.pricing-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.pricing-card__desc {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0 0 20px;
  min-height: 2.5em;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.pricing-card__amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pricing-card__period {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 0;
  line-height: 1.45;
}

.pricing-features li::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: var(--success-muted);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2322c55e'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.pricing-features li.muted-feature {
  color: var(--text-tertiary);
}

.pricing-features li.muted-feature::before {
  opacity: 0.35;
}

.pricing-card form { margin-top: auto; }

.pricing-faq {
  max-width: 640px;
  margin: 64px auto 0;
}

.pricing-faq h2 {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.faq-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pricing-compare {
  margin-top: 56px;
  overflow-x: auto;
}

.pricing-compare h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.pricing-compare table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pricing-compare th:first-child,
.pricing-compare td:first-child {
  font-weight: 500;
  color: var(--text);
}

.pricing-compare .check {
  color: var(--success);
  text-align: center;
}

.pricing-compare .dash {
  color: var(--text-tertiary);
  text-align: center;
}

/* Game / sim UI */
.game-hero { margin-bottom: 32px; }
.game-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  margin: 8px 0 12px;
}

.broadcast-line { margin: 24px 0; }

.intel-banner {
  margin-bottom: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.intel-banner__row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.intel-banner h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 8px 0;
}

.intel-banner__insights {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.intel-banner__insights ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-card {
  max-width: 400px;
  margin: 48px auto;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

.auth-card form p { margin-bottom: 16px; }

.auth-card .btn { width: 100%; margin-top: 8px; }

.sim-panel { margin-top: 0; }

.sim-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.sim-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.iterations-box {
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.section-title::after { display: none; }

.mini-upgrade {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
  text-transform: none;
}

.slider-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.slider-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.slider-card.locked { opacity: 0.5; }

.slider-head strong {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  color: var(--text);
}

.slider-value {
  min-width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: none;
}

.slider-range {
  width: 100%;
  margin-top: 14px;
  accent-color: var(--accent);
}

.slider-meta {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: none;
}

.intel-pill {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--warning);
  color: #000;
  border-radius: 4px;
  margin-left: 6px;
}

.slider-card:has([data-trend-applied="true"]) {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.lock-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: var(--radius-sm);
}

.run-bar {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Results */
.result-hero { margin-bottom: 24px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.result-actions form { margin: 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; }
.result-table { min-width: 800px; }
.sharp-panel { border-color: var(--border-strong); }
.sharp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sharp-card {
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.risk-list { color: var(--warning); }
.dist-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.dist-blurb {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.dist-blurb strong {
  color: var(--text);
  font-weight: 600;
}

.dist-blurb .example {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-style: italic;
}

.game-card-link {
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}

.game-card-link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.game-card-link h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 12px 0 6px;
  text-transform: none;
}

/* Hide legacy ticker */
.ticker-bar { display: none; }

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero,
  .grid.two,
  .grid.three,
  .grid.four,
  .pricing-grid,
  .slider-grid,
  .sharp-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .sim-header { flex-direction: column; }
  .nav { gap: 16px; }
  .pricing-card--featured { transform: none; }
}

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