/* ══════════════════════════════════════════════════════════════════════════
   SATURDAY ROYAL RUMBLE ARENA STYLESHEET
   100% GPU Hardware-Accelerated • 60 FPS Colosseum Theme
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --rumble-bg: #07090E;
  --rumble-card: #0D121D;
  --rumble-card-border: rgba(255, 255, 255, 0.08);
  --rumble-gold: #F59E0B;
  --rumble-gold-glow: rgba(245, 158, 11, 0.4);
  --rumble-crimson: #EF4444;
  --rumble-crimson-glow: rgba(239, 68, 68, 0.4);
  --rumble-cyan: #06B6D4;
  --rumble-cyan-glow: rgba(6, 182, 212, 0.4);
  --rumble-emerald: #10B981;
  --rumble-emerald-glow: rgba(16, 185, 129, 0.4);
}

.rumble-arena-root {
  background-color: var(--rumble-bg);
  color: #F1F5F9;
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 80vh;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  padding: 20px;
  margin: 0 auto 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateZ(0);
}

/* Ambient Radial Lights */
.rumble-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, rgba(245, 158, 11, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 90%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 15% 90%, rgba(239, 68, 68, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #07090E 0%, #0B0E17 100%);
  /* 2026-11-05: was 0, which painted this opaque layer OVER any screen whose content was not individually positioned (the final
     podium, "Battle Complete" and the get-ready countdown showed as a black box). -1 keeps it behind everything; the arena root is
     its own stacking context (transform), so it still sits above the root background. */
  z-index: -1;
}

/* Red Vignette Heartbeat Alert */
.rumble-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  box-shadow: inset 0 0 120px rgba(239, 68, 68, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.rumble-vignette.heartbeat-active {
  opacity: 1 !important;
  animation: rumbleHeartbeat 0.8s infinite alternate ease-in-out;
}
@keyframes rumbleHeartbeat {
  from { opacity: 0.3; }
  to { opacity: 0.85; }
}

/* Off-Main-Thread Floating Emoji Bleachers */
.rumble-emoji-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}
.rumble-floating-emoji {
  position: absolute;
  font-size: 30px;
  will-change: transform, opacity;
  animation: rumbleFloatUp 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes rumbleFloatUp {
  0% { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  15% { transform: translate3d(var(--drift-x1), -60px, 0) scale(1.2); opacity: 1; }
  80% { opacity: 0.9; }
  100% { transform: translate3d(var(--drift-x2), -380px, 0) scale(0.9); opacity: 0; }
}

/* Header */
.rumble-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.rumble-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #FFF 20%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}
.rumble-wave-pill {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--rumble-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* Grid Layout */
.rumble-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
/* 2026-11-08: the phone layout used `1fr`, whose minimum is the widest content (the Live Standings panel, ~366 px), so on a 375 px phone
   the question box, the timer and the option text were wider than the screen and clipped. minmax(0,1fr) lets the column shrink to fit. */
@media (max-width: 900px) {
  .rumble-grid { grid-template-columns: minmax(0, 1fr); }
}
.rumble-grid > * { min-width: 0; }
.rumble-stem, .rumble-opt-text { overflow-wrap: anywhere; }

/* Lobby: rules + roster side by side on a wide screen, stacked on a phone. It used to be a fixed 1fr + 340px grid, so on a phone the
   rules text, the roster and the Join button ran off the right edge and were clipped (2026-11-08). */
.rumble-lobby-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .rumble-lobby-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Laser Question Box */
.rumble-laser-box {
  position: relative;
  background: var(--rumble-card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--rumble-card-border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  overflow: hidden;
}
.rumble-laser-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 16px;
}
.rumble-laser-rect {
  fill: none;
  stroke: var(--rumble-cyan);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

/* Timer */
.rumble-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  color: var(--rumble-cyan);
  transition: color 0.3s;
}
.rumble-timer.warn { color: var(--rumble-gold); }
.rumble-timer.critical {
  color: var(--rumble-crimson);
  animation: rumbleCriticalPulse 0.5s infinite alternate;
}
@keyframes rumbleCriticalPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* Question Content */
.rumble-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rumble-stem {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: #F8FAFC;
  margin-bottom: 20px;
}

/* Options */
.rumble-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.rumble-option {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.rumble-option:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.rumble-opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  color: #94A3B8;
  flex-shrink: 0;
}
.rumble-opt-text {
  font-size: 13.5px;
  font-weight: 500;
  color: #E2E8F0;
  line-height: 1.4;
}
.rumble-option.selected {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--rumble-cyan);
}
.rumble-option.selected .rumble-opt-letter {
  background: var(--rumble-cyan);
  color: #07090E;
}
.rumble-option.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--rumble-emerald) !important;
}
.rumble-option.correct .rumble-opt-letter {
  background: var(--rumble-emerald) !important;
  color: #07090E !important;
}
.rumble-option.wrong {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--rumble-crimson) !important;
  opacity: 0.6;
}
.rumble-option.wrong .rumble-opt-letter {
  background: var(--rumble-crimson) !important;
  color: #FFF !important;
}

/* Leaderboard */
.rumble-lb {
  background: var(--rumble-card);
  border-radius: 16px;
  border: 1px solid var(--rumble-card-border);
  padding: 16px;
}
.rumble-lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94A3B8;
}
.rumble-pcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
  will-change: transform;
}
.rumble-pcard.is-me {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}
.rumble-pcard.in-danger {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
}
.rumble-guillotine {
  margin: 8px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rumble-guillotine-bar {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--rumble-crimson) 0, var(--rumble-crimson) 8px, transparent 8px, transparent 16px);
}
.rumble-guillotine-tag {
  position: absolute;
  background: var(--rumble-crimson);
  color: #FFF;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Spectator Reaction Bar */
.rumble-spectator-bar {
  margin-top: 16px;
  background: var(--rumble-card);
  border: 1px solid var(--rumble-card-border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;   /* phone: the five reaction buttons drop below the label instead of running off the edge */
  gap: 8px;
}
.rumble-spectator-bar > div { flex-wrap: wrap; }
.rumble-react-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 18px;
  padding: 4px 10px;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
.rumble-react-btn:hover {
  transform: scale(1.2) translateY(-2px);
  background: rgba(255, 255, 255, 0.15);
}

/* Intermission Banner */
.rumble-intermission-strip {
  margin-top: 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #FCD34D;
  animation: rumbleFadeIn 0.3s ease;
}
@keyframes rumbleFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Guillotine Checkpoint Overlay */
.rumble-checkpoint-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  animation: rumbleGuillotineDrop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rumbleGuillotineDrop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.rumble-blade-icon {
  font-size: 48px;
  color: var(--rumble-crimson);
  text-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
  margin-bottom: 12px;
  animation: bladePulse 1s infinite alternate;
}
@keyframes bladePulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}
.rumble-checkpoint-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--rumble-crimson);
  text-transform: uppercase;
  margin: 0 0 8px;
}
.rumble-checkpoint-sub {
  font-size: 13.5px;
  color: #CBD5E1;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.rumble-elim-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
  margin-bottom: 24px;
}
.rumble-elim-pill {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rumble-survivor-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6EE7B7;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════
   GLOBAL PERSISTENT SATURDAY RUMBLE REGISTRATION BANNER
   ══════════════════════════════════════════════════════════════════════════ */
#global-rumble-register-banner {
  width: 100%;
  margin: 0 0 1rem 0;
  box-sizing: border-box;
}

.rumble-global-banner {
  background: linear-gradient(135deg, #0D121D 0%, #151C2C 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 15px rgba(245, 158, 11, 0.12);
  border-radius: var(--r-lg, 12px);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  animation: rumbleBannerFadeIn 0.35s ease-out;
}

.rumble-global-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #F59E0B, #EF4444);
}

.rumble-global-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  flex: 1;
}

.rumble-global-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
  flex-shrink: 0;
}

.rumble-global-banner-text {
  min-width: 0;
}

.rumble-global-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rumble-global-banner-title span:first-child {
  font-size: 13.5px;
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: -0.01em;
}

.rumble-global-banner-badge {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FBBF24;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.rumble-global-banner-sub {
  font-size: 11.5px;
  color: #94A3B8;
  margin-top: 2px;
  line-height: 1.4;
}

.rumble-global-banner-sub b {
  color: #FDE68A;
  font-weight: 600;
}

.rumble-global-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.rumble-global-btn-reg {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: #07090E !important;
  border: none !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  padding: 7px 16px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3) !important;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rumble-global-btn-reg:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.rumble-global-btn-reg:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.rumble-global-btn-view {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #E2E8F0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease !important;
}

.rumble-global-btn-view:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #F8FAFC !important;
}

@keyframes rumbleBannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* The registration banner is for the home-type pages only. On work pages (Audit AI, Financials, trackers...) it pushed the work down the screen. */
#main-content:not(:has(#page-hub.active, #page-diary.active, #page-quiz.active, #page-dashboard.active, #page-leaderboard.active)) #global-rumble-register-banner { display: none !important; }
