:root {
  --bg-rack: #0a0d14;
  --panel-bg: #111722;
  --card-bg: #151d2c;
  --card-border: #222d42;
  --card-border-light: rgba(255, 255, 255, 0.08);
  --accent-cyan: #0ea5e9;
  --accent-blue: #2563eb;
  --accent-amber: #d97706;
  --accent-emerald: #059669;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-yellow: #ca8a04;
  --accent-red: #dc2626;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
  background: var(--bg-rack);
  color: var(--text-primary);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  padding: 10px 14px;
}

.host-container {
  width: 100%;
  max-width: 1920px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Header - Broadcast Rack Style */
header.host-header {
  height: 46px;
  min-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.host-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}

.host-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 1px solid var(--card-border);
  padding-left: 10px;
}

.header-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-link:hover { filter: brightness(1.15); }

/* 3-Column Appliance Layout */
.host-grid-3col {
  display: grid;
  grid-template-columns: 360px 1fr 380px;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 66px);
}

.col-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
}

/* Hardware Module Card */
.appliance-card {
  background: var(--panel-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 16px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-header-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Digital LED Clock for Countdown & Real 12h Master Clock */
.led-clock-box {
  background: #070a0f;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.clock-col-left, .clock-col-right {
  display: flex;
  flex-direction: column;
}

.clock-col-right {
  align-items: flex-end;
}

.clock-sublabel {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.led-clock-real {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.led-clock-digits {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.35rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.preset-pill-group {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.preset-btn {
  flex: 1;
  padding: 5px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: #162030;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.preset-btn:hover { background: #1e2c42; color: #fff; }
.preset-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.5);
}

/* Stack of Radio Buttons for Game Selection */
.game-radio-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  justify-content: space-between;
}

.game-radio-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #090e17;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.game-radio-tile:hover {
  background: #111a28;
  border-color: #334155;
}

.game-radio-tile input[type="radio"] {
  display: none;
}

.radio-indicator {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.game-radio-tile.active {
  background: rgba(2, 132, 199, 0.15);
  border-color: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.25);
}

.game-radio-tile.active .radio-indicator {
  border-color: #38bdf8;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.game-tile-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.game-tile-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-tile-desc {
  font-size: 0.63rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-tile-load {
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 6px;
  border: 1px solid #059669;
  background: linear-gradient(180deg, #10b981, #059669);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.btn-tile-load:hover {
  filter: brightness(1.2);
  transform: scale(1.05);
}
.btn-tile-load:active {
  transform: scale(0.95);
}

/* 4x2 Balanced Hardware Switcher Grid (4 Left, 4 Right) */
.switcher-grid-4x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
  margin-bottom: 10px;
}

.appliance-btn {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  transition: all 0.12s ease;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 3px 8px rgba(0, 0, 0, 0.4);
  height: 100%;
  min-height: 72px;
}

.appliance-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.appliance-btn .btn-label {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.appliance-btn .btn-desc {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.88;
  margin-top: 3px;
  line-height: 1.25;
}

/* Button Colors (All standard 1-col size) */
.btn-style-start {
  background: linear-gradient(180deg, #10b981, #047857);
  border-color: #34d399;
}

.btn-style-wheel {
  background: linear-gradient(180deg, #db2777, #be185d);
  border-color: #f472b6;
}

.btn-style-next {
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border-color: #38bdf8;
}

.btn-style-reveal {
  background: linear-gradient(180deg, #d97706, #b45309);
  border-color: #fbbf24;
}

.btn-style-scores {
  background: linear-gradient(180deg, #7c3aed, #6d28d9);
  border-color: #a78bfa;
}

.btn-style-podium {
  background: linear-gradient(180deg, #ca8a04, #a16207);
  border-color: #facc15;
}

.btn-style-utility {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-color: #334155;
  color: #cbd5e1;
}
.btn-style-utility:hover { background: #334155; color: #fff; }

.btn-style-danger {
  background: linear-gradient(180deg, #7f1d1d, #991b1b);
  border-color: #f87171;
}

/* Prominent Live Response Telemetry in Center Column */
.monitor-strip-predominant {
  background: #06090f;
  border: 1px solid #1e293d;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.monitor-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.monitor-title {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.75px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.telemetry-big-tag {
  font-size: 1.2rem;
  font-weight: 900;
  color: #38bdf8;
  font-family: "Courier New", Courier, monospace;
}

.telemetry-progress-bg-big {
  height: 14px;
  background: #0f172a;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
}

.telemetry-progress-bar-big {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
  border-radius: 999px;
  transition: width 0.25s ease;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.telemetry-sub-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

/* System Audio & Telemetry Footer in Center Column */
.telemetry-footer-card {
  margin-top: auto;
  background: #080c14;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-live {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-standby {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Column 3: Simulator & Roster */
.sim-panel {
  background: #0d1420;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.sim-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.sim-action-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}

.sim-btn-spawn {
  background: #0284c7;
  color: #fff;
}
.sim-btn-spawn:hover { background: #0369a1; }

.sim-btn-clear {
  background: #1e293b;
  color: #94a3b8;
}
.sim-btn-clear:hover { background: #334155; color: #fff; }

.roster-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.roster-scroll-box {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 4px;
}

.roster-scroll-box::-webkit-scrollbar {
  width: 5px;
}
.roster-scroll-box::-webkit-scrollbar-thumb {
  background: #253347;
  border-radius: 4px;
}

.roster-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #090e17;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
}

.roster-entry-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.roster-kick-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
}
.roster-kick-btn:hover { color: #ef4444; }

/* Network Inputs */
.net-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: #070a0f;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
