/* ==============================================================================
   FIRSTSAVEPOINT PARTY ARENA • HUB DESIGN SYSTEM
   Inspired by Apple Glassmorphism + Cyber Retro-Arcade HUD
   ============================================================================== */

:root {
  --bg-base: #000000;
  --bg-obsidian: #08090d;
  --bg-surface: rgba(18, 20, 29, 0.72);
  --bg-surface-hover: rgba(28, 31, 46, 0.85);
  --bg-glass-card: rgba(14, 16, 24, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 255, 255, 0.25);
  
  --apple-blue: #2997ff;
  --apple-cyan: #38bdf8;
  --apple-green: #30d158;
  --apple-orange: #ff9f0a;
  --apple-purple: #bf5af2;
  --apple-red: #ff453a;
  --apple-gold: #fbbf24;

  --font-system: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(41, 151, 255, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(191, 90, 242, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(48, 209, 88, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: #f5f5f7;
  font-family: var(--font-system);
  min-height: 100vh;
  user-select: none;
  overflow-x: hidden;
}

.font-mono {
  font-family: var(--font-mono);
}

/* CUSTOM ULTRA-THIN GLASS SCROLLBAR */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* HUB GLASSMORPHISM CARDS */
.hub-glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--border-glass);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-glass-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.hub-glass-subtle {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

/* GLOWS & ACCENTS */
.glow-cyan {
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.18);
}
.glow-purple {
  box-shadow: 0 0 30px rgba(191, 90, 242, 0.22);
}
.glow-gold {
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.25);
}
.glow-emerald {
  box-shadow: 0 0 30px rgba(48, 209, 88, 0.2);
}

/* BRAND GLYPH TITANIUM ACCENT */
.brand-glyph-hub {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2c2c2e, #141416);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* BIG BUZZER BUTTON RIPPLE & HAPTIC SHOCKWAVE */
.buzzer-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 14px 40px rgba(239, 68, 68, 0.45), inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

.buzzer-btn:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: 0 18px 50px rgba(239, 68, 68, 0.6), inset 0 2px 8px rgba(255, 255, 255, 0.5);
}

.buzzer-btn:active:not(:disabled) {
  transform: scale(0.92) translateY(4px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* 8x8 TURF WAR SCI-FI GRID */
.turf-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}

.turf-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  font-size: 11px;
}

.turf-cell:hover:not(.lava) {
  transform: scale(1.12);
  z-index: 10;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.turf-cell.lava {
  background: radial-gradient(circle, #ef4444 0%, #7f1d1d 100%) !important;
  border-color: #f87171 !important;
  cursor: not-allowed;
  animation: lava-flicker 2.5s infinite alternate;
}

@keyframes lava-flicker {
  0% { opacity: 0.85; filter: brightness(1); }
  100% { opacity: 1; filter: brightness(1.35); box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
}

.turf-cell.hq-cell {
  border-width: 2px;
  box-shadow: 0 0 16px currentColor;
  animation: hq-beacon 2s infinite alternate;
}

@keyframes hq-beacon {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

/* 5x5 JEOPARDY BOARD GRID */
.jeopardy-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.jeopardy-card {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.jeopardy-card:hover:not(.answered):not(.disabled-turn) {
  border-color: #fbbf24;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(251, 191, 36, 0.35);
}

.jeopardy-card.answered {
  opacity: 0.15;
  cursor: not-allowed;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.jeopardy-card.disabled-turn {
  opacity: 0.6;
  filter: grayscale(0.4);
  cursor: not-allowed;
}

.jeopardy-card.my-turn-selectable {
  border-color: #38bdf8;
  animation: my-turn-glow 1.6s infinite alternate;
  cursor: pointer;
}

@keyframes my-turn-glow {
  0% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
  100% { box-shadow: 0 0 26px rgba(56, 189, 248, 0.95); transform: translateY(-2px); }
}

/* PODIUM 3D PEDESTALS */
.podium-1 {
  height: 200px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.35) 0%, rgba(251, 191, 36, 0.03) 100%);
  border-top: 3px solid #fbbf24;
  box-shadow: 0 -8px 24px rgba(251, 191, 36, 0.2);
}

.podium-2 {
  height: 145px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.28) 0%, rgba(226, 232, 240, 0.03) 100%);
  border-top: 3px solid #e2e8f0;
  box-shadow: 0 -6px 18px rgba(226, 232, 240, 0.15);
}

.podium-3 {
  height: 110px;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.28) 0%, rgba(249, 115, 22, 0.03) 100%);
  border-top: 3px solid #f97316;
  box-shadow: 0 -6px 16px rgba(249, 115, 22, 0.15);
}

/* MICRO ANIMATIONS */
@keyframes badge-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
