:root {
  --bg: #060818;
  --bg-2: #0a0e26;
  --card: #0e1430;
  --card-2: #131a3d;
  --line: #1c2447;
  --text: #e7ecf7;
  --muted: #8a93b3;
  --cyan: #00d9ff;
  --gold: #ffb800;
  --green: #00e68c;
  --red: #ff486b;
  --glow-cyan: 0 0 18px rgba(0, 217, 255, 0.35);
  --glow-gold: 0 0 18px rgba(255, 184, 0, 0.30);
  --r-md: 14px;
  --r-lg: 20px;
}

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

html, body {
  background: radial-gradient(1200px 800px at 80% -10%, #11183a 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; }

/* ─── Topbar ─────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  background: rgba(6, 8, 24, 0.92);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 24px; }
.brand-text { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.ai { color: var(--cyan); }

.agent-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
  font-family: 'DM Mono', monospace;
}
.agent-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.agent-pill[data-state="online"] .dot {
  background: var(--green); box-shadow: 0 0 10px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
.agent-pill[data-state="online"] { color: var(--text); }
.agent-pill[data-state="offline"] .dot { background: var(--red); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.9); }
}

/* ─── Hero ─────────────────────────────────────────── */
.hero { padding: 38px 18px 22px; max-width: 720px; }
.hero h1 {
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.1;
}
.grad {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .sub {
  margin-top: 14px; color: var(--muted); font-size: 15px;
  max-width: 600px;
}

/* ─── Stats bar ─────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 18px 18px;
  max-width: 720px;
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.stat .num {
  font-family: 'DM Mono', monospace;
  font-size: 22px; font-weight: 600;
  color: var(--cyan);
}
.stat .lbl {
  color: var(--muted); font-size: 12px; margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ─── Blocks ─────────────────────────────────────────── */
.block { padding: 16px 18px; max-width: 1100px; }
.block-title {
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text);
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.block-title.centered { display: flex; justify-content: center; margin-top: 6px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 10px var(--red);
  animation: pulse 1.4s ease-in-out infinite;
  display: inline-block;
}

.grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

.empty {
  background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--r-md); padding: 18px;
  color: var(--muted); text-align: center; font-size: 13px;
}

/* ─── Match card ─────────────────────────────────────────── */
.mcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
  position: relative; overflow: hidden;
}
.mcard.has-vip { border-color: rgba(255, 184, 0, 0.5); }
.mcard.has-pro { border-color: rgba(0, 217, 255, 0.4); }
.mcard.has-alert::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: linear-gradient(180deg, var(--gold), var(--red));
}
.mc-row1 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.mc-league {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.mc-time {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--cyan);
}
.mc-time.live { color: var(--red); }
.mc-teams { font-weight: 600; font-size: 16px; line-height: 1.25; }
.mc-pick-area { margin-top: 10px; }
.mc-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--muted);
}
.tag.tier-basic { color: #b0c5ff; border-color: rgba(176, 197, 255, 0.3); }
.tag.tier-pro   { color: var(--cyan); border-color: rgba(0, 217, 255, 0.4); }
.tag.tier-vip   { color: var(--gold); border-color: rgba(255, 184, 0, 0.5); background: rgba(255, 184, 0, 0.07); }
.tag.alert      { color: var(--red); border-color: rgba(255, 72, 107, 0.45); }
.tag.confidence { color: var(--green); border-color: rgba(0, 230, 140, 0.35); }

/* Locked pick reveal — blurred + lock overlay */
.locked-pick {
  position: relative; padding: 12px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.locked-pick .blur {
  filter: blur(6px); user-select: none; pointer-events: none;
  font-family: 'DM Mono', monospace; font-size: 13px;
  color: var(--text);
}
.locked-pick .lock {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  background: rgba(6, 8, 24, 0.55);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.locked-pick .lock .ic { font-size: 18px; }
.locked-pick .lock .hint { font-size: 11px; color: var(--muted); font-weight: 400; }

.unlocked-result {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line);
  font-family: 'DM Mono', monospace; font-size: 13px;
}
.unlocked-result .res-pick { color: var(--text); }
.unlocked-result .res-status.won  { color: var(--green); }
.unlocked-result .res-status.lost { color: var(--red); }
.unlocked-result .res-status.void { color: var(--muted); }

/* ─── Plans ─────────────────────────────────────────── */
.plans { padding: 28px 18px 14px; max-width: 1100px; }
.plan-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 16px;
}
@media (min-width: 820px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px 20px;
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
}
.plan.popular {
  border-color: var(--cyan); box-shadow: var(--glow-cyan);
}
.plan.tier-vip {
  border-color: var(--gold); box-shadow: var(--glow-gold);
  background: linear-gradient(180deg, var(--card) 0%, #1d1810 100%);
}
.popular-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--cyan); color: #000;
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
}
.plan-head {
  display: flex; align-items: baseline; justify-content: space-between;
}
.plan-tag {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--muted);
}
.plan.tier-pro .plan-tag { color: var(--cyan); }
.plan.tier-vip .plan-tag { color: var(--gold); }
.plan-price {
  font-family: 'DM Mono', monospace;
  font-size: 26px; font-weight: 600;
}
.plan-price small {
  font-size: 12px; color: var(--muted); margin-left: 2px;
}
.plan-tag-line {
  color: var(--muted); font-size: 13px; margin-top: -4px;
}
.plan ul {
  list-style: none; display: flex; flex-direction: column; gap: 7px;
  font-size: 13px;
}
.plan ul li::before {
  content: '✓ '; color: var(--cyan); font-weight: 800;
}
.plan.tier-vip ul li::before { color: var(--gold); }
.cta-btn {
  background: var(--cyan); color: #000;
  border-radius: 12px; padding: 12px 16px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
  transition: transform 0.1s, box-shadow 0.15s;
  margin-top: auto;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: var(--glow-cyan); }
.cta-btn.vip {
  background: var(--gold);
}
.cta-btn.vip:hover { box-shadow: var(--glow-gold); }
.plan.tier-basic .cta-btn { background: var(--text); }

/* ─── Telegram CTA ─────────────────────────────────────────── */
.telegram-cta { padding: 24px 18px; max-width: 720px; }
.tg-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, #2aabee 0%, #229ed9 100%);
  border-radius: var(--r-lg); padding: 18px 20px;
  color: #fff;
}
.tg-icon { font-size: 32px; }
.tg-text { display: flex; flex-direction: column; }
.tg-text strong { font-size: 16px; }
.tg-text span { font-size: 12px; opacity: 0.9; }
.tg-link {
  margin-left: auto;
  background: rgba(255,255,255,0.18); color: #fff;
  padding: 9px 14px; border-radius: 10px;
  font-weight: 700;
}
.tg-link:hover { background: rgba(255,255,255,0.28); }

/* ─── Footer ─────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding: 18px 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 12px; color: var(--muted);
  flex-wrap: wrap;
}
.foot-links { display: flex; align-items: center; gap: 8px; }
.foot-links span { color: var(--line); }
.login-btn {
  background: transparent; color: var(--cyan);
  font-size: 12px; padding: 0;
}

/* ─── Modal ─────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px;
  width: 100%; max-width: 360px;
  position: relative;
}
.modal-close {
  position: absolute; top: 8px; right: 12px;
  background: transparent; color: var(--muted);
  font-size: 22px;
}
.modal h3 { margin-bottom: 6px; }
.muted { color: var(--muted); }
.muted.small { font-size: 12px; margin-top: 8px; }
#login-form {
  display: flex; flex-direction: column; gap: 10px; margin-top: 14px;
}
#login-form input {
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); padding: 10px 12px; border-radius: 10px;
  font-family: inherit; font-size: 14px;
}
#login-form input:focus {
  outline: none; border-color: var(--cyan); box-shadow: var(--glow-cyan);
}
#login-error { color: var(--red); }
