/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700;900&display=swap');

:root {
  /* Palette */
  --bg-deep: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Accents */
  --red-danger: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.6);
  --grey-metal: #94a3b8;
  --gold-reward: #f59e0b;
  --cyan-safe: #06b6d4;

  --text-main: #f8fafc;
  --text-muted: #64748b;
}

* { box-sizing: border-box; }

.roulette-view {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 50% 50%, #1e293b 0%, #020617 100%);
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Ambient Effects */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: 0;
  animation: float 10s infinite ease-in-out;
}
.glow-red { width: 400px; height: 400px; background: var(--red-danger); top: -100px; left: -100px; }
.glow-grey { width: 300px; height: 300px; background: var(--grey-metal); bottom: -50px; right: -50px; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 30px); }
}

/* Header */
.roulette-header { text-align: center; z-index: 2; margin-bottom: 2rem; flex-shrink: 0; }

.header-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--red-danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-bottom: 0.5rem;
}

.roulette-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

/* Stage */
.roulette-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  gap: 3rem;
  min-height: 0;
}

/* LEFT: Cylinder Mechanism */
.cylinder-housing {
  position: relative;
  width: 250px; height: 250px;
  display: flex; justify-content: center; align-items: center;
}

.pointer-arrow {
  position: absolute; top: -20px; font-size: 2rem; color: var(--red-danger);
  z-index: 10; text-shadow: 0 0 10px var(--red-danger);
}

.cylinder {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #334155 0%, #0f172a 70%);
  border: 4px solid #475569;
  box-shadow:
    inset 0 0 30px #000,
    0 20px 50px rgba(0,0,0,0.8);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cylinder-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  background: #1e293b; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  font-size: 2rem;
}

.chamber {
  position: absolute;
  width: 50px; height: 50px;
  background: #020617;
  border-radius: 50%;
  box-shadow: inset 0 0 10px #000;
  border: 2px solid #334155;
}

/* Positioning Chambers in a circle (Radius approx 75px) */
.c1 { top: 10px; left: 50%; transform: translateX(-50%); } /* Top (Active) */
.c2 { top: 55px; right: 10px; }
.c3 { bottom: 55px; right: 10px; }
.c4 { bottom: 10px; left: 50%; transform: translateX(-50%); }
.c5 { bottom: 55px; left: 10px; }
.c6 { top: 55px; left: 10px; }

/* Fired State */
.cylinder.fired .cylinder-center { background: var(--red-danger); box-shadow: 0 0 30px var(--red-danger); }
.cylinder.fired .skull-icon { animation: shake 0.5s infinite; }

/* RIGHT: Risk Console */
.risk-console {
  width: 320px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}

.console-header {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem;
}

.stat-row { display: flex; justify-content: space-between; align-items: center; }
.stat-row .label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
.stat-row .value { font-weight: 700; font-family: monospace; font-size: 1.1rem; }

.val-gold { color: var(--gold-reward); text-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
.val-danger { color: var(--red-danger); }

.rounds-tracker {
  background: rgba(0,0,0,0.3); padding: 10px; border-radius: 12px; margin-top: 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.bullets-display { display: flex; gap: 8px; }
.bullet {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--grey-metal);
  box-shadow: 0 0 5px var(--grey-metal);
  transition: all 0.3s ease;
}
.bullet.spent { background: #334155; box-shadow: none; transform: scale(0.8); }

/* Footer */
.hud-footer {
  margin-top: 1rem; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 1rem; flex-shrink: 0;
}

.player-pill {
  display: flex; gap: 10px; background: rgba(0,0,0,0.4); padding: 8px 16px; border-radius: 50px; border: 1px solid var(--glass-border); font-size: 0.8rem;
}
.player-pill .label { color: var(--text-muted); font-weight: 700; font-size: 0.6rem; letter-spacing: 1px; }
.player-pill .value { font-weight: 700; color: #fff; }
.player-pill .coins { color: var(--gold-reward); font-weight: 700; margin-left: 8px; }
.coins.pulse { animation: pulse 0.3s ease; color: #fff; }

.message-glass {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 3rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  text-align: center;
  min-width: 400px;
  font-weight: 500;
  font-family: monospace;
}
.message-glass.active { border-color: var(--grey-metal); color: var(--text-main); }
.message-glass.danger { border-color: var(--red-danger); background: rgba(239, 68, 68, 0.2); color: var(--red-danger); font-weight: 900; }
.message-glass.success { border-color: var(--cyan-safe); color: var(--cyan-safe); }
.message-glass.neutral { color: var(--text-muted); }

/* Flash Overlay */
.flash-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 10;
  transition: opacity 0.1s ease;
}
.flash-overlay.flash-click { background: rgba(6, 182, 212, 0.2); opacity: 1; }
.flash-overlay.flash-bang { background: rgba(239, 68, 68, 0.8); opacity: 1; }

/* Animations */
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, 2px); } 75% { transform: translate(2px, -2px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }