/* ============================================================
   Sportsbook API — design system (user area)
   Near-black surfaces, violet accent, pill navigation,
   bold display type.
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --card: #161619;
  --card-2: #1d1d21;
  --border: rgba(255, 255, 255, 0.07);
  --text: #f4f4f6;
  --muted: #98989f;
  --faint: #66666e;
  --violet: #8b7cf6;
  --violet-2: #a78bfa;
  --violet-dim: rgba(139, 124, 246, 0.16);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.14);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.14);
  --yellow: #facc15;
  --yellow-dim: rgba(250, 204, 21, 0.14);
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 28px;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 30px; width: auto; display: block; }
.auth-card .brand-logo { height: 44px; }
.footer .brand-logo { height: 34px; }

.pills { display: flex; gap: 6px; }
.pill {
  padding: 9px 16px; border-radius: 999px; border: none;
  background: #1b1b1f; color: var(--muted);
  font-size: 13px; font-weight: 500;
  transition: color .15s, background .15s;
}
.pill:hover { color: var(--text); }
.pill.active { background: #fff; color: #0a0a0b; font-weight: 600; }

.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: #1b1b1f; border: 1px solid var(--border);
  color: var(--muted); font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--text); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--violet-dim); color: var(--violet-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

/* ---------- layout ---------- */

.container { max-width: 1200px; margin: 0 auto; padding: 40px 28px 80px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.page-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: 14px; }

.date-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1b1b1f; border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 14px;
  color: var(--muted); font-size: 13px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--violet); color: #fff; border: none;
  border-radius: 12px; padding: 11px 20px;
  font-size: 14px; font-weight: 600;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn.ghost { background: #1b1b1f; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: #232327; }
.btn.danger { background: var(--red-dim); color: var(--red); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- cards & stats ---------- */

.cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 22px;
}
.card {
  background:
    radial-gradient(120% 90% at 50% -30%, rgba(139, 124, 246, 0.09), transparent 55%),
    linear-gradient(180deg, #1a1a1f 0%, #141417 100%);
  border-radius: var(--r-lg); padding: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.card .label { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.card .value { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.card .value.accent { color: var(--violet-2); }
.card .sub { margin-top: 8px; font-size: 12px; color: var(--faint); }

.delta { font-size: 12px; font-weight: 700; margin-left: 8px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

.section { margin-bottom: 26px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.section-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }

/* ---------- badges ---------- */

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: #232327; color: var(--muted);
}
.badge.ok { background: var(--green-dim); color: var(--green); }
.badge.warn { background: var(--yellow-dim); color: var(--yellow); }
.badge.off { background: #232327; color: var(--faint); }
.badge.violet { background: var(--violet-dim); color: var(--violet-2); }

/* ---------- tables ---------- */

.table-card {
  background:
    radial-gradient(120% 90% at 50% -30%, rgba(139, 124, 246, 0.06), transparent 55%),
    linear-gradient(180deg, #1a1a1f 0%, #141417 100%);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 14px 18px;
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--border);
}
td { padding: 14px 18px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td.mono { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ---------- forms ---------- */

.input, select.input {
  width: 100%;
  background: #1b1b1f; border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 14px;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.input:focus { outline: none; border-color: var(--violet); }
select.input { width: auto; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }

.form-error {
  background: var(--red-dim); color: var(--red);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 14px; display: none;
}

/* ---------- code ---------- */

pre.code {
  background: #101013;
  border-radius: var(--r); padding: 16px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  overflow-x: auto; color: #d6d6dc;
}
code.inline {
  font-family: var(--mono); font-size: 12px;
  background: #1b1b1f; border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 7px; color: var(--violet-2);
}

/* ---------- key reveal ---------- */

.key-reveal {
  background: var(--violet-dim);
  border-radius: var(--r); padding: 16px; margin-bottom: 16px; display: none;
}
.key-reveal .hint { font-size: 13px; color: var(--violet-2); margin-bottom: 10px; }
.key-reveal .row { display: flex; gap: 10px; align-items: center; }
.key-reveal code {
  flex: 1; font-family: var(--mono); font-size: 13px;
  background: #101013; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
  overflow-x: auto; white-space: nowrap;
}

/* ---------- landing ---------- */

.hero { padding: 70px 0 46px; }
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -2px; line-height: 1.05; max-width: 720px; }
.hero h1 em { font-style: normal; color: var(--violet-2); }
.hero p { color: var(--muted); font-size: 16px; max-width: 560px; margin: 18px 0 28px; line-height: 1.6; }
.hero .actions { display: flex; gap: 12px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.feature .ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--violet-dim); color: var(--violet-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 16px;
}
.feature h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.plan-card { position: relative; }
.plan-card.popular {
  background:
    radial-gradient(120% 90% at 50% -30%, rgba(139, 124, 246, 0.2), transparent 60%),
    linear-gradient(180deg, #1d1c26 0%, #15141a 100%);
  box-shadow: inset 0 0 0 1px rgba(139, 124, 246, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
}
.plan-card .plan-name { font-size: 14px; font-weight: 700; color: var(--violet-2); margin-bottom: 6px; }
.plan-card .price { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.plan-card ul { list-style: none; margin-top: 16px; }
.plan-card li { color: var(--muted); font-size: 13.5px; padding: 7px 0; border-top: 1px solid var(--border); }
.plan-card li b { color: var(--text); font-weight: 600; }

footer {
  text-align: center; color: var(--faint); font-size: 13px;
  padding: 34px; border-top: 1px solid var(--border);
}

/* ---------- auth pages ---------- */

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px;
  background:
    radial-gradient(120% 90% at 50% -30%, rgba(139, 124, 246, 0.12), transparent 55%),
    linear-gradient(180deg, #1a1a1f 0%, #141417 100%);
  border-radius: var(--r-lg); padding: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.auth-card .brand { margin-bottom: 26px; }
.auth-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-card .alt { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-card .alt a { color: var(--violet-2); }

/* ---------- docs ---------- */

.docs { max-width: 900px; }
.docs h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.docs h2 {
  font-size: 19px; font-weight: 700; margin: 44px 0 14px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.docs h3 { font-size: 15px; font-weight: 700; margin: 26px 0 10px; }
.docs p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 12px; }

.endpoint {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-2);
  border-radius: 12px; padding: 11px 16px; margin-bottom: 10px;
  font-family: var(--mono); font-size: 13px;
}
.endpoint .method {
  color: var(--violet-2); background: var(--violet-dim);
  font-weight: 700; min-width: 46px; text-align: center;
  border-radius: 7px; padding: 3px 0; font-size: 11.5px;
}

.param-table td:first-child { font-family: var(--mono); white-space: nowrap; color: var(--violet-2); }

/* ---------- misc ---------- */

.hidden { display: none !important; }
.spinner { color: var(--faint); padding: 40px !important; text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; align-items: start; }
.split .card h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.kv:first-of-type { border-top: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input { width: auto; }
.toolbar .grow { flex: 1; min-width: 160px; }

@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .pills { overflow-x: auto; }
  .hero h1 { font-size: 36px; }
  .container { padding: 28px 16px 60px; }
}
