/* Cyber City Game - Sleek Cyberpunk & GTA HUD Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;900&family=JetBrains+Mono:wght@400;600&family=Press+Start+2P&display=swap');

:root {
  --bg-dark: #070a10;
  --panel-bg: rgba(11, 16, 26, 0.78);
  --panel-border: rgba(0, 240, 255, 0.25);
  --accent-cyan: #00f0ff;
  --accent-pink: #ff0055;
  --accent-yellow: #ffb700;
  --accent-green: #00ff66;
  --text-primary: #ffffff;
  --text-muted: #8e9bb0;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  user-select: none;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  image-rendering: pixelated;
  transform: translateZ(0);
  will-change: transform;
  contain: strict;
  backface-visibility: hidden;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}

/* HUD Overlay Layer */
#hud-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  contain: layout paint;
  transform: translateZ(0);
  will-change: contents;
}

#hud-container>* {
  pointer-events: auto;
}

/* Top Left: Server Info & Players */
.hud-top-left {
  position: absolute;
  top: 18px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-badge {
  display: none !important;
  padding: 8px 14px;
  align-items: center;
  gap: 12px;
}

.server-title {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.online-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-green);
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid rgba(0, 255, 102, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Day & Night Dynamic Clock Widget (Frameless, clean HUD) */
.clock-card {
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.clock-main-row {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.clock-emoji {
  font-size: 20px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 6px rgba(255, 190, 0, 0.6));
}

.clock-digital {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 1.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 240, 255, 0.6);
}

.clock-period-tag {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-yellow);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 183, 0, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.clock-quick-presets {
  display: none !important;
}

.clock-preset-btn,
.clock-cycle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #c8d3e0;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Outfit', sans-serif;
}

.clock-preset-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}

.clock-preset-btn.active {
  background: rgba(0, 240, 255, 0.28);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.clock-cycle-btn {
  background: rgba(0, 255, 102, 0.12);
  border-color: rgba(0, 255, 102, 0.4);
  color: var(--accent-green);
}

.clock-cycle-btn:hover {
  background: rgba(0, 255, 102, 0.25);
  border-color: var(--accent-green);
}

.players-box {
  display: none !important;
  padding: 10px 14px;
  max-height: 150px;
  overflow-y: auto;
  min-width: 190px;
}

#btn-hud-build {
  display: none !important;
}

/* Player Cash Display (Frameless, clean HUD) */
.money-box,
#hud-player-money {
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: #4ade80;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 10px rgba(74, 222, 128, 0.6);
  user-select: none;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
}

.player-item.local-player .player-name {
  color: var(--accent-cyan);
  font-weight: 700;
}

.player-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.player-mode {
  margin-left: auto;
  font-size: 11px;
}

/* Top Right: Mode & Prompts */
.hud-top-right {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hud-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#hud-mode-badge {
  display: none !important;
}

.badge-foot {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.badge-vehicle {
  background: rgba(255, 183, 0, 0.2);
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.hud-prompt {
  background: rgba(255, 0, 85, 0.25);
  border: 1px solid var(--accent-pink);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(255, 0, 85, 0.35);
  animation: pulsePrompt 1.8s infinite ease-in-out;
}

#hud-vehicle-prompt {
  display: none !important;
}

@keyframes pulsePrompt {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

/* Camera & Perspective HUD Widget (Hidden - control via mouse scroll) */
.camera-card {
  display: none !important;
  width: 256px;
  padding: 12px 14px;
  flex-direction: column;
  gap: 10px;
}

.camera-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.camera-card-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.cam-btn-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0e6ed;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cam-btn-reset:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.camera-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.camera-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cam-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.cam-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.cam-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.cam-preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #b0bac8;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 4px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.cam-preset-btn:hover {
  border-color: var(--accent-cyan);
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
}

.cam-preset-btn.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.cyber-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  margin: 2px 0;
  transition: background 0.2s ease;
}

.cyber-slider:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-cyan);
  transition: transform 0.15s ease;
}

.cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.cyber-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-cyan);
  border: none;
}

.cam-turn-buttons {
  display: flex;
  gap: 6px;
}

.cam-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.cam-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.camera-hint {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.35;
}

.camera-hint b {
  color: #cbd5e1;
}

/* Bottom Left: GTA Radar Minimap */
.hud-bottom-left {
  position: absolute;
  bottom: 22px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.minimap-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
}

#minimap-canvas {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: block;
}

.hud-status-bars {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-bar-health {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.hud-bar-health-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #00ff66, #00f0ff);
  box-shadow: 0 0 8px #00ff66;
}

/* Bottom Right: Pixel Art Speedometer & Aviation Cockpit HUD */
.hud-bottom-right {
  position: absolute;
  bottom: 12px;
  right: 12px;
  pointer-events: none;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 6px;
  z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateZ(0);
  contain: layout paint;
  will-change: transform;
}

.hud-bottom-right.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

#pixel-speedometer-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
}

/* ==========================================================================
   Retro 1-DIN Pixel Art Car Stereo Deck (Spotify & Windows Media Controller)
   ========================================================================== */
.hud-vehicle-radio {
  width: 230px;
  background: #11141c;
  border: 2px solid #2b3342;
  box-shadow: inset 1px 1px 0 #3e4a5f, inset -1px -1px 0 #080a0f, 0 6px 16px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
  padding: 6px 8px;
  pointer-events: auto;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hud-vehicle-radio.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.radio-chassis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e2430;
  padding-bottom: 3px;
}

.radio-screw {
  width: 4px;
  height: 4px;
  background: #475569;
  border-radius: 50%;
  box-shadow: inset 1px 1px 0 #94a3b8, 0 1px 0 #0f172a;
}

.radio-brand {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #64748b;
  text-transform: uppercase;
}

.radio-brand span {
  color: #00f0ff;
}

.radio-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.radio-badge.online {
  background: rgba(29, 185, 84, 0.2);
  color: #1ed760;
  border: 1px solid rgba(29, 185, 84, 0.6);
  box-shadow: 0 0 6px rgba(29, 185, 84, 0.3);
}

.radio-badge.standby {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.radio-main-panel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.radio-album-frame {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #090c12;
  border: 1px solid #1db954;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.9), 0 0 6px rgba(29, 185, 84, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radio-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.radio-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090e17;
}

.cassette-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 4px #00f0ff);
  animation: pulseRadio 2s infinite ease-in-out;
}

@keyframes pulseRadio {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 7px #1ed760); }
}

.radio-lcd-screen {
  flex: 1;
  height: 44px;
  background: #04090c;
  border: 1px solid #00f0ff33;
  box-shadow: inset 0 0 6px rgba(0, 240, 255, 0.15);
  border-radius: 3px;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.radio-lcd-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.35) 2px,
    rgba(0, 0, 0, 0.35) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.radio-lcd-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.radio-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.radio-track-title {
  font-size: 9.5px;
  font-weight: 700;
  color: #00f0ff;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-track-artist {
  font-size: 8px;
  font-weight: 600;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-eq-canvas {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  image-rendering: pixelated;
  height: 12px;
}

.radio-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-top: 1px solid #1a202c;
  padding-top: 4px;
}

.radio-btn-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.radio-vol-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.radio-btn {
  background: #1a212e;
  border: 1px solid #334155;
  border-radius: 2px;
  color: #cbd5e1;
  font-size: 9px;
  padding: 3px 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #0a0d14;
  transition: all 0.1s ease;
}

.radio-btn:hover {
  background: #252f42;
  color: #00f0ff;
  border-color: #00f0ff66;
}

.radio-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.radio-btn-main {
  background: #143224;
  border-color: #1db954;
  color: #1ed760;
  font-weight: 800;
  padding: 3px 10px;
  box-shadow: 0 2px 0 #081a11;
}

.radio-btn-main:hover {
  background: #1a442f;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(29, 185, 84, 0.5);
}

.radio-btn-vol {
  font-size: 8px;
  font-weight: 700;
  padding: 3px 5px;
  color: #94a3b8;
}

.radio-btn-vol:hover {
  color: #00f0ff;
}

.radio-btn-mute {
  font-size: 8px;
  padding: 3px 5px;
}

.radio-vol-meter {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  background: #070a0f;
  border: 1px solid #1a2332;
  padding: 2px 3px;
  border-radius: 2px;
  height: 12px;
  box-sizing: border-box;
}

.vol-bar {
  width: 2px;
  height: 6px;
  background: #1c2533;
  border-radius: 1px;
  transition: background 0.1s ease, box-shadow 0.1s ease;
}

.vol-bar:nth-child(1) { height: 4px; }
.vol-bar:nth-child(2) { height: 5px; }
.vol-bar:nth-child(3) { height: 6px; }
.vol-bar:nth-child(4) { height: 7px; }
.vol-bar:nth-child(5) { height: 8px; }

.vol-bar.active {
  background: #1ed760;
  box-shadow: 0 0 3px #1ed760;
}

.radio-vol-meter:hover .vol-bar.active {
  background: #00f0ff;
  box-shadow: 0 0 3px #00f0ff;
}

.controls-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(13, 19, 32, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  text-align: right;
  align-self: flex-end;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Bottom Middle: Chat Box */
.hud-bottom-center {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  max-width: 90vw;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 160px;
  padding: 8px 10px;
  background: rgba(7, 11, 18, 0.75);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
}

.chat-panel:focus-within {
  background: rgba(7, 11, 18, 0.94);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.chat-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.chat-unread-badge {
  background: #00f0ff;
  color: #020617;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.chat-unread-badge.hidden {
  display: none !important;
}

.chat-btn-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: bold;
  width: 22px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.chat-btn-toggle:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
  color: #00f0ff;
}

.chat-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Minimized State */
.chat-panel.minimized {
  height: 32px;
  padding: 5px 12px;
  background: rgba(7, 11, 18, 0.85);
  cursor: pointer;
}

.chat-panel.minimized .chat-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.chat-panel.minimized .chat-body {
  display: none !important;
}

.chat-panel.minimized:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.chat-line {
  line-height: 1.35;
  word-break: break-word;
}

.chat-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.1);
}

/* Join Modal - Retro Pixel Art / 2.5D Arcade Chassis */
#join-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(4, 7, 14, 0.92);
  /* Retro CRT scanlines overlay */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.45) 0px,
    rgba(0, 0, 0, 0.45) 2px,
    transparent 2px,
    transparent 4px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow-y: auto;
  padding: 12px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#join-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-modal-box {
  background: #090e18 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 3px solid #000000 !important;
  border-radius: 14px !important;
  box-shadow: 
    0 0 0 2px #00f0ff,
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    inset -2px -2px 0 #000000,
    5px 5px 0 #000000,
    0 0 35px rgba(0, 240, 255, 0.3) !important;
  font-family: 'Press Start 2P', monospace;
  image-rendering: pixelated;
  user-select: none;
  max-height: 94vh;
  overflow-y: auto;
}

.modal-content {
  width: 440px;
  max-width: 92vw;
  padding: 24px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  border-bottom: 3px solid #000000;
  box-shadow: 0 3px 0 #1e293b;
  padding-bottom: 12px;
}

.modal-header h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000000, 0 0 14px rgba(0, 240, 255, 0.8);
  margin-bottom: 6px;
}

.modal-header .auth-game-logo {
  display: block;
  width: min(220px, 78vw);
  max-height: 112px;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  margin: 0 auto 8px;
}

.modal-header p {
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000000;
  line-height: 1.4;
  margin: 0;
}

.input-group {
  text-align: left;
}

.input-group label {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  font-weight: normal;
  color: #94a3b8;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000000;
}

.cyber-input {
  width: 100%;
  background: #050811;
  border: 2px solid #000000;
  color: #00f0ff;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  font-weight: normal;
  padding: 10px 12px;
  border-radius: 8px !important;
  box-shadow: 0 0 0 1px #1e293b, inset 2px 2px 0 #000000;
  transition: box-shadow 0.1s ease;
  box-sizing: border-box;
  outline: none;
}

.cyber-input:focus {
  box-shadow: 0 0 0 1.5px #00f0ff, inset 2px 2px 0 #000000, 0 0 10px rgba(0, 240, 255, 0.35);
}

.color-picker-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px !important;
  border: 2px solid #000000;
  cursor: pointer;
  box-shadow: 0 0 0 1px #1e293b, inset 1px 1px 0 rgba(255, 255, 255, 0.25), 2px 2px 0 #000000;
  transition: transform 0.05s steps(2);
}

.color-swatch:hover {
  transform: translate(-1px, -1px);
  box-shadow: 0 0 0 1.5px #ffffff, inset 1px 1px 0 rgba(255, 255, 255, 0.4), 3px 3px 0 #000000;
}

.color-swatch.active {
  border-color: #000000;
  box-shadow: 0 0 0 2px #00f0ff, inset 2px 2px 0 #ffffff, 3px 3px 0 #000000, 0 0 10px rgba(0, 240, 255, 0.6);
  transform: translate(-2px, -2px);
}

.btn-primary {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  background: #00f0ff !important;
  color: #040914 !important;
  border: 3px solid #000000 !important;
  border-radius: 10px !important;
  font-family: 'Press Start 2P', monospace;
  font-size: 10.5px;
  font-weight: normal;
  letter-spacing: 1.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 
    inset 2px 2px 0 #ffffff,
    inset -2px -2px 0 #0284c7,
    4px 4px 0 #000000 !important;
  transition: transform 0.05s steps(2), background 0.08s ease;
  text-shadow: none !important;
}

.btn-primary:hover {
  background: #38bdf8 !important;
  transform: translate(-1px, -1px);
  box-shadow: 
    inset 2px 2px 0 #ffffff,
    inset -2px -2px 0 #0369a1,
    5px 5px 0 #000000 !important;
}

.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: inset 2px 2px 0 #000000, 1px 1px 0 #000000 !important;
}

/* Toast Notification System */
#toast-container {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(11, 16, 26, 0.9);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--accent-cyan);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: slideToast 0.3s ease-out;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast-success {
  border-left-color: var(--accent-green);
}

.toast-warning {
  border-left-color: var(--accent-yellow);
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes slideToast {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

/* Soccer HUD & Match Scoreboard */
#hud-soccer-container {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 100;
}

#hud-soccer-score {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 18px;
  background: rgba(10, 20, 15, 0.82);
  border: 1px solid rgba(0, 255, 102, 0.4);
  box-shadow: 0 4px 20px rgba(0, 255, 102, 0.2);
  border-radius: 20px;
}

.score-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.team-away .team-badge {
  color: var(--accent-pink);
}

.team-points {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  min-width: 20px;
  text-align: center;
}

.score-divider {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ball-icon {
  font-size: 16px;
  display: inline-block;
  animation: rotateBall 8s linear infinite;
}

@keyframes rotateBall {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.vs-text {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
}

.soccer-prompt {
  font-size: 12px;
  font-weight: 700;
  color: #00ff88;
  background: rgba(0, 0, 0, 0.75);
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.4);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
  animation: pulsePrompt 1s ease-in-out infinite alternate;
}

@keyframes pulsePrompt {
  from {
    opacity: 0.8;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* Big GOOOOOL Celebration Banner */
#goal-celebration-banner {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 500;
  animation: goalZoom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.goal-text {
  font-size: 68px;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 4px;
  color: #ffee00;
  text-shadow: 0 0 20px #ffaa00, 0 0 40px #ff5500, 3px 3px 0px #000;
  animation: goalWobble 0.8s ease-in-out infinite alternate;
}

.goal-subtext {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8), 2px 2px 0px #000;
  background: rgba(0, 0, 0, 0.65);
  padding: 6px 24px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 6px;
}

@keyframes goalZoom {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
  }

  70% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.0);
    opacity: 1;
  }
}

@keyframes goalWobble {
  0% {
    transform: rotate(-2deg) scale(1.0);
  }

  100% {
    transform: rotate(2deg) scale(1.06);
  }
}

/* =============================================================
   Firebase Authentication & User Profile Styling
   ============================================================= */

.auth-modal-box {
  width: 440px;
  max-width: 92vw;
  padding: 24px 22px;
  gap: 14px;
}

.auth-tabs {
  display: flex;
  background: #050811;
  border: 2px solid #000000;
  border-radius: 10px !important;
  padding: 4px;
  gap: 6px;
  box-shadow: 0 0 0 1px #1e293b, inset 1px 1px 0 #000000;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: 2px solid transparent;
  color: #64748b;
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  font-weight: normal;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 6px !important;
  transition: transform 0.05s steps(2);
}

.auth-tab-btn:hover:not(.active) {
  color: #ffffff;
  background: #0f172a;
}

.auth-tab-btn.active {
  background: #00f0ff;
  color: #040914;
  border: 2px solid #000000;
  box-shadow: 
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #0284c7,
    2px 2px 0 #000000;
  text-shadow: none;
}

.auth-alert {
  padding: 8px 12px;
  border-radius: 8px !important;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  font-weight: normal;
  text-align: left;
  line-height: 1.5;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
}

.auth-alert.error {
  background: #450a0a;
  color: #fca5a5;
  box-shadow: 0 0 0 1px #dc2626, inset 1px 1px 0 #f87171, 2px 2px 0 #000000;
}

.auth-alert.success {
  background: #14532d;
  color: #86efac;
  box-shadow: 0 0 0 1px #22c55e, inset 1px 1px 0 #4ade80, 2px 2px 0 #000000;
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.auth-form-panel.hidden {
  display: none !important;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 12px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.remember-row span {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}

.remember-row input {
  width: 15px;
  height: 15px;
  accent-color: #00f0ff;
  cursor: pointer;
}

.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #38bdf8;
  text-decoration: none;
  text-shadow: 1px 1px 0 #000000;
  transition: color 0.1s ease;
}

.auth-link:hover {
  color: #00f0ff;
  text-decoration: underline;
}

.btn-guest-login {
  width: 100%;
  background: #060a12;
  border: 2px dashed #334155;
  color: #64748b;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  letter-spacing: 0.3px;
  padding: 8px 10px;
  border-radius: 8px !important;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000000;
  transition: all 0.1s ease;
  margin-top: 2px;
  box-sizing: border-box;
}

.btn-guest-login:hover {
  border-color: #00f0ff;
  color: #00f0ff;
  background: #0c1424;
}

/* Quick Join (Saved Session) Panel */
.quick-join-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #070b14;
  border: 2px solid #000000;
  padding: 12px 14px;
  border-radius: 10px !important;
  box-shadow: 0 0 0 1px #00f0ff, inset 1px 1px 0 #000000, 3px 3px 0 #000000;
  text-align: left;
}

.quick-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px !important;
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 2px 2px 0 #000000;
  flex-shrink: 0;
}

.quick-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.quick-welcome {
  font-family: 'Press Start 2P', monospace;
  font-size: 6.5px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 #000000;
}

.quick-email {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 #000000;
}

.quick-join-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.btn-secondary {
  width: 100%;
  padding: 10px 14px;
  background: #1e293b;
  border: 2px solid #000000;
  color: #ffffff;
  border-radius: 8px !important;
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  font-weight: normal;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 0 0 1px #334155, inset 1px 1px 0 rgba(255, 255, 255, 0.15), 3px 3px 0 #000000;
  transition: transform 0.05s steps(2);
  text-shadow: 1px 1px 0 #000000;
  box-sizing: border-box;
}

.btn-secondary:hover {
  background: #334155;
  transform: translate(-1px, -1px);
  box-shadow: 0 0 0 1px #475569, inset 1px 1px 0 rgba(255, 255, 255, 0.25), 4px 4px 0 #000000;
}

.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: inset 1px 1px 0 #000000, 1px 1px 0 #000000;
}

/* User Profile Badge in HUD */
.user-profile-badge {
  display: none !important;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.user-profile-badge.hidden {
  display: none !important;
}

.user-avatar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

.user-info-col {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
  min-width: 0;
}

.user-display-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email-text {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: rgba(255, 0, 85, 0.15);
  border: 1px solid rgba(255, 0, 85, 0.4);
  color: #ff6b8b;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(255, 0, 85, 0.35);
  color: #fff;
}

/* =========================================================================
   FLIPERAMA RETRÔ / ARCADE CLUB CRT MODAL & HUD
   ========================================================================= */

.arcade-prompt {
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.6), inset 0 0 8px rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 18px;
  border-radius: 20px;
  margin-top: 6px;
  animation: pulsePrompt 1.4s infinite alternate ease-in-out;
  pointer-events: none;
  display: inline-block;
}

.arcade-prompt.hidden {
  display: none !important;
}

.barrier-gate-prompt {
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6), inset 0 0 8px rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 18px;
  border-radius: 20px;
  margin-top: 6px;
  animation: pulsePrompt 1.4s infinite alternate ease-in-out;
  pointer-events: none;
  display: inline-block;
}

.barrier-gate-prompt.hidden {
  display: none !important;
}

.beach-chair-prompt {
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid #06b6d4;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.6), inset 0 0 8px rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 22px;
  border-radius: 20px;
  margin-top: 6px;
  animation: pulsePrompt 1.4s infinite alternate ease-in-out;
  cursor: pointer;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.beach-chair-prompt:hover {
  transform: scale(1.05);
  background: rgba(8, 47, 73, 0.98);
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.8), inset 0 0 10px rgba(56, 189, 248, 0.3);
}
.beach-chair-prompt:active {
  transform: scale(0.96);
}
.beach-chair-prompt.occupied {
  border-color: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6), inset 0 0 8px rgba(239, 68, 68, 0.2);
  color: #f87171;
  cursor: not-allowed;
}
.beach-chair-prompt.occupied:hover {
  transform: none;
  background: rgba(15, 23, 42, 0.94);
}
.beach-chair-prompt.seated {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6), inset 0 0 8px rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.beach-chair-prompt.hidden {
  display: none !important;
}

#arcade-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(2, 6, 12, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s ease-out;
}

#arcade-modal.hidden {
  display: none !important;
}

.arcade-cabinet-bezel {
  width: 520px;
  max-width: 95vw;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #090d16 85%);
  border: 4px solid #334155;
  border-top-color: #475569;
  border-radius: 18px;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.25), 0 20px 60px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Top Backlit Marquee */
.arcade-marquee-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, #090d16 0%, #111827 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.arcade-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arcade-icon {
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.8));
}

.arcade-title {
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

.arcade-record-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.record-label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.record-value {
  font-size: 11px;
  font-weight: 800;
  color: #facc15;
  font-family: monospace;
}

.arcade-exit-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arcade-exit-btn:hover {
  background: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* CRT Screen Frame */
.arcade-screen-container {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020408;
}

.arcade-crt-frame {
  position: relative;
  width: 440px;
  height: 440px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 240, 255, 0.15);
  border: 3px solid #1e293b;
  background: #060a12;
}

#arcade-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.arcade-crt-scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.65;
}

.arcade-crt-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.04) 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Bottom Controls Footer */
.arcade-controls-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #0b0f19;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.arcade-keys-hint {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: #94a3b8;
}

.arcade-keys-hint b {
  color: #38bdf8;
}

.arcade-coin-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.5px;
}

.coin-led {
  color: #22c55e;
  text-shadow: 0 0 8px #22c55e;
  animation: pulsePrompt 1s infinite alternate;
}

/* ==========================================================================
   WEAPON WHEEL (RODA DE ARMAS GTA) & WEAPON HUD BADGE
   ========================================================================== */

/* Top Right HUD Weapon Badge */
.hud-weapon-badge {
  position: absolute;
  top: 70px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  user-select: none;
}

.hud-weapon-badge:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
}

.hud-weapon-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

.hud-weapon-info {
  display: flex;
  flex-direction: column;
}

.hud-weapon-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hud-weapon-ammo {
  font-size: 10px;
  font-weight: 800;
  color: #00f0ff;
  letter-spacing: 0.5px;
}

.hud-weapon-key {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
}

/* Fullscreen Radial Weapon Wheel Overlay */
.weapon-wheel-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 26, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: wheelFadeIn 0.15s ease-out;
  user-select: none;
}

@keyframes wheelFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.weapon-wheel-container {
  position: relative;
  width: 440px;
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center Status Circle */
.weapon-wheel-center-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
  border: 2px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.25), inset 0 0 16px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
}

.weapon-wheel-center-icon {
  font-size: 34px;
  margin-bottom: 2px;
}

.weapon-wheel-center-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weapon-wheel-center-ammo {
  font-size: 10px;
  font-weight: 800;
  color: #00f0ff;
  margin-top: 2px;
}

/* Radial Wheel Slices */
.weapon-wheel-slice {
  position: absolute;
  width: 130px;
  height: 100px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease-out;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.weapon-wheel-slice.slice-west {
  left: 10px;
  top: 170px;
}

.weapon-wheel-slice.slice-north {
  top: 15px;
  left: 155px;
}

.weapon-wheel-slice.slice-east {
  right: 10px;
  top: 170px;
}

.weapon-wheel-slice.slice-south {
  bottom: 15px;
  left: 155px;
}

.weapon-wheel-slice:hover,
.weapon-wheel-slice.active {
  background: rgba(14, 165, 233, 0.3);
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 12px rgba(0, 240, 255, 0.2);
  transform: scale(1.08);
}

.weapon-wheel-slice.slice-north:hover,
.weapon-wheel-slice.slice-north.active {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.weapon-wheel-slice.slice-east:hover,
.weapon-wheel-slice.slice-east.active {
  background: rgba(234, 179, 8, 0.3);
  border-color: #eab308;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.weapon-wheel-slice.slice-south:hover,
.weapon-wheel-slice.slice-south.active {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.wheel-slice-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.wheel-slice-icon {
  font-size: 26px;
}

.wheel-slice-title {
  font-size: 10px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.wheel-slice-badge {
  font-size: 9px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 6px;
  border-radius: 10px;
}

.weapon-wheel-slice.slice-east .wheel-slice-badge {
  color: #fde047;
}

.weapon-wheel-slice.slice-south .wheel-slice-badge {
  color: #ef4444;
}

.weapon-wheel-hint {
  position: absolute;
  bottom: -28px;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
}

/* Pickup Floating Toast */
.hud-pickup-toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 800;
  color: #fef08a;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  letter-spacing: 0.5px;
}

.hud-pickup-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   ESC PAUSE & SYSTEM MENU MODAL
   ========================================================================== */
.esc-pause-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(4, 7, 14, 0.86);
  /* Retro CRT scanline effect */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.5) 0px,
    rgba(0, 0, 0, 0.5) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: escPixelPop 0.15s cubic-bezier(0, 0, 0.2, 1);
}

.esc-pause-backdrop.hidden {
  display: none !important;
}

@keyframes escPixelPop {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.esc-pause-card {
  width: 92%;
  max-width: 520px;
  background: #090e18;
  border: 3px solid #000000;
  border-radius: 14px !important;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 
    0 0 0 2px #00f0ff,
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    inset -2px -2px 0 #000000,
    5px 5px 0 #000000,
    0 0 28px rgba(0, 240, 255, 0.3);
  user-select: none;
  font-family: 'Press Start 2P', monospace;
  image-rendering: pixelated;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.esc-pause-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 3px solid #000000;
  box-shadow: 0 3px 0 #1e293b;
  padding-bottom: 12px;
  position: relative;
}

.esc-pause-header::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #00f0ff 0px,
    #00f0ff 8px,
    transparent 8px,
    transparent 16px
  );
}

.esc-pause-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.esc-pause-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.esc-pause-tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  font-weight: normal;
  letter-spacing: 0.5px;
  color: #000000;
  background: #00f0ff;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  padding: 3px 6px;
  border-radius: 6px;
}

.esc-pause-title {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000000, 0 0 10px rgba(0, 240, 255, 0.8);
}

.esc-pause-subtitle {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: #38bdf8;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000000;
}

.esc-pause-close-btn {
  background: #1e293b;
  border: 2px solid #000000;
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  box-shadow: 0 0 0 1px #334155, inset 1px 1px 0 rgba(255, 255, 255, 0.2), 2px 2px 0 #000000;
  transition: transform 0.05s steps(2);
}

.esc-pause-close-btn:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 0 0 0 1px #ef4444, inset 1px 1px 0 #fca5a5, 3px 3px 0 #000000;
}

.esc-pause-close-btn:active {
  transform: translate(2px, 2px);
  box-shadow: inset 1px 1px 0 #000000, 1px 1px 0 #000000;
}

.esc-pause-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esc-menu-btn {
  background: #0f172a;
  border: 2px solid #000000;
  border-radius: 10px !important;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.05s steps(2), background 0.08s ease;
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  outline: none;
  box-shadow: 
    0 0 0 1px #1e293b,
    inset 1px 1px 0 rgba(255, 255, 255, 0.08),
    inset -1px -1px 0 #000000,
    3px 3px 0 #000000;
}

.esc-menu-btn:hover {
  background: #172554;
  border-color: #000000;
  transform: translate(-1px, -1px);
  box-shadow: 
    0 0 0 1.5px #00f0ff,
    inset 1px 1px 0 #38bdf8,
    inset -1px -1px 0 #000000,
    4px 4px 0 #000000,
    0 0 12px rgba(0, 240, 255, 0.25);
}

.esc-menu-btn:active {
  transform: translate(2px, 2px);
  box-shadow: inset 2px 2px 0 #000000, 1px 1px 0 #000000;
}

.esc-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.esc-btn-icon {
  font-size: 15px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: #060910;
  border: 2px solid #000000;
  border-radius: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px #1e293b, inset 1px 1px 0 #000000, inset -1px -1px 0 rgba(255, 255, 255, 0.06);
  filter: drop-shadow(1px 1px 0 #000000);
}

.esc-btn-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.esc-btn-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  font-weight: normal;
  color: #f8fafc;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000000;
}

.esc-btn-desc {
  font-family: 'Press Start 2P', monospace;
  font-size: 6.5px;
  color: #64748b;
  line-height: 1.4;
  letter-spacing: 0px;
  text-shadow: 1px 1px 0 #000000;
}

.esc-menu-btn:hover .esc-btn-desc {
  color: #94a3b8;
}

.esc-status-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  font-weight: normal;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px !important;
  white-space: nowrap;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  text-shadow: 1px 1px 0 #000000;
}

.esc-status-badge.badge-on {
  background: #14532d;
  color: #4ade80;
  box-shadow: 0 0 0 1px #22c55e, inset 1px 1px 0 #86efac, 2px 2px 0 #000000;
}

.esc-status-badge.badge-off {
  background: #450a0a;
  color: #f87171;
  box-shadow: 0 0 0 1px #dc2626, inset 1px 1px 0 #fca5a5, 2px 2px 0 #000000;
}

#esc-steam-badge {
  background: #0c4a6e;
  color: #38bdf8;
  box-shadow: 0 0 0 1px #0284c7, inset 1px 1px 0 #7dd3fc, 2px 2px 0 #000000;
}

#esc-phonewheel-badge {
  background: #083344;
  color: #00f0ff;
  box-shadow: 0 0 0 1px #00f0ff, inset 1px 1px 0 #67e8f9, 2px 2px 0 #000000;
}

.esc-action-arrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #94a3b8;
  transition: transform 0.05s steps(2);
  text-shadow: 1px 1px 0 #000000;
}

.esc-menu-btn:hover .esc-action-arrow {
  transform: translateX(3px);
  color: #00f0ff;
}

.esc-divider {
  height: 0;
  border: none;
  border-bottom: 2px dashed #1e293b;
  margin: 2px 0;
}

.esc-btn-warning:hover {
  background: #3b1d06;
  box-shadow: 0 0 0 1px #f59e0b, inset 1px 1px 0 #fbbf24, 4px 4px 0 #000000, 0 0 10px rgba(245, 158, 11, 0.2);
}

.esc-btn-warning:hover .esc-btn-title {
  color: #fde047;
}

.esc-btn-danger:hover {
  background: #450a0a;
  box-shadow: 0 0 0 1px #ef4444, inset 1px 1px 0 #f87171, 4px 4px 0 #000000, 0 0 10px rgba(239, 68, 68, 0.2);
}

.esc-btn-danger:hover .esc-btn-title {
  color: #fca5a5;
}

.esc-menu-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esc-subpanel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px 6px;
  border-bottom: 2px dashed #1e293b;
  margin-bottom: 4px;
}

.esc-subpanel-back-btn {
  background: #0f172a;
  color: #00f0ff;
  border: 2px solid #000000;
  box-shadow: 0 0 0 1px #00f0ff, inset 1px 1px 0 rgba(255, 255, 255, 0.12), 2px 2px 0 #000000;
  border-radius: 6px !important;
  padding: 6px 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  cursor: pointer;
  transition: transform 0.05s steps(2), background 0.08s ease;
}

.esc-subpanel-back-btn:hover {
  background: #1e293b;
  transform: translate(-1px, -1px);
  box-shadow: 0 0 0 1.5px #38bdf8, 3px 3px 0 #000000;
  color: #ffffff;
}

.esc-subpanel-back-btn:active {
  transform: translate(2px, 2px);
  box-shadow: inset 1px 1px 0 #000000;
}

.esc-subpanel-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000000;
}

#esc-graphics-badge {
  background: #083344;
  color: #00f0ff;
  box-shadow: 0 0 0 1px #00f0ff, inset 1px 1px 0 #67e8f9, 2px 2px 0 #000000;
}

.esc-pause-footer {
  margin-top: 4px;
}

.esc-btn-resume {
  width: 100%;
  height: 42px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #00f0ff !important;
  color: #040914 !important;
  border: 3px solid #000000 !important;
  border-radius: 10px !important;
  box-shadow: 
    inset 2px 2px 0 #ffffff,
    inset -2px -2px 0 #0284c7,
    4px 4px 0 #000000 !important;
  cursor: pointer;
  transition: transform 0.05s steps(2), background 0.08s ease;
  text-shadow: none !important;
}

.esc-btn-resume:hover {
  background: #38bdf8 !important;
  transform: translate(-1px, -1px);
  box-shadow: 
    inset 2px 2px 0 #ffffff,
    inset -2px -2px 0 #0369a1,
    5px 5px 0 #000000 !important;
}

.esc-btn-resume:active {
  transform: translate(3px, 3px);
  box-shadow: inset 2px 2px 0 #000000, 1px 1px 0 #000000 !important;
}

/* Phone Wheel Modal Pixel Styles */
.phone-wheel-card {
  max-width: 440px;
  text-align: center;
  border-radius: 14px !important;
}

.phone-wheel-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.phone-wheel-instruction {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #94a3b8;
  line-height: 1.5;
  text-shadow: 1px 1px 0 #000;
  margin: 0;
}

.phone-wheel-qr-box {
  background: #ffffff;
  padding: 8px;
  border: 3px solid #000000;
  border-radius: 10px !important;
  box-shadow: 0 0 0 2px #00f0ff, 4px 4px 0 #000000, 0 0 15px rgba(0, 240, 255, 0.4);
}

.phone-wheel-link-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.phone-wheel-link-row input {
  flex: 1;
  background: #060910;
  border: 2px solid #000000;
  color: #00f0ff;
  padding: 8px 10px;
  font-size: 8px;
  font-family: 'Press Start 2P', monospace;
  border-radius: 6px !important;
  box-shadow: 0 0 0 1px #1e293b, inset 1px 1px 0 #000;
  outline: none;
}

.phone-wheel-link-row button {
  background: #1e293b;
  border: 2px solid #000000;
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 8px 12px;
  border-radius: 6px !important;
  cursor: pointer;
  box-shadow: 0 0 0 1px #334155, inset 1px 1px 0 rgba(255, 255, 255, 0.2), 2px 2px 0 #000000;
  transition: transform 0.05s steps(2);
}

.phone-wheel-link-row button:hover {
  background: #0284c7;
  transform: translate(-1px, -1px);
  box-shadow: 0 0 0 1px #38bdf8, inset 1px 1px 0 #7dd3fc, 3px 3px 0 #000000;
}

.phone-wheel-link-row button:active {
  transform: translate(2px, 2px);
  box-shadow: inset 1px 1px 0 #000, 1px 1px 0 #000;
}

.phone-wheel-status {
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 1px 1px 0 #000;
}

.phone-wheel-footnote {
  font-family: 'Press Start 2P', monospace;
  font-size: 6.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  text-shadow: 1px 1px 0 #000;
}

/* =============================================================
   Pre-load Splash Screen (3D Cache & SSD loading - Pixel Art)
   ============================================================= */

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #050811;
  /* Retro CRT scanlines */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.5) 0px,
    rgba(0, 0, 0, 0.5) 2px,
    transparent 2px,
    transparent 4px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  width: 520px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  animation: splashFadeIn 0.3s ease-out;
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.splash-badge-top {
  display: inline-block;
  padding: 4px 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  font-weight: normal;
  letter-spacing: 1px;
  color: #000000;
  background: #00f0ff;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0 #000000;
  border-radius: 8px !important;
  margin-bottom: 8px;
}

.splash-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 3px 3px 0 #000000, 0 0 16px rgba(0, 240, 255, 0.8);
  margin-bottom: 6px;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: initial !important;
}

.splash-subtitle {
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  font-weight: normal;
  letter-spacing: 1px;
  color: #38bdf8;
  text-shadow: 1px 1px 0 #000000;
  margin: 0;
}

.splash-progress-card {
  width: 100%;
  padding: 16px 20px;
  background: #090e18;
  border: 3px solid #000000;
  border-radius: 14px !important;
  box-shadow: 
    0 0 0 2px #00f0ff,
    inset 1px 1px 0 rgba(255, 255, 255, 0.15),
    inset -2px -2px 0 #000000,
    5px 5px 0 #000000,
    0 0 28px rgba(0, 240, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.splash-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  font-weight: normal;
}

.splash-status-text {
  color: #f1f5f9;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
  text-shadow: 1px 1px 0 #000000;
}

.splash-pct {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  font-weight: normal;
  color: #00f0ff;
  text-shadow: 1px 1px 0 #000000;
}

.splash-bar-track {
  width: 100%;
  height: 18px;
  background: #050811;
  border-radius: 10px !important;
  overflow: hidden;
  position: relative;
  border: 2px solid #000000;
  padding: 2px;
  box-shadow: 0 0 0 1px #1e293b, inset 2px 2px 0 #000000;
  box-sizing: border-box;
}

.splash-bar-fill {
  height: 100%;
  background: #00f0ff;
  background-image: repeating-linear-gradient(
    90deg,
    #00f0ff 0px,
    #00f0ff 8px,
    #0284c7 8px,
    #0284c7 10px
  );
  border-radius: 8px !important;
  transition: width 0.08s steps(10);
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #0369a1;
}

.splash-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #64748b;
  text-shadow: 1px 1px 0 #000000;
}

.splash-details-text {
  text-align: left;
}

.splash-badge-ssd {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  font-weight: normal;
  color: #4ade80;
  background: #052e16;
  border: 2px solid #000000;
  box-shadow: 0 0 0 1px #15803d, inset 1px 1px 0 #86efac, 2px 2px 0 #000000;
  padding: 3px 6px;
  border-radius: 6px !important;
}

/* ------------------------------------------------------------- */
/* PARACHUTE & AIRCRAFT EJECTION HUD PROMPTS                     */
/* ------------------------------------------------------------- */
.hud-parachute-prompt {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hud-parachute-prompt.hidden {
  display: none !important;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
}

.hud-prompt-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75);
  font-family: 'Chakra Petch', 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-prompt-badge.eject-active {
  border: 1px solid #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
  animation: pulse-eject-glow 1.2s infinite alternate;
}

.hud-prompt-badge.deploy-active {
  border: 1px solid #00f0ff;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.45);
  animation: pulse-deploy-glow 0.8s infinite alternate;
}

@keyframes pulse-eject-glow {
  0% { transform: scale(1); box-shadow: 0 0 16px rgba(245, 158, 11, 0.25); }
  100% { transform: scale(1.05); box-shadow: 0 0 32px rgba(245, 158, 11, 0.65); }
}

@keyframes pulse-deploy-glow {
  0% { transform: scale(1); box-shadow: 0 0 18px rgba(0, 240, 255, 0.3); }
  100% { transform: scale(1.06); box-shadow: 0 0 36px rgba(0, 240, 255, 0.75); }
}

.hud-prompt-badge .prompt-icon {
  font-size: 20px;
}

.hud-prompt-badge .prompt-key {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.hud-prompt-badge .prompt-label {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.hud-parachute-stats {
  position: fixed;
  top: 75px;
  left: 20px;
  z-index: 998;
  pointer-events: none;
}

.hud-parachute-stats.hidden {
  display: none !important;
}

.hud-para-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.hud-para-card .para-header {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #00f0ff;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.hud-para-card .para-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
}

.hud-para-card .para-row strong {
  color: #f8fafc;
}

/* ==========================================================================
   THE DIAMOND PALACE CASINO & RESORT - LUXURY GAMBLING STYLING
   ========================================================================== */
.casino-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99990;
  transition: opacity 0.25s ease;
}

.casino-overlay.hidden {
  display: none !important;
}

.casino-container {
  width: 880px;
  max-width: 95vw;
  max-height: 92vh;
  background: #160f08;
  border: 4px solid #b45309;
  outline: 4px solid #000000;
  box-shadow: 
    inset 0 0 0 2px #fde047,
    inset 0 0 0 4px #78350f,
    8px 8px 0 #000000,
    0 16px 36px rgba(0, 0, 0, 0.95);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  image-rendering: pixelated;
  animation: casinoPixelPop 0.2s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes casinoPixelPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* MARQUEE BULBS PATTERN ON HEADER */
.casino-header {
  padding: 14px 20px;
  background: #251608;
  border-bottom: 4px solid #78350f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  box-shadow: inset 0 2px 0 #fde047, inset 0 -2px 0 #451a03;
}

.casino-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #fde047 0px,
    #fde047 6px,
    #b45309 6px,
    #b45309 12px,
    #ef4444 12px,
    #ef4444 18px,
    #1c1917 18px,
    #1c1917 24px
  );
  animation: marqueeBulbs 1.2s steps(4) infinite;
}

@keyframes marqueeBulbs {
  from { background-position-x: 0px; }
  to { background-position-x: 48px; }
}

.casino-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.casino-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #fef08a;
  letter-spacing: 1px;
  background: #451a03;
  border: 2px solid #ca8a04;
  outline: 1px solid #000;
  padding: 3px 8px;
  border-radius: 0;
  display: inline-block;
  align-self: flex-start;
  box-shadow: 2px 2px 0 #000;
  text-shadow: 1px 1px 0 #000;
}

.casino-title-group h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 1px;
  color: #fde047;
  text-shadow: 2px 2px 0 #78350f, 4px 4px 0 #000000;
  margin: 0;
  text-transform: uppercase;
}

.casino-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.casino-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #022c22;
  border: 3px solid #15803d;
  outline: 1px solid #4ade80;
  padding: 6px 12px;
  border-radius: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #4ade80;
  box-shadow: inset 0 0 6px rgba(34, 197, 94, 0.4), 3px 3px 0 #000000;
  text-shadow: 1px 1px 0 #000;
}

.casino-wallet .wallet-icon {
  font-size: 14px;
}

.casino-btn-close {
  background: #dc2626;
  border-top: 2px solid #fca5a5;
  border-left: 2px solid #fca5a5;
  border-right: 2px solid #991b1b;
  border-bottom: 4px solid #450a0a;
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  width: 34px;
  height: 34px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 #000000;
  transition: all 0.05s steps(1);
}

.casino-btn-close:hover {
  background: #ef4444;
  border-top-color: #fee2e2;
}

.casino-btn-close:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
  box-shadow: 1px 1px 0 #000;
}

/* ARCADE GAME SELECTOR TABS */
.casino-tabs {
  display: flex;
  background: #140d06;
  border-bottom: 4px solid #451a03;
  padding: 8px 16px 0 16px;
  gap: 10px;
}

.casino-tab-btn {
  padding: 10px 14px;
  background: #26190b;
  border: 2px solid #573a1c;
  border-bottom: 4px solid #000000;
  color: #a8a29e;
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000000;
  transition: all 0.05s steps(1);
}

.casino-tab-btn:hover {
  color: #fef08a;
  background: #3b2510;
  border-color: #b45309;
}

.casino-tab-btn.active {
  color: #000000;
  background: #d97706;
  border-top: 2px solid #fef08a;
  border-left: 2px solid #fef08a;
  border-right: 2px solid #78350f;
  border-bottom: 4px solid #451a03;
  text-shadow: 1px 1px 0 #fde047;
  transform: translateY(2px);
  box-shadow: 1px 1px 0 #000000;
}

.casino-body {
  padding: 20px;
  background: radial-gradient(circle at center, #1e130a 0%, #110904 100%);
  overflow-y: auto;
  max-height: calc(92vh - 120px);
}

.casino-view {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

/* ========================================================================= */
/* 1. LUCKY WHEEL (PIXEL ART ARCADE WHEEL)                                    */
/* ========================================================================= */
.wheel-stage {
  position: relative;
  width: 360px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  background: #0f0a05;
  border: 4px solid #78350f;
  outline: 2px solid #b45309;
  box-shadow: 
    inset 0 0 0 2px #fde047,
    inset 0 0 24px rgba(0, 0, 0, 0.9),
    4px 4px 0 #000000;
}

/* Mechanical Pixel Pointer */
.wheel-pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  filter: drop-shadow(0 3px 0 #000000);
}

.wheel-disc {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #000000, 0 0 16px rgba(0, 0, 0, 0.9);
  transition: transform 4.8s cubic-bezier(0.12, 0.8, 0.32, 1);
  overflow: hidden;
}

.wheel-disc canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.wheel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 500px;
}

.wheel-status-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  line-height: 1.6;
  color: #fef08a;
  text-shadow: 2px 2px 0 #000000;
  text-align: center;
  background: #1f140a;
  border: 2px solid #78350f;
  padding: 8px 14px;
  box-shadow: 2px 2px 0 #000;
  margin: 0;
}

/* ========================================================================= */
/* RETRO ARCADE PUSHBUTTONS                                                  */
/* ========================================================================= */
.casino-primary-btn {
  padding: 14px 28px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10.5px;
  font-weight: normal;
  letter-spacing: 1px;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 4px 0 #000000;
  transition: all 0.05s steps(1);
  text-transform: uppercase;
}

.casino-primary-btn:hover:not(:disabled) {
  filter: brightness(1.15);
}

.casino-primary-btn:active:not(:disabled) {
  transform: translateY(4px);
  border-bottom-width: 2px !important;
  box-shadow: 0 0 0 #000000 !important;
}

.casino-primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.btn-gold {
  background: #f59e0b;
  border-top: 3px solid #fef08a;
  border-left: 3px solid #fef08a;
  border-right: 3px solid #92400e;
  border-bottom: 6px solid #78350f;
  color: #000000;
  text-shadow: 1px 1px 0 #fde047;
}

.btn-cyan {
  background: #0284c7;
  border-top: 3px solid #7dd3fc;
  border-left: 3px solid #7dd3fc;
  border-right: 3px solid #0369a1;
  border-bottom: 6px solid #082f49;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
}

.btn-green {
  background: #16a34a;
  border-top: 3px solid #86efac;
  border-left: 3px solid #86efac;
  border-right: 3px solid #15803d;
  border-bottom: 6px solid #052e16;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
}

.btn-pink {
  background: #db2777;
  border-top: 3px solid #f472b6;
  border-left: 3px solid #f472b6;
  border-right: 3px solid #9d174d;
  border-bottom: 6px solid #500724;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
}

.casino-secondary-btn {
  padding: 8px 12px;
  background: #26190b;
  border-top: 2px solid #78350f;
  border-left: 2px solid #78350f;
  border-right: 2px solid #000000;
  border-bottom: 3px solid #000000;
  color: #fef08a;
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000000;
}

.casino-secondary-btn:hover {
  background: #3b2510;
  color: #fff;
}

.casino-secondary-btn:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}

/* ========================================================================= */
/* 2. SLOTS 777 (MECHANICAL ARCADE CABINET)                                  */
/* ========================================================================= */
.slots-machine {
  width: 660px;
  max-width: 95%;
  box-sizing: border-box;
  background: #191008;
  border: 4px solid #b45309;
  outline: 3px solid #000000;
  border-radius: 0;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 
    inset 0 0 0 2px #fde047,
    inset 0 0 20px rgba(0, 0, 0, 0.9),
    6px 6px 0 #000000;
}

.slots-marquee {
  text-align: center;
  background: #000000;
  padding: 10px;
  border: 3px solid #78350f;
  outline: 1px solid #b45309;
  border-radius: 0;
  box-shadow: inset 0 0 10px rgba(234, 179, 8, 0.4), 2px 2px 0 #000;
}

.neon-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #facc15;
  text-shadow: 2px 2px 0 #78350f, 0 0 8px rgba(250, 204, 21, 0.9);
  letter-spacing: 2px;
  animation: neonFlicker 1.5s infinite steps(2);
}

@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; text-shadow: 2px 2px 0 #78350f, 0 0 4px rgba(250, 204, 21, 0.5); }
}

.slots-cabinet-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.slots-reels-box {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  background: #080402;
  padding: 20px 14px;
  border-radius: 0;
  border: 3px solid #573a1c;
  outline: 1px solid #000000;
  box-shadow: inset 0 8px 16px #000000, inset 0 -8px 16px #000000;
}

.slot-reel {
  width: 104px;
  height: 112px;
  background: #fffbeb;
  border-radius: 0;
  border: 3px solid #000000;
  outline: 2px solid #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 
    inset 0 14px 12px rgba(0, 0, 0, 0.45), 
    inset 0 -14px 12px rgba(0, 0, 0, 0.45);
  user-select: none;
}

/* Mechanical Side Lever */
.slots-lever {
  position: relative;
  width: 44px;
  height: 110px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  user-select: none;
}

.lever-mount {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 40px;
  background: #26190b;
  border: 2px solid #000000;
  outline: 1px solid #78350f;
  box-shadow: inset 2px 2px 0 #573a1c, 2px 2px 0 #000;
  z-index: 1;
}

.lever-mount::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #ca8a04;
  border: 1px solid #000;
  border-radius: 50%;
}

.lever-arm {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 70px;
  background: #a8a29e;
  border: 2px solid #000000;
  box-shadow: inset 1px 0 0 #f5f5f4;
  border-radius: 0;
  transition: transform 0.2s steps(4);
  transform-origin: bottom center;
  z-index: 2;
}

.lever-knob {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  background: #dc2626;
  border: 2px solid #000000;
  border-radius: 50%;
  box-shadow: inset 3px 3px 0 #fca5a5, 2px 2px 0 #000;
  z-index: 3;
  transition: transform 0.2s steps(4);
}

.slots-lever:hover .lever-knob {
  background: #ef4444;
}

.slots-lever.pulled .lever-arm {
  transform: translateX(-50%) rotateX(60deg) scaleY(0.6);
}

.slots-lever.pulled .lever-knob {
  transform: translateX(-50%) translateY(36px);
}

.slots-payout-box {
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  line-height: 1.5;
  color: #fef08a;
  background: #0f0a05;
  border: 2px solid #451a03;
  padding: 10px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 #000;
}

.slots-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.bet-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.bet-selector .label, .roulette-chip-row .label, .bj-bet-box .label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  color: #e7e5e4;
  margin-right: 4px;
}

.bet-btn, .chip-btn, .bj-bet-btn {
  padding: 8px 10px;
  background: #26190b;
  border-top: 2px solid #78350f;
  border-left: 2px solid #78350f;
  border-right: 2px solid #000;
  border-bottom: 3px solid #000;
  color: #fef08a;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 1px 1px 0 #000;
  transition: all 0.05s steps(1);
  white-space: nowrap;
}

.bet-btn.active, .chip-btn.active, .bj-bet-btn.active {
  background: #ca8a04;
  border-top-color: #fef08a;
  border-left-color: #fef08a;
  border-right-color: #78350f;
  border-bottom-color: #451a03;
  color: #000000;
  text-shadow: 1px 1px 0 #fde047;
  transform: translateY(2px);
}

.slots-control-row .casino-primary-btn {
  padding: 12px 18px;
  font-size: 9.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ========================================================================= */
/* 3. ROULETTE (RETRO FELT TABLE & ARCADE WHEEL)                             */
/* ========================================================================= */
.roulette-board-layout {
  display: flex;
  gap: 20px;
  align-items: center;
  background: #042f2e;
  border: 4px solid #134e4a;
  outline: 2px solid #000;
  padding: 16px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 4px 4px 0 #000;
}

.roulette-wheel-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #02201d;
  border: 2px solid #0d9488;
  padding: 14px;
  box-shadow: 2px 2px 0 #000;
}

.roulette-wheel-svg {
  font-size: 80px;
  transition: transform 3s cubic-bezier(0.1, 0.9, 0.2, 1);
  filter: drop-shadow(0 4px 0 #000);
}

.roulette-wheel-svg.spinning {
  animation: spinWheelAnim 0.3s linear infinite;
}

@keyframes spinWheelAnim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.roulette-number-badge {
  width: 48px;
  height: 48px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 15px;
  color: #fff;
  border: 3px solid #000000;
  outline: 2px solid #ffffff;
  box-shadow: 2px 2px 0 #000;
}

.bg-green { background: #15803d; }
.bg-red { background: #b91c1c; }
.bg-black { background: #1c1917; }

.roulette-bet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.r-bet-cell {
  padding: 10px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.4;
  color: #ffffff;
  border-radius: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  border-left: 2px solid rgba(255, 255, 255, 0.5);
  border-right: 2px solid #000000;
  border-bottom: 3px solid #000000;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000000;
  transition: all 0.05s steps(1);
  text-shadow: 1px 1px 0 #000;
}

.r-bet-cell:hover {
  filter: brightness(1.2);
}

.r-bet-cell:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}

.r-green { background: #15803d; }
.r-red { background: #b91c1c; }
.r-black { background: #18181b; }
.r-even, .r-odd, .r-dozen { background: #1e293b; }

.roulette-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.roulette-bottom-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #fde047;
  text-shadow: 1px 1px 0 #000;
}

/* ========================================================================= */
/* 4. BLACKJACK (RETRO GREEN FELT & PIXEL CARDS)                             */
/* ========================================================================= */
.bj-table-felt {
  width: 100%;
  background: #064e3b;
  border: 4px solid #78350f;
  outline: 3px solid #000000;
  border-radius: 0;
  padding: 20px;
  box-shadow: 
    inset 0 0 0 2px #b45309,
    inset 0 0 24px rgba(0, 0, 0, 0.85),
    4px 4px 0 #000000;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bj-hand-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bj-hand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: #fef08a;
  text-shadow: 1px 1px 0 #000;
}

.bj-score-badge {
  background: #022c22;
  border: 2px solid #22c55e;
  padding: 3px 8px;
  border-radius: 0;
  color: #4ade80;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  box-shadow: 2px 2px 0 #000;
}

.bj-cards-row {
  display: flex;
  gap: 10px;
  min-height: 84px;
  align-items: center;
}

.bj-card {
  width: 58px;
  height: 82px;
  background: #ffffff;
  border-radius: 0;
  border: 2px solid #000000;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 6px;
  font-family: 'Press Start 2P', monospace;
  font-weight: normal;
  font-size: 11px;
  box-shadow: 3px 3px 0 #000000;
}

.bj-card.red-card {
  color: #dc2626;
}

.bj-card.card-back {
  background: repeating-linear-gradient(
    45deg,
    #1e3a8a 0px,
    #1e3a8a 6px,
    #1d4ed8 6px,
    #1d4ed8 12px
  );
  border: 2px solid #000000;
  outline: 2px solid #ffffff;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.bj-divider {
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  line-height: 1.5;
  color: #fef08a;
  border-top: 2px dashed #047857;
  border-bottom: 2px dashed #047857;
  padding: 8px 0;
  text-shadow: 1px 1px 0 #000;
}

.bj-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.bj-bet-box, .bj-action-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.casino-prompt {
  background: #191008;
  border: 3px solid #fde047;
  outline: 2px solid #000000;
  box-shadow: 4px 4px 0 #000000;
  color: #fef08a;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 10px 16px;
  border-radius: 0;
  margin-top: 8px;
  animation: casino-pulse 1.2s infinite alternate steps(2);
  pointer-events: none;
  text-align: center;
  letter-spacing: 0.5px;
}

@keyframes casino-pulse {
  from {
    border-color: #ca8a04;
    color: #fef08a;
  }
  to {
    border-color: #fde047;
    color: #ffffff;
  }
}

/* Live On-Screen FPS Meter */
.hud-fps-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(10, 15, 26, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #4ade80;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  width: fit-content;
  user-select: none;
  transition: border-color 0.2s, color 0.2s;
}

.hud-fps-meter.fps-good {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.hud-fps-meter.fps-warn {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.4);
}

.hud-fps-meter.fps-bad {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
}

.hud-fps-meter .fps-dot {
  font-size: 9px;
  line-height: 1;
}

.hud-fps-meter .fps-unit {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.hud-fps-meter.hidden {
  display: none !important;
}

/* Pixel-art UI icons (js/gameIcons.js) */
.px-icon { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: middle; display: inline-block; flex-shrink: 0; pointer-events: none; user-select: none; }
.px-icon-flip { transform: scaleX(-1); }
