:root {
  --bg-dark: #040911;
  --bg-panel: rgba(10, 22, 38, 0.88);
  --cyan: #00f0ff;
  --cyan-dim: rgba(0, 240, 255, 0.25);
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --blue: #3b82f6;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

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

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(0, 240, 255, 0.08), transparent 60%),
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header & Navigation */
.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(6, 15, 28, 0.95);
  border-bottom: 2px solid var(--cyan-dim);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.12);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.brand-title {
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--cyan);
  font-size: 1rem;
}

.brand-loc {
  font-size: 0.75rem;
  color: var(--text-muted);
  border-left: 1px solid var(--cyan-dim);
  padding-left: 0.75rem;
}

.mode-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn, .icon-btn, .hud-btn {
  background: rgba(15, 32, 55, 0.8);
  color: var(--text-main);
  border: 1px solid var(--cyan-dim);
  padding: 0.5rem 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.tab-btn:hover, .hud-btn:hover, .icon-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.tab-btn.active, .hud-btn.primary {
  background: var(--cyan);
  color: #020810;
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
}

.hud-btn.danger {
  border-color: var(--rose);
  color: var(--rose);
}

/* Panels */
.view-panel {
  display: none;
  flex: 1;
  padding: 1.5rem 2.5rem;
  flex-direction: column;
  justify-content: space-between;
}

.view-panel.active {
  display: flex;
}

/* Slide Deck */
.deck-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1350px;
  width: 100%;
  margin: 0 auto;
}

.slide {
  display: none;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

.slide.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-badge {
  display: inline-block;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
  background: rgba(0, 240, 255, 0.08);
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.lead {
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  color: #cbd5e1;
  max-width: 950px;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.team-card {
  background: var(--bg-panel);
  border: 2px solid var(--cyan-dim);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.team-card.red { border-color: var(--rose); box-shadow: inset 0 0 20px rgba(244, 63, 94, 0.15); }
.team-card.blue { border-color: var(--blue); box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.15); }
.team-card.yellow { border-color: var(--amber); box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.15); }
.team-card.green { border-color: var(--emerald); box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.15); }

.team-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.team-card h3 { font-size: 1.35rem; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.start-pts {
  margin-top: 0.75rem;
  font-weight: 900;
  font-size: 1.1rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* Two & Three Column Layouts */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  margin-top: 1.25rem;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.hud-card {
  background: var(--bg-panel);
  border: 1px solid var(--cyan-dim);
  border-left: 5px solid var(--cyan);
  padding: 1.75rem;
  border-radius: 8px;
}

.hud-card h2 {
  color: var(--cyan);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

.hud-card h3 {
  color: var(--cyan);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.tactical-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.2rem;
  line-height: 1.45;
}

.tactical-list li::before {
  content: "▸ ";
  color: var(--cyan);
  font-weight: bold;
}

.hud-stat-box {
  background: var(--bg-panel);
  border: 1px solid var(--cyan-dim);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.big-stat {
  font-size: 4rem;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
}

.text-rose { color: var(--rose); }
.text-emerald { color: var(--emerald); }
.text-amber { color: var(--amber); }

.stat-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.08em;
}

.hud-stat-box hr {
  width: 80%;
  border: 0;
  border-top: 1px solid var(--cyan-dim);
  margin: 1.5rem 0;
}

.hud-callout {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--cyan);
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-size: 1.15rem;
}

/* Deck Footer */
.deck-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1350px;
  width: 100%;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--cyan-dim);
}

.slide-dots {
  display: flex;
  gap: 0.6rem;
}

.slide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.slide-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* Video View */
.video-layout {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-frame {
  border: 2px solid var(--cyan);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.video-frame video {
  width: 100%;
  max-height: 70vh;
  display: block;
}

.scrubber-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  background: var(--bg-panel);
  padding: 1rem;
  border: 1px solid var(--cyan-dim);
  border-radius: 8px;
}

.scrubber-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--cyan);
  margin-right: 0.5rem;
}

/* Command View */
.command-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.5rem;
  max-width: 1350px;
  width: 100%;
  margin: auto;
}

.giant-clock {
  font-size: clamp(4rem, 7vw, 6.5rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
  margin: 1rem 0;
  text-align: center;
}

.clock-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.score-table th, .score-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-table input {
  width: 70px;
  background: #06101e;
  border: 1px solid var(--cyan-dim);
  color: #fff;
  padding: 0.4rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 4px;
}

.total-cell {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--cyan);
}

/* Jailer Pad */
.jailer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto 1rem;
}

.jail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.jail-card {
  background: var(--bg-panel);
  border: 2px solid var(--cyan-dim);
  border-radius: 10px;
  padding: 1.25rem;
}

.jail-row {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.85rem;
  border-radius: 8px;
  margin-top: 0.75rem;
}

.jail-row-top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.jail-btn-group {
  display: flex;
  gap: 0.5rem;
}

.jail-btn-group button {
  flex: 1;
  padding: 0.65rem;
  font-size: 1rem;
  font-weight: 800;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-minus { background: #1e293b; color: #fff; }
.btn-plus { background: var(--cyan); color: #000; }
.btn-vip { background: var(--amber); color: #000; }

.pill-row { display: flex; gap: 0.5rem; margin: 0.75rem 0; flex-wrap: wrap; }
.pill { padding: 0.35rem 0.7rem; border-radius: 4px; font-weight: 800; font-size: 0.9rem; }
.pill.rose { background: rgba(244, 63, 94, 0.2); color: var(--rose); border: 1px solid var(--rose); }
.pill.amber { background: rgba(245, 158, 11, 0.2); color: var(--amber); border: 1px solid var(--amber); }

.ring-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.75rem; font-size: 1.1rem; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.dot.red { background: var(--rose); }
.dot.blue { background: var(--blue); }
.dot.yellow { background: var(--amber); }
.dot.green { background: var(--emerald); }

@media (max-width: 900px) {
  .two-col, .command-grid { grid-template-columns: 1fr; }
}