:root {
  --bg: #07080a;
  --ink: #f4f1e8;
  --muted: #9aa08c;
  --volt: #c8f542;
  --volt-dim: #8fb82a;
  --magenta: #ff3cac;
  --gold: #e8c547;
  --card: #11140f;
  --line: #2a3220;
  --danger: #ff5a36;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(900px 500px at 10% -10%, #1a2a08 0%, transparent 55%),
    radial-gradient(700px 400px at 110% 0%, #3a1028 0%, transparent 50%),
    var(--bg);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  z-index: 1;
}

#app { position: relative; z-index: 2; min-height: 100vh; }

h1, h2, h3, .mark {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
  margin: 0;
}

.mono { font-family: "Share Tech Mono", monospace; }

a { color: var(--volt); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--volt);
  clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 20% 100%, 0% 35%);
}

.brand h1 { font-size: 28px; line-height: 1; }
.brand small { color: var(--muted); display: block; font-size: 11px; letter-spacing: 0.28em; }

.hero {
  padding: 72px 40px 40px;
  max-width: 1100px;
}

.hero h2 {
  font-size: clamp(64px, 12vw, 140px);
  line-height: 0.84;
  max-width: 12ch;
}

.hero p {
  max-width: 56ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  padding: 12px 18px;
  background: var(--volt);
  color: #111;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  text-decoration: none;
  display: inline-block;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn.magenta { background: var(--magenta); color: white; }
.btn.gold { background: var(--gold); }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 81px);
}

.side {
  border-right: 1px solid var(--line);
  padding: 24px 18px;
}

.side button, .side a {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.side button.active, .side a.active { color: var(--volt); background: #161b10; }

.main { padding: 28px 36px 80px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, #151910, #0e110c);
  border: 1px solid var(--line);
  padding: 18px;
}

.card h3 { font-size: 28px; margin-bottom: 8px; }
.card p, label { color: var(--muted); font-size: 14px; }

input, select, textarea {
  width: 100%;
  margin: 6px 0 14px;
  padding: 10px 12px;
  background: #0b0d09;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.rank-1 { color: var(--gold); }
.pill {
  display: inline-block;
  padding: 2px 8px;
  background: #1c2410;
  color: var(--volt);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.server-tile {
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
}

.server-tile img, .ph {
  width: 42px;
  height: 42px;
  object-fit: cover;
  background: #222;
}

.flash {
  padding: 10px 12px;
  background: #23180a;
  border: 1px solid var(--gold);
  color: var(--gold);
  margin-bottom: 16px;
}

.error {
  padding: 10px 12px;
  background: #2a100c;
  border: 1px solid var(--danger);
  color: #ffb4a4;
  margin-bottom: 16px;
}

.points-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .top, .hero, .main { padding-left: 18px; padding-right: 18px; }
  .points-grid { grid-template-columns: repeat(2, 1fr); }
}

.scrim-host-panel {
  background: #14171d;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}
.scrim-host-topbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
}
.scrim-host-topbar > div {
  background: #1a1d24;
  padding: 10px 14px;
  font-size: 13px;
}
.scrim-host-topbar label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.scrim-host-status {
  background: #232833;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.scrim-host-body {
  padding: 28px 20px 24px;
  text-align: center;
}
.scrim-host-alert {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1e3a5f;
  color: #60a5fa;
  display: grid;
  place-items: center;
  font-size: 32px;
  margin: 0 auto 16px;
}
.scrim-host-details {
  text-align: left;
  background: #1a1d24;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px auto;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.8;
}
.scrim-host-details strong {
  color: var(--muted);
  font-weight: 500;
  min-width: 110px;
  display: inline-block;
}
.scrim-host-progress {
  max-width: 420px;
  margin: 24px auto 0;
}
.scrim-host-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--muted);
}
.scrim-host-progress-bar {
  height: 6px;
  background: #232833;
  border-radius: 99px;
  overflow: hidden;
}
.scrim-host-progress-bar > span {
  display: block;
  height: 100%;
  background: #3b82f6;
  transition: width 0.3s;
}
.scrim-host-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 420px;
  margin: 20px auto 0;
}
.scrim-host-actions .btn {
  padding: 14px;
  font-size: 15px;
}
.btn.dispatch { background: #3b82f6; color: white; }
.btn.cancel-scrim { background: #ef4444; color: white; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
