:root {
  --bg: #08111f;
  --surface: #101b2f;
  --surface-2: #16243d;
  --text: #f4f7fb;
  --muted: #aab7cc;
  --primary: #7dd3fc;
  --primary-strong: #38bdf8;
  --accent: #facc15;
  --danger: #fb7185;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(56,189,248,.22), transparent 35%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.hero { padding: 26px clamp(18px, 4vw, 64px) 70px; }
.nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 70px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.03em; font-size: 1.1rem; }
.nav-link { color: var(--primary); font-weight: 700; }
.hero-content { max-width: 920px; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 8vw, 5.7rem); line-height: .95; letter-spacing: -0.08em; margin: 12px 0 24px; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.05em; margin: 0 0 10px; }
h3 { margin-top: 0; }
.hero-text, .panel p, .footer { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.button { border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 800; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; transition: transform .18s ease, opacity .18s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: #04101d; }
.button.secondary { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.button.full { width: 100%; }
main { padding: 0 clamp(18px, 4vw, 64px) 64px; }
.notice, .panel, .stat-card, .prediction-card { background: rgba(16, 27, 47, .82); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.notice { padding: 18px 22px; color: var(--muted); margin-bottom: 22px; }
.notice strong { color: var(--accent); }
.panel { padding: clamp(22px, 4vw, 40px); margin-bottom: 24px; }
.grid-panel { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
.control-card { background: var(--surface-2); padding: 22px; border-radius: 18px; display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
select, input { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: #07101e; color: var(--text); font: inherit; }
.results { margin: 22px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.prediction-card { padding: 22px; }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); font-size: .9rem; }
.balls { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.ball { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; background: #eaf7ff; color: #07101e; }
.ball.star { background: var(--accent); }
.confidence { color: var(--primary); font-weight: 800; }
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 20px; }
.stat-card { padding: 20px; box-shadow: none; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: rgba(125,211,252,.12); border: 1px solid rgba(125,211,252,.22); color: var(--text); border-radius: 999px; padding: 8px 12px; font-weight: 800; }
.star-list .pill { background: rgba(250,204,21,.13); border-color: rgba(250,204,21,.25); }
.loading { color: var(--primary); margin-bottom: 18px; font-weight: 800; }
.hidden { display: none; }
.footer { text-align: center; padding: 28px; }
@media (max-width: 760px) {
  .grid-panel { grid-template-columns: 1fr; }
  .nav { margin-bottom: 46px; }
  .ball { width: 40px; height: 40px; }
}
