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

/* The `hidden` attribute must win over any class-level `display: flex/grid/block`
   below (kill-btn, minigame-overlay, sabotage-menu, ...). Without this the UA
   `[hidden] { display: none }` rule loses on specificity and "hidden" overlays
   render on top of the game. */
[hidden] {
  display: none !important;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at 50% 30%, #152238 0%, #090d16 100%);
  color: #e0e1dd;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  width: 100%;
  max-width: 520px;
  padding: 20px;
}

.card {
  background: rgba(18, 28, 45, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 32px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 8px;
  letter-spacing: 3px;
  color: #ffd166;
  text-shadow: 0 2px 12px rgba(255, 209, 102, 0.35);
}

.subtitle {
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: #ffd166;
}

button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #ffd166;
  color: #1b263b;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #e0e1dd;
}

button.primary {
  background: #06d6a0;
  color: #0b1622;
}

button.link {
  width: auto;
  background: transparent;
  color: #94a3b8;
  padding: 4px 8px;
}
button.link:hover {
  color: #fff;
}

.button-row {
  display: flex;
  gap: 8px;
}

.button-row button {
  flex: 1;
}

.error {
  color: #ef476f;
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 8px;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.action-box {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 12px;
}

.action-box button {
  margin-top: 6px;
}

/* ─── Lobby ────────────────────────────────────────────────────────── */
.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lobby-header h2 {
  margin: 0;
}

.lobby-count {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 6px;
}

#lobby-code {
  color: #ffd166;
  font-family: monospace;
  font-size: 1.6rem;
  letter-spacing: 4px;
}

.players-list {
  margin: 16px 0;
  max-height: 260px;
  overflow-y: auto;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.crewmate-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.player-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: inline-block;
}

.player-name {
  flex: 1;
  font-weight: 600;
}

.player-ready {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
}
.player-ready.ready {
  color: #06d6a0;
}

.color-picker {
  margin: 16px 0;
}

#color-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  padding: 0;
}

.color-btn.selected {
  border-color: #ffd166;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.6);
}

.lobby-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lobby-actions button {
  flex: 1;
  min-width: 100px;
}

/* ─── HUD & Task Progress Bar ──────────────────────────────────────── */
.task-progress {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 260px;
  background: rgba(11, 18, 30, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 100;
  backdrop-filter: blur(6px);
}

.task-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.task-bar-track {
  width: 100%;
  height: 14px;
  background: #1e293b;
  border: 1.5px solid #475569;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 8px;
}

.task-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #06d6a0 0%, #34d399 100%);
  transition: width 0.35s ease;
}

.task-list-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
}

.task-item {
  color: #ffd166;
  display: flex;
  align-items: center;
  gap: 6px;
}
.task-item.done {
  color: #06d6a0;
  text-decoration: line-through;
  opacity: 0.75;
}
.task-item.impostor-hint {
  color: #ff6b8b;
  font-style: italic;
}

/* HUD Top-right buttons */
.sound-btn, .map-btn {
  position: fixed;
  top: 58px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(11, 18, 30, 0.85);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  z-index: 100;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-btn {
  right: 64px;
}

/* HUD Action Buttons */
.kill-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, #ef4444 0%, #991b1b 100%);
  color: #fff;
  border: 3px solid #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}
.kill-btn:disabled {
  background: #334155;
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

.report-btn {
  position: fixed;
  bottom: 24px;
  right: 120px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fbc02d;
  color: #1b263b;
  border: 3px solid #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(251, 192, 45, 0.5);
}

.sabotage-btn {
  position: fixed;
  bottom: 24px;
  right: 200px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle, #9333ea 0%, #581c87 100%);
  color: #fff;
  border: 3px solid #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.5);
}

.sabotage-menu {
  position: fixed;
  bottom: 104px;
  right: 24px;
  background: #131c2e;
  border: 2px solid #a855f7;
  border-radius: 12px;
  padding: 12px;
  z-index: 101;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.sabotage-menu button {
  width: auto;
  padding: 9px 16px;
  text-align: left;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.sabotage-menu button:hover {
  background: #3b0764;
}

.vent-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #131c2e;
  border: 2px solid #ffd166;
  border-radius: 14px;
  padding: 24px;
  z-index: 200;
  min-width: 260px;
  text-align: center;
}
.vent-menu h3 {
  color: #ffd166;
  margin-bottom: 12px;
}
#vent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.sabotage-alert {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(200, 20, 40, 0.92);
  color: #fff;
  border: 2px solid #ffd166;
  padding: 10px 22px;
  border-radius: 10px;
  z-index: 150;
  font-weight: bold;
  font-size: 1.05rem;
  animation: pulse-alert 1s infinite alternate;
}

@keyframes pulse-alert {
  from { box-shadow: 0 0 8px rgba(239, 71, 111, 0.6); }
  to { box-shadow: 0 0 24px rgba(239, 71, 111, 1); }
}

.interact-prompt {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 18, 30, 0.92);
  border: 2px solid #ffd166;
  color: #ffd166;
  padding: 9px 22px;
  border-radius: 10px;
  z-index: 100;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* ─── Role Reveal Overlay ──────────────────────────────────────────── */
.role-reveal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.94) 0%, rgba(2, 6, 23, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 260;
  animation: fade-in 0.25s ease;
}
.role-reveal-card {
  text-align: center;
  padding: 36px;
}
.role-reveal-title {
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 6px;
  margin-bottom: 10px;
}
.role-reveal-title.crew {
  color: #38bdf8;
  text-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
}
.role-reveal-title.impostor {
  color: #ef476f;
  text-shadow: 0 0 30px rgba(239, 71, 111, 0.7);
}
.role-reveal-sub {
  font-size: 1.2rem;
  color: #e2e8f0;
  margin-bottom: 24px;
}
.role-reveal-avatars {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.reveal-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* ─── Minigames & Sabotage Repair UI ───────────────────────────────── */
.minigame-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.minigame-card {
  background: #162238;
  border: 3px solid #ffd166;
  border-radius: 14px;
  padding: 22px 26px;
  min-width: 370px;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}
.minigame-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.minigame-header h3 {
  color: #ffd166;
  margin: 0;
}

.wire-row { display: flex; align-items: center; gap: 16px; margin: 14px 0; }
.wire-dot { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 3px solid rgba(255,255,255,0.4); transition: transform 0.1s; }
.wire-dot.selected { border-color: #fff; transform: scale(1.18); box-shadow: 0 0 12px #fff; }
.wire-slot { width: 32px; height: 32px; border-radius: 50%; border: 3px dashed #888; cursor: pointer; transition: transform 0.15s; }
.wire-slot.connected { border-style: solid; border-color: #fff !important; }

.download-bar { width: 300px; height: 24px; background: #1e293b; border: 2px solid #475569; border-radius: 12px; overflow: hidden; margin: 16px auto; }
.download-fill { height: 100%; background: #06d6a0; width: 0%; transition: width 0.1s; }
.download-btn { display: block; margin: 12px auto; width: auto; padding: 10px 28px; }

/* Breaker switches (Lights sabotage) */
.breaker-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 16px 0;
}
.breaker-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.breaker-led {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef476f;
  box-shadow: 0 0 8px #ef476f;
  border: 2px solid #000;
}
.breaker-led.on {
  background: #06d6a0;
  box-shadow: 0 0 12px #06d6a0;
}
.breaker-switch {
  width: 44px;
  height: 86px;
  background: #0f172a;
  border: 2px solid #475569;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.breaker-switch.on {
  align-items: flex-start;
  border-color: #06d6a0;
}
.breaker-knob {
  width: 28px;
  height: 32px;
  border-radius: 5px;
  background: #94a3b8;
  border: 2px solid #1e293b;
}
.breaker-switch.on .breaker-knob {
  background: #06d6a0;
}

/* Sticky note & Keypad (O2 / Comms sabotage) */
.sticky-note {
  background: #fef08a;
  color: #1e293b;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 0.95rem;
  transform: rotate(-1deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.sticky-note strong {
  font-size: 1.3rem;
  letter-spacing: 3px;
  font-family: monospace;
}
.keypad-screen {
  background: #09131c;
  border: 2px solid #334155;
  color: #06d6a0;
  font-family: monospace;
  font-size: 1.8rem;
  letter-spacing: 8px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.keypad-btn {
  padding: 12px;
  font-size: 1.15rem;
  background: #334155;
  color: #f8fafc;
}
.keypad-btn:hover {
  background: #475569;
}

/* Reactor handprint pad */
.reactor-hand-pad {
  position: relative;
  width: 140px;
  height: 150px;
  margin: 12px auto;
  border-radius: 16px;
  background: #0f172a;
  border: 3px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}
.reactor-hand-pad .hand-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 10px #38bdf8);
}
.reactor-hand-pad.holding {
  border-color: #06d6a0;
  box-shadow: 0 0 24px rgba(6, 214, 160, 0.5);
}

/* ─── Map Overlay (Minimap) ────────────────────────────────────────── */
.map-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 205;
}
.map-card {
  background: #0d1b2a;
  border: 3px solid #38bdf8;
  border-radius: 14px;
  padding: 18px 22px;
  max-width: 92vw;
}
.map-canvas-wrap canvas {
  display: block;
  border: 2px solid #1e3a5f;
  border-radius: 8px;
  background: #07101c;
}
.map-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* ─── Game Over Screen ─────────────────────────────────────────────── */
.game-over {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(13, 27, 42, 0.95) 0%, rgba(5, 8, 15, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}
.game-over h1 { font-size: 3rem; margin-bottom: 20px; }
.game-over .crew-win { color: #06d6a0; text-shadow: 0 0 24px rgba(6, 214, 160, 0.5); }
.game-over .impostor-win { color: #ef476f; text-shadow: 0 0 24px rgba(239, 71, 111, 0.5); }
.winner-players {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 28px;
}
.winner-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.winner-role-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: bold;
}
.winner-role-tag.impostor { background: rgba(239, 71, 111, 0.25); color: #ff6b8b; }
.winner-role-tag.crew { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.game-over-actions {
  min-width: 240px;
}

/* ─── Meeting Tablet Screen ────────────────────────────────────────── */
.meeting {
  max-width: 820px;
}
.meeting-card {
  position: relative;
  background: #162238;
  border: 3px solid #ffd166;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.meeting-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
}
.meeting-top h2 { color: #ffd166; margin: 0; font-size: 1.35rem; }
#meeting-timer { color: #06d6a0; font-weight: bold; font-size: 1.05rem; }

.meeting-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
}
@media (max-width: 680px) {
  .meeting-body { grid-template-columns: 1fr; }
}

.meeting-chat {
  height: 270px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.chat-msg {
  margin-bottom: 8px;
  font-size: 0.92rem;
  line-height: 1.35;
}
.chat-msg.ghost-msg {
  opacity: 0.78;
  font-style: italic;
  background: rgba(148, 163, 184, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}
.chat-msg .chat-user { font-weight: bold; }

.vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 315px;
  overflow-y: auto;
}
.vote-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  width: 100%;
  text-align: left;
}
.vote-btn:hover:not(:disabled) { border-color: #ffd166; }
.vote-btn.selected { border-color: #06d6a0; background: rgba(6, 214, 160, 0.18); }
.vote-btn.dead-player { opacity: 0.48; background: rgba(120, 20, 30, 0.2); }
.vote-btn .vote-dot { width: 20px; height: 20px; border-radius: 50%; }
.vote-btn .voted-mark {
  margin-left: auto;
  color: #06d6a0;
  font-size: 0.8rem;
  background: rgba(6, 214, 160, 0.15);
  padding: 2px 7px;
  border-radius: 6px;
}
.vote-voters {
  display: flex;
  gap: 3px;
  margin-left: auto;
  align-items: center;
}

.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; margin-bottom: 0; }
.chat-input-row button { width: auto; padding: 10px 18px; }

/* Ejection Space Overlay */
.ejection-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #0b132b 0%, #030712 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
  text-align: center;
}
.ejection-avatar {
  margin-bottom: 18px;
  animation: float-spin 4s linear infinite;
}
@keyframes float-spin {
  0% { transform: translateX(-80px) rotate(0deg); }
  50% { transform: translateX(0px) rotate(180deg); }
  100% { transform: translateX(80px) rotate(360deg); }
}
.ejection-text {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.ejection-sub {
  color: #ffd166;
  font-size: 1.05rem;
}

/* ─── Sub-project 6: Monitors, minigames, stats, audio ─────────────── */

.monitor-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #0d1b2a; border: 3px solid #4ea8de;
  border-radius: 12px; padding: 20px; z-index: 210;
  min-width: 380px; max-width: 560px; max-height: 70vh; overflow-y: auto;
}
.monitor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.monitor-header h3 { color: #4ea8de; margin: 0; }
.monitor-content { color: #fff; }
.monitor-signal-lost {
  text-align: center; color: #ef476f; font-size: 1.2rem; font-weight: bold;
  padding: 32px 16px; letter-spacing: 2px;
}

/* Cameras */
.camera-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.camera-card {
  background: rgba(0,0,0,0.4); border: 1px solid #2c3e50;
  border-radius: 8px; padding: 10px;
}
.camera-card h4 { margin: 0 0 8px; color: #ef476f; font-size: 0.85rem; }
.camera-players { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 22px; }
.camera-empty { color: #666; font-size: 0.8rem; }
.corpse-icon { font-size: 16px; }

/* Admin table */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.admin-room {
  display: flex; justify-content: space-between;
  background: rgba(0,0,0,0.3); border-radius: 6px; padding: 8px 12px;
}
.admin-room strong { color: #ffd166; }

/* Vitals */
.vitals-list { display: flex; flex-direction: column; gap: 6px; }
.vitals-row {
  display: flex; justify-content: space-between;
  background: rgba(0,0,0,0.3); border-radius: 6px; padding: 8px 12px;
}
.vitals-row.dead { opacity: 0.6; text-decoration: line-through; }

/* Card swipe minigame */
.card-reader {
  position: relative; height: 110px; margin: 16px 0;
  background: #1b263b; border-radius: 10px; overflow: hidden;
}
.card-slot {
  position: absolute; top: 18px; left: 0; right: 0; height: 56px;
  background: #0b1622; border-top: 3px solid #4ea8de; border-bottom: 3px solid #4ea8de;
}
.swipe-card {
  position: absolute; top: 26px; left: 12px;
  width: 120px; height: 40px; line-height: 40px; text-align: center;
  background: #f4f1de; color: #1b263b; font-weight: bold;
  border-radius: 6px; cursor: grab; user-select: none; touch-action: none;
}
.swipe-card:active { cursor: grabbing; }
.swipe-status { text-align: center; color: #ccc; font-size: 0.9rem; }

/* Asteroids minigame */
.asteroid-counter { text-align: center; color: #ffd166; margin-bottom: 8px; }
.asteroid-canvas {
  display: block; margin: 0 auto; border: 2px solid #4ea8de;
  border-radius: 8px; cursor: crosshair; touch-action: none;
  max-width: 100%;
}

/* Fuel minigame */
.fuel-status { text-align: center; color: #ffd166; margin-bottom: 10px; }
.fuel-row { display: flex; gap: 14px; justify-content: center; margin-bottom: 14px; }
.fuel-canister {
  width: 64px; height: 90px; border: 3px solid #666; border-top-width: 6px;
  border-radius: 0 0 10px 10px; display: flex; align-items: flex-end;
  background: rgba(0,0,0,0.3); overflow: hidden;
}
.fuel-fill { width: 100%; background: #f78c6b; height: 0; }
.fuel-btn {
  display: block; margin: 0 auto; width: auto; padding: 14px 28px;
  background: #ef476f; font-weight: bold;
}

/* Medbay scan minigame */
.scan-status { text-align: center; color: #06d6a0; font-weight: bold; letter-spacing: 2px; margin-bottom: 10px; }
.scan-countdown { text-align: center; color: #fff; margin-top: 10px; }

/* Stats screen */
.menu-stats { display: block; margin: 16px auto 0; width: auto; padding: 10px 24px; }
.stats-card { max-width: 560px; }
.my-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 24px; }
.stat-tile {
  flex: 1; min-width: 90px; background: rgba(0,0,0,0.3);
  border-radius: 10px; padding: 14px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-tile strong { font-size: 1.5rem; color: #ffd166; }
.stat-tile span { font-size: 0.8rem; color: #ccc; }
.stats-table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table th, .stats-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #2c3e50; }
.stats-table th { color: #4ea8de; font-size: 0.85rem; }
.stats-table td:first-child { color: #ffd166; font-weight: bold; }
