:root {
  color-scheme: dark;
  --bg: #090b12;
  --panel: #121724;
  --panel-2: #191f2f;
  --text: #f6f7fb;
  --muted: #9ca6bb;
  --line: #2a3348;
  --primary: #8b5cf6;
  --primary-2: #6d3ee7;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(139,92,246,.18), transparent 30%),
    radial-gradient(circle at 100% 20%, rgba(239,68,68,.11), transparent 28%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  min-height: 72px; padding: 14px clamp(18px, 4vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(9,11,18,.82);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
}
.brand { display:flex; align-items:center; gap:12px; font-size:1.18rem; font-weight:800; }
.brand-mark {
  width:40px; height:40px; display:grid; place-items:center; border-radius:12px;
  background: linear-gradient(135deg, var(--primary), #ef4444);
  box-shadow: 0 10px 34px rgba(139,92,246,.25);
}
.nav { display:flex; align-items:center; gap:18px; color:var(--muted); font-weight:600; }
.nav a:hover { color:var(--text); }
.shell { width:min(1180px, calc(100% - 32px)); margin:0 auto; padding:34px 0 50px; }
.hero { padding:72px 0 48px; display:grid; grid-template-columns:1.2fr .8fr; gap:28px; align-items:center; }
.eyebrow { color:#bca7ff; text-transform:uppercase; letter-spacing:.14em; font-size:.78rem; font-weight:800; }
h1 { margin:.3em 0; font-size:clamp(2.4rem, 6vw, 5.2rem); line-height:.98; letter-spacing:-.055em; }
h2,h3 { margin-top:0; }
.lead { max-width:660px; color:var(--muted); font-size:1.08rem; line-height:1.8; }
.actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; }
.button, button {
  border:0; cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  min-height:46px; padding:0 20px; border-radius:13px; color:white;
  background:linear-gradient(135deg, var(--primary), var(--primary-2));
  font:inherit; font-weight:800; box-shadow:0 12px 30px rgba(109,62,231,.22);
}
.button.secondary { background:var(--panel-2); border:1px solid var(--line); box-shadow:none; }
.button.small { min-height:38px; padding:0 15px; }
.grid { display:grid; gap:20px; }
.grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.dashboard { grid-template-columns:300px minmax(0,1fr); align-items:start; }
.card {
  background:linear-gradient(180deg, rgba(25,31,47,.95), rgba(18,23,36,.95));
  border:1px solid var(--line); border-radius:var(--radius); padding:24px;
  box-shadow:0 20px 70px rgba(0,0,0,.23);
}
.glow { position:relative; overflow:hidden; }
.glow:after { content:""; position:absolute; width:180px; height:180px; border-radius:50%; filter:blur(35px); background:rgba(139,92,246,.2); right:-60px; top:-70px; }
.stat-row { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid rgba(255,255,255,.07); }
.stat-row:last-child { border-bottom:0; }
.muted { color:var(--muted); }
.badge { display:inline-flex; padding:7px 10px; border-radius:999px; background:rgba(139,92,246,.14); color:#cabaff; font-size:.8rem; font-weight:800; }
.bar { height:10px; background:#080b12; border-radius:999px; overflow:hidden; margin:9px 0 4px; border:1px solid rgba(255,255,255,.05); }
.bar > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--primary), #db4bff); }
.bar.health > span { background:linear-gradient(90deg,#ef4444,#fb7185); }
.bar.energy > span { background:linear-gradient(90deg,#06b6d4,#6366f1); }
.form-card { width:min(560px,100%); margin:34px auto; }
label { display:block; font-size:.92rem; font-weight:700; margin:17px 0 8px; }
input, select {
  width:100%; min-height:48px; border-radius:12px; border:1px solid var(--line);
  background:#0d111b; color:var(--text); padding:0 14px; font:inherit; outline:none;
}
input:focus, select:focus { border-color:var(--primary); box-shadow:0 0 0 4px rgba(139,92,246,.12); }
.radio-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.choice { border:1px solid var(--line); border-radius:15px; padding:18px; background:#0d111b; }
.choice input { width:auto; min-height:0; margin-right:8px; }
.alert { margin-bottom:18px; padding:14px 16px; border-radius:13px; border:1px solid var(--line); background:var(--panel); }
.alert.error { border-color:rgba(239,68,68,.5); background:rgba(127,29,29,.35); }
.alert.success { border-color:rgba(34,197,94,.45); background:rgba(20,83,45,.35); }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:13px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
th { color:var(--muted); font-size:.82rem; text-transform:uppercase; letter-spacing:.06em; }
.footer { padding:30px; text-align:center; color:var(--muted); }
.code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; background:#090c14; padding:3px 7px; border-radius:7px; }
@media (max-width: 820px) {
  .hero, .dashboard, .grid.two, .grid.three { grid-template-columns:1fr; }
  .nav { gap:10px; font-size:.88rem; }
  .nav a:not(.button) { display:none; }
  .shell { width:min(100% - 22px,1180px); padding-top:22px; }
  .card { padding:19px; }
}