:root {
  --bg: #0f1923;
  --card: #1a2735;
  --accent: #e53935;
  --gold: #ffc107;
  --text: #e0e0e0;
  --muted: #8899aa;
  --border: #2a3a4a;
  --over: #4caf50;
  --under: #2196f3;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh;
}

/* Top Bar */
.topbar {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  padding: 12px 16px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
.topbar .logo { font-size: 20px; font-weight: 800; color: var(--accent); }
.topbar .logo span { color: var(--gold); }
.topbar .user-btn {
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer;
}
.topbar .user-btn.logged-in { background: var(--accent); border-color: var(--accent); }

/* Hero */
.hero {
  text-align: center; padding: 30px 16px 20px;
  background: linear-gradient(180deg, #1a1a2e22, var(--bg));
}
.hero h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.hero h1 .red { color: var(--accent); }
.hero p { color: var(--muted); font-size: 14px; }

/* Expert Cards */
.container { max-width: 640px; margin: 0 auto; padding: 0 16px 40px; }
.section-title { font-size: 16px; font-weight: 600; margin: 24px 0 12px; color: var(--gold); }

.expert-card {
  background: var(--card); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; border: 1px solid var(--border);
  transition: transform .2s;
}
.expert-card:active { transform: scale(0.98); }
.expert-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.expert-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.expert-name { font-weight: 700; font-size: 16px; }
.expert-scope { font-size: 12px; color: var(--muted); }
.expert-stats { display: flex; gap: 16px; margin: 8px 0; font-size: 13px; }
.expert-stats span { color: var(--gold); font-weight: 600; }
.expert-pick {
  background: #0a1620; border-radius: 8px; padding: 10px; margin-top: 8px;
  font-size: 13px; border-left: 3px solid var(--accent);
}
.pick-label { color: var(--muted); font-size: 11px; }
.pick-match { font-weight: 600; margin: 2px 0; }
.pick-odds { color: var(--gold); }
.subscribe-btn {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  background: linear-gradient(135deg, var(--accent), #c62828);
  color: #fff; border: none; border-radius: 8px; font-size: 14px;
  font-weight: 600; cursor: pointer;
}

/* Public Picks */
.public-card {
  background: linear-gradient(135deg, #1a1a2e, var(--card));
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--gold); position: relative;
}
.public-badge {
  position: absolute; top: -8px; right: 12px;
  background: var(--gold); color: #000; padding: 2px 12px;
  border-radius: 12px; font-size: 11px; font-weight: 700;
}

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--card); border-radius: 16px; padding: 24px;
  width: 90%; max-width: 380px; border: 1px solid var(--border);
}
.modal h3 { font-size: 18px; margin-bottom: 16px; text-align: center; }
.modal input {
  width: 100%; padding: 12px; margin: 8px 0; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-size: 15px;
}
.modal .btn {
  width: 100%; padding: 12px; margin-top: 12px; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.modal .btn-primary { background: var(--accent); color: #fff; }
.modal .btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.modal .btn-wechat { background: #07C160; color: #fff; display: flex;
  align-items: center; justify-content: center; gap: 8px; }

.wechat-qr {
  text-align: center; padding: 20px;
}
.wechat-qr .qr-placeholder {
  width: 200px; height: 200px; margin: 16px auto;
  background: #fff; border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  color: #333; font-size: 14px;
}

/* Tabs */
.tabs { display: flex; gap: 8px; margin: 12px 0; overflow-x: auto; }
.tab {
  padding: 8px 16px; border-radius: 20px; font-size: 13px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Plan cards */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.plan-card {
  background: var(--bg); border-radius: 10px; padding: 12px;
  text-align: center; border: 1px solid var(--border); cursor: pointer;
}
.plan-card.selected { border-color: var(--gold); background: #1a1a2e; }
.plan-card .plan-duration { font-size: 12px; color: var(--muted); }
.plan-card .plan-price { font-size: 22px; font-weight: 700; color: var(--gold); margin: 4px 0; }
.plan-card .plan-unit { font-size: 11px; color: var(--muted); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 12px 24px; border-radius: 8px;
  font-size: 14px; z-index: 300; opacity: 0; transition: opacity .3s;
}
.toast.show { opacity: 1; }
