/* ═══════════════════════════════════════════════════
   PARTY GAMES ARENA — Ultra Design System v3.0
   Neon Glassmorphism · Animated · Immersive · Mobile-First
   ═══════════════════════════════════════════════════ */

:root {
  --bg-deep: #06060f;
  --bg-dark: #0a0a18;
  --bg-surface: #0e0e22;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-card-active: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);

  --text-primary: #f0f0ff;
  --text-secondary: rgba(240, 240, 255, 0.65);
  --text-muted: rgba(240, 240, 255, 0.35);

  --neon-purple: #7B68EE;
  --neon-pink: #FF6B9D;
  --neon-cyan: #00E5FF;
  --neon-yellow: #FFE66D;
  --neon-green: #69F0AE;
  --neon-orange: #FF8A65;
  --neon-red: #FF5252;
  --neon-teal: #80CBC4;

  --gradient-primary: linear-gradient(135deg, #7B68EE, #FF6B9D);
  --gradient-secondary: linear-gradient(135deg, #00E5FF, #69F0AE);
  --gradient-party: linear-gradient(135deg, #FF6B9D, #FFE66D);
  --gradient-coop: linear-gradient(135deg, #7B68EE, #00E5FF);
  --gradient-warm: linear-gradient(135deg, #FF8A65, #FF6B9D);
  --gradient-cool: linear-gradient(135deg, #00E5FF, #7B68EE);
  --gradient-rainbow: linear-gradient(135deg, #FF6B9D, #FFE66D, #69F0AE, #00E5FF, #7B68EE);

  --shadow-neon-purple: 0 0 20px rgba(123, 104, 238, 0.4), 0 0 60px rgba(123, 104, 238, 0.15);
  --shadow-neon-pink: 0 0 20px rgba(255, 107, 157, 0.4), 0 0 60px rgba(255, 107, 157, 0.15);
  --shadow-neon-cyan: 0 0 20px rgba(0, 229, 255, 0.4), 0 0 60px rgba(0, 229, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(123,104,238,0.12);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --transition-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ══════════ RESET ══════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--font-primary);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
input, textarea { user-select: text; }

/* ══════════ LOADING SCREEN ══════════ */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loading-screen.fade-out { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; }
.loader-ring {
  width: 100px; height: 100px; position: relative; margin: 0 auto 24px;
}
.ring-segment {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent;
}
.ring-segment:nth-child(1) {
  border-top-color: var(--neon-purple);
  animation: loaderSpin 1.2s linear infinite;
}
.ring-segment:nth-child(2) {
  border-right-color: var(--neon-pink);
  animation: loaderSpin 1.6s linear infinite reverse;
  inset: 8px;
}
.ring-segment:nth-child(3) {
  border-bottom-color: var(--neon-cyan);
  animation: loaderSpin 2s linear infinite;
  inset: 16px;
}
.loader-emoji {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  animation: loaderPulse 1.5s ease-in-out infinite;
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderPulse { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.2); } }

.loader-title {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 900;
  background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.loader-title .accent { background: var(--gradient-secondary); -webkit-background-clip: text; }
.loader-bar {
  width: 200px; height: 3px; margin: 0 auto 12px;
  background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden;
}
.loader-bar-fill {
  height: 100%; width: 0%;
  background: var(--gradient-primary); border-radius: 2px;
  animation: loaderFill 2s ease-in-out forwards;
}
@keyframes loaderFill { 0% { width: 0%; } 50% { width: 70%; } 100% { width: 100%; } }
.loader-tip {
  font-size: 0.85rem; color: var(--text-muted);
  animation: fadeInUp 0.5s ease 0.3s both;
}

/* ══════════ BACKGROUND CANVAS ══════════ */
#bg-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ══════════ APP CONTAINER ══════════ */
#app { position: relative; z-index: 2; width: 100%; height: 100%; }

/* ══════════ SCREENS ══════════ */
.screen {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  display: none; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  display: flex; flex-direction: column;
  animation: screenIn 0.6s var(--transition-spring);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ══════════ GLASS CARD ══════════ */
.glass-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: var(--shadow-card);
  transition: all 0.4s var(--transition-spring);
  position: relative; overflow: hidden;
}
.glass-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.glass-card:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

/* ══════════ BUTTONS ══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px;
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.3s var(--transition-spring);
  outline: none; text-decoration: none;
  min-height: 48px; min-width: 48px;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--gradient-primary); color: white;
  box-shadow: var(--shadow-neon-purple);
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(123,104,238,0.5), 0 0 80px rgba(123,104,238,0.2); transform: translateY(-2px); }

.btn-secondary {
  background: rgba(255,255,255,0.06); color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--neon-cyan); }

.btn-ghost { background: transparent; color: var(--text-secondary); padding: 10px 16px; }
.btn-ghost:hover { color: white; background: rgba(255,255,255,0.06); }
.btn-small { font-size: 0.85rem; padding: 10px 16px; }
.btn-tiny { font-size: 0.75rem; padding: 6px 10px; border-radius: 8px; min-height: 36px; }
.btn-danger { color: var(--neon-red); }
.btn-danger:hover { background: rgba(255,82,82,0.12); color: var(--neon-red); }

.pulse-btn { animation: neonPulse 2.5s ease-in-out infinite; }
@keyframes neonPulse {
  0%, 100% { box-shadow: var(--shadow-neon-purple); }
  50% { box-shadow: 0 0 40px rgba(123,104,238,0.6), 0 0 100px rgba(255,107,157,0.2); }
}

.btn-arrow { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════ INPUTS ══════════ */
.input-group { display: flex; gap: 12px; }
input[type="text"] {
  flex: 1; padding: 14px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: white; font-size: 1rem;
  font-family: var(--font-primary);
  outline: none; transition: all 0.3s ease;
  min-height: 48px;
}
input[type="text"]::placeholder { color: var(--text-muted); }
input[type="text"]:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 20px rgba(123,104,238,0.15);
  background: rgba(255,255,255,0.06);
}

/* ══════════════════ HOME SCREEN ══════════════════ */
#screen-home { align-items: center; padding: clamp(16px, 4vh, 32px) 20px; }

.home-header { text-align: center; margin-bottom: 20px; }
.logo-container { position: relative; }
.logo-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 350px; height: 120px;
  background: var(--gradient-primary); filter: blur(80px); opacity: 0.35;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity: 0.35; } 50% { opacity: 0.55; } }

.logo {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 900; letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 12px; position: relative;
}
.logo-icon { font-size: clamp(2rem, 7vw, 3rem); animation: iconFloat 3s ease-in-out infinite; }
@keyframes iconFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-5deg); } }

.logo-text {
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tagline { color: var(--text-secondary); font-size: clamp(0.85rem, 2.5vw, 1.1rem); margin-top: 8px; letter-spacing: 0.5px; }

/* ── Home Stats Bar ── */
.home-stats {
  display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap;
}
.stat-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
  animation: fadeInUp 0.5s ease both;
}
.stat-pill:nth-child(2) { animation-delay: 0.1s; }
.stat-pill:nth-child(3) { animation-delay: 0.2s; }
.stat-icon { font-size: 0.9rem; }
.pulse-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--neon-green); border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; box-shadow: 0 0 4px var(--neon-green); } 50% { opacity: 0.4; box-shadow: none; } }
.online-pill { border-color: rgba(105,240,174,0.15); }

/* ── Name Input Section ── */
.name-input-section { width: 100%; max-width: 520px; margin-bottom: 24px; }
.name-card { text-align: center; }
.name-card h2 {
  font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 14px;
  color: var(--text-secondary); font-weight: 500;
}

/* ── Avatar Picker ── */
.avatar-picker {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 16px; padding: 8px 0;
}
.avatar-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  font-size: 1.3rem; cursor: pointer;
  transition: all 0.25s var(--transition-bounce);
  display: flex; align-items: center; justify-content: center;
}
.avatar-btn:hover {
  border-color: rgba(123,104,238,0.4);
  background: rgba(123,104,238,0.08);
  transform: scale(1.15);
}
.avatar-btn.selected {
  border-color: var(--neon-purple);
  background: rgba(123,104,238,0.15);
  box-shadow: 0 0 16px rgba(123,104,238,0.3);
  transform: scale(1.15);
}
.avatar-btn:active { transform: scale(0.95); }

/* ── Category Filter ── */
.category-filter {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 20px;
  animation: fadeInUp 0.5s ease;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 18px; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; gap: 6px;
}
.filter-btn:hover {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
}
.filter-btn.active {
  background: rgba(123,104,238,0.12); border-color: rgba(123,104,238,0.3);
  color: var(--neon-purple);
}
.filter-icon { font-size: 0.9rem; }
.filter-count {
  font-size: 0.7rem; padding: 1px 7px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06); font-weight: 800;
}
.filter-btn.active .filter-count { background: rgba(123,104,238,0.2); }

/* ══════════ GAMES GRID ══════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px; width: 100%; max-width: 1200px;
  padding: 0 16px clamp(40px, 10vh, 80px);
}
.game-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 24px); cursor: pointer;
  transition: all 0.5s var(--transition-spring);
  position: relative; overflow: hidden;
  animation: fadeInUp 0.5s ease both;
}
.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:nth-child(7) { animation-delay: 0.35s; }
.game-card:nth-child(8) { animation-delay: 0.4s; }

.game-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  transition: height 0.4s ease;
}
.game-card[data-type="party"]::before { background: var(--gradient-party); }
.game-card[data-type="coop"]::before { background: var(--gradient-coop); }
.game-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0; transition: opacity 0.3s;
}
.game-card:hover::after { opacity: 1; }
.game-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255,255,255,0.15);
  box-shadow: var(--shadow-card-hover);
}
.game-card:hover::before { height: 4px; }
.game-card:active { transform: translateY(-2px) scale(0.99); }
.game-card.hidden-card { display: none; }

.game-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.game-card-icon { font-size: clamp(2.4rem, 5vw, 3rem); display: block; }
.game-card-info-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted); font-size: 0.9rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
  z-index: 5; position: relative;
}
.game-card-info-btn:hover {
  border-color: var(--neon-cyan); color: var(--neon-cyan);
  background: rgba(0,229,255,0.08);
}

.game-card-title {
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 700; margin-bottom: 6px;
}
.game-card-desc {
  font-size: clamp(0.78rem, 1.8vw, 0.86rem); color: var(--text-secondary);
  margin-bottom: 12px; line-height: 1.5;
}
/* Mini-Instructions on card */
.game-card-controls {
  font-size: 0.72rem; color: var(--text-muted);
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 10px; line-height: 1.5;
}
.game-card-controls kbd {
  display: inline-block; padding: 1px 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px; font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 600;
}

.game-card-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.game-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.tag-party { background: rgba(255,107,157,0.12); color: var(--neon-pink); border: 1px solid rgba(255,107,157,0.25); }
.tag-coop { background: rgba(123,104,238,0.12); color: var(--neon-purple); border: 1px solid rgba(123,104,238,0.25); }
.tag-players { background: rgba(0,229,255,0.08); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.15); }

.hidden { display: none !important; }

/* ══════════════════ LOBBY SCREEN ══════════════════ */
#screen-lobby { align-items: center; justify-content: center; padding: 20px; }
.lobby-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; width: 100%; }
.lobby-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.room-info { flex: 1; }
.room-code-container { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.room-code-label { color: var(--text-muted); font-size: 0.85rem; }
.room-code {
  font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; letter-spacing: 4px;
  background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Lobby Game Info Collapsible */
.lobby-game-info {
  margin-bottom: 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}
.game-info-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: var(--neon-cyan);
  transition: background 0.2s;
}
.game-info-header:hover { background: rgba(255,255,255,0.03); }
.game-info-header .chevron {
  transition: transform 0.3s; font-size: 0.7rem; color: var(--text-muted);
}
.lobby-game-info.open .chevron { transform: rotate(180deg); }
.game-info-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--transition-spring), padding 0.3s;
  padding: 0 14px; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7;
}
.lobby-game-info.open .game-info-body {
  max-height: 400px; padding: 0 14px 14px;
}
.info-section-title {
  color: var(--neon-purple); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 1px; margin: 8px 0 4px;
}
.info-tip { padding-left: 8px; border-left: 2px solid rgba(123,104,238,0.3); margin: 4px 0; }

.players-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; min-height: 80px; }
.player-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
  animation: fadeInUp 0.3s ease both;
}
.player-item.ready { border-color: rgba(105,240,174,0.4); background: rgba(105,240,174,0.06); }
.player-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.player-avatar { font-size: 1.2rem; }
.player-badge { font-size: 0.65rem; padding: 3px 8px; border-radius: var(--radius-full); font-weight: 700; text-transform: uppercase; }
.badge-host { background: rgba(255,230,109,0.15); color: var(--neon-yellow); }
.player-status { font-size: 0.85rem; color: var(--text-muted); }
.player-item.ready .player-status { color: var(--neon-green); }
.lobby-actions { display: flex; gap: 12px; }
.join-section h3 { font-family: var(--font-display); margin-bottom: 16px; }
.open-rooms { margin-top: 20px; }
.open-rooms h4 { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 10px; }
.rooms-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.room-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer; transition: all 0.2s ease;
}
.room-item:hover { background: rgba(255,255,255,0.06); border-color: var(--neon-cyan); }

/* ══════════════════ MODAL OVERLAY ══════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,6,15,0.75); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.hidden { display: none; }
.modal-content {
  max-width: 520px; width: 100%; max-height: 85vh; overflow-y: auto;
  animation: popIn 0.4s var(--transition-bounce);
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary); font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 5;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: white; }

.modal-game-icon { font-size: 3rem; margin-bottom: 8px; display: block; text-align: center; }
.modal-game-title {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 800;
  text-align: center; margin-bottom: 4px;
}
.modal-game-subtitle {
  text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px;
}
.modal-section {
  margin-bottom: 14px; padding: 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04);
}
.modal-section-title {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px;
}
.modal-section-title.controls-t { color: var(--neon-cyan); }
.modal-section-title.tips-t { color: var(--neon-yellow); }
.modal-section-title.rules-t { color: var(--neon-purple); }
.modal-control-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; padding: 4px 0; color: var(--text-secondary);
}
.modal-control-key {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
}
.modal-tip-item {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.85rem; color: var(--text-secondary); padding: 3px 0;
}
.modal-tip-item::before { content: '💡'; flex-shrink: 0; }
.modal-play-btn {
  width: 100%; margin-top: 16px; padding: 16px;
  font-size: 1.1rem; font-weight: 700;
}

/* ══════════════════ GAME SCREEN ══════════════════ */
#screen-game { flex-direction: column; }
.game-hud {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; padding-top: calc(8px + var(--safe-top));
  background: rgba(6,6,15,0.88); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 20; min-height: 48px;
}
.hud-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.hud-code { font-size: 0.75rem; color: var(--text-muted); margin-left: 10px; }
.hud-center { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.hud-right { display: flex; gap: 6px; align-items: center; }

.game-container {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(123,104,238,0.04) 0%, transparent 70%);
}
#game-canvas { display: block; max-width: 100%; max-height: 100%; }
.game-ui {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.game-ui > * { pointer-events: auto; }

/* ── Game Overlays ── */
.game-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(6,6,15,0.8); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; z-index: 30;
}
.game-popup {
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl); padding: clamp(24px, 5vw, 44px);
  text-align: center; max-width: 480px; width: 92%;
  animation: popIn 0.5s var(--transition-bounce);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
@keyframes popIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.game-popup h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 12px; }
.game-popup .winner-name {
  font-size: 1.4rem; font-weight: 800;
  background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.score-list { list-style: none; margin: 16px 0; text-align: left; }
.score-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 4px;
  transition: background 0.3s;
  animation: fadeInUp 0.3s ease both;
}
.score-list li:nth-child(1) { animation-delay: 0.1s; }
.score-list li:nth-child(2) { animation-delay: 0.15s; }
.score-list li:nth-child(3) { animation-delay: 0.2s; }
.score-list li:first-child { background: rgba(255,230,109,0.08); border: 1px solid rgba(255,230,109,0.15); }
.score-list .score-name { font-weight: 600; }
.score-list .score-value { font-family: var(--font-mono); font-weight: 700; color: var(--neon-yellow); }

/* ══════════════════ VIRTUAL JOYSTICK ══════════════════ */
.joystick-zone {
  position: absolute; bottom: calc(20px + var(--safe-bottom)); left: 20px;
  width: 140px; height: 140px; z-index: 30; touch-action: none;
}
.joystick-base {
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.12);
  position: relative; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}
.joystick-thumb {
  width: 50px; height: 50px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.25), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.2);
  position: absolute; transition: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.joystick-thumb.active {
  background: radial-gradient(circle at 35% 35%, rgba(123,104,238,0.5), rgba(123,104,238,0.2));
  border-color: var(--neon-purple);
  box-shadow: var(--shadow-neon-purple);
}

/* ── Mobile Action Buttons ── */
.mobile-action-buttons {
  position: absolute; bottom: calc(20px + var(--safe-bottom)); right: 20px;
  display: flex; gap: 12px; z-index: 30;
  flex-direction: column; align-items: center;
}
.action-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: white; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; user-select: none;
  transition: all 0.15s ease; backdrop-filter: blur(8px);
}
.action-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.15); }
.action-btn.btn-attack { border-color: rgba(255,82,82,0.4); background: rgba(255,82,82,0.12); }
.action-btn.btn-attack:active { background: rgba(255,82,82,0.3); box-shadow: 0 0 20px rgba(255,82,82,0.3); }
.action-btn.btn-special { border-color: rgba(123,104,238,0.4); background: rgba(123,104,238,0.12); }
.action-btn.btn-special:active { background: rgba(123,104,238,0.3); box-shadow: var(--shadow-neon-purple); }
.action-btn.btn-shoot { border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.12); width: 72px; height: 72px; font-size: 1.8rem; }
.action-btn.btn-shoot:active { background: rgba(0,229,255,0.3); box-shadow: var(--shadow-neon-cyan); }

/* ══════════════════ QUIZ SPECIFIC ══════════════════ */
.quiz-container { width: 100%; max-width: 700px; padding: clamp(12px, 3vw, 24px); }
.quiz-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.quiz-timer-ring { width: 64px; height: 64px; position: relative; flex-shrink: 0; }
.quiz-timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.quiz-timer-ring .timer-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 6; }
.quiz-timer-ring .timer-fg { fill: none; stroke: var(--neon-green); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear, stroke 0.3s; }
.quiz-timer-ring .timer-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700;
}
.timer-urgent { color: var(--neon-pink) !important; animation: pulse 0.5s ease infinite; }
.quiz-info { flex: 1; }
.quiz-qnum { font-size: 0.8rem; color: var(--text-muted); }
.quiz-streak { color: var(--neon-orange); font-weight: 700; }
.quiz-question {
  font-family: var(--font-display); font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  font-weight: 700; text-align: center; margin-bottom: 20px; line-height: 1.4;
}
.quiz-category {
  font-size: 0.8rem; color: var(--neon-cyan); text-transform: uppercase;
  font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; text-align: center;
}
.quiz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-answer-btn {
  padding: clamp(14px, 3vw, 18px) 16px;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md); color: white; font-size: clamp(0.85rem, 2vw, 1rem); font-weight: 600;
  cursor: pointer; transition: all 0.25s ease; text-align: center;
  min-height: 56px; display: flex; align-items: center;
  animation: fadeInUp 0.3s ease both;
}
.quiz-answer-btn:nth-child(1) { animation-delay: 0.05s; }
.quiz-answer-btn:nth-child(2) { animation-delay: 0.1s; }
.quiz-answer-btn:nth-child(3) { animation-delay: 0.15s; }
.quiz-answer-btn:nth-child(4) { animation-delay: 0.2s; }
.quiz-answer-btn:hover:not(:disabled) { border-color: var(--neon-purple); background: rgba(123,104,238,0.08); transform: scale(1.02); }
.quiz-answer-btn:active:not(:disabled) { transform: scale(0.98); }
.quiz-answer-btn.correct { border-color: var(--neon-green) !important; background: rgba(105,240,174,0.15) !important; box-shadow: 0 0 20px rgba(105,240,174,0.2); animation: correctPulse 0.5s ease; }
.quiz-answer-btn.wrong { border-color: var(--neon-red) !important; background: rgba(255,82,82,0.15) !important; animation: wrongShake 0.4s ease; }
.quiz-answer-btn.selected { border-color: var(--neon-purple); background: rgba(123,104,238,0.15); }
@keyframes correctPulse { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes wrongShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.answer-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.08); font-weight: 800; font-size: 0.8rem;
  margin-right: 10px; flex-shrink: 0;
}
.answer-text { flex: 1; text-align: left; }
.quiz-scoreboard { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.quiz-score-entry {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-sm);
  font-size: 0.85rem; animation: fadeInUp 0.3s ease both;
}
.quiz-score-entry.me { background: rgba(123,104,238,0.1); border: 1px solid rgba(123,104,238,0.2); }
.quiz-score-entry .rank { width: 28px; text-align: center; }
.quiz-score-entry .name { flex: 1; font-weight: 600; }
.quiz-score-entry .pts { font-family: var(--font-mono); font-weight: 700; color: var(--neon-yellow); }
.streak-badge { font-size: 0.75rem; color: var(--neon-orange); font-weight: 800; }

/* ══════════════════ MEMORY MATCH ══════════════════ */
.memory-container { width: 100%; max-width: 600px; padding: clamp(12px, 3vw, 24px); }
.memory-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.memory-level { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--neon-purple); }
.memory-turn { font-size: 0.95rem; font-weight: 600; }
.memory-combo { font-weight: 800; color: var(--neon-orange); }
.memory-grid { display: grid; gap: 6px; padding: 12px; max-width: 560px; width: 100%; }
.memory-card {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.2rem, 3vw, 1.8rem); cursor: pointer;
  transition: all 0.4s var(--transition-spring);
  user-select: none; min-height: 40px;
  border: 2px solid rgba(123,104,238,0.2);
  -webkit-tap-highlight-color: transparent;
}
.card-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s; }
.card-front {
  font-size: 1.5rem; color: var(--text-muted);
  background: linear-gradient(135deg, rgba(123,104,238,0.15), rgba(255,107,157,0.1));
  border-radius: var(--radius-sm);
}
.card-back { font-size: clamp(1.3rem, 3vw, 2rem); opacity: 0; }
.memory-card.flipped .card-front { opacity: 0; }
.memory-card.flipped .card-back { opacity: 1; }
.memory-card.flipped { background: rgba(255,255,255,0.06); border-color: var(--neon-cyan); animation: cardFlip 0.4s ease; }
.memory-card.matched { background: rgba(105,240,174,0.08); border-color: rgba(105,240,174,0.3); opacity: 0.65; animation: matchPop 0.4s ease; }
.memory-card:hover:not(.flipped):not(.matched) { border-color: rgba(123,104,238,0.5); transform: scale(1.05); }
.memory-card:active:not(.flipped):not(.matched) { transform: scale(0.95); }
@keyframes cardFlip { 0% { transform: scale(0.8) rotateY(90deg); } 100% { transform: scale(1.05) rotateY(0); } }
@keyframes matchPop { 0% { transform: scale(1.05); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

.memory-scores { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.mem-score-entry {
  display: flex; gap: 8px; padding: 6px 14px; font-size: 0.85rem;
  background: rgba(255,255,255,0.03); border-radius: var(--radius-sm);
}
.mem-score-entry.me { background: rgba(123,104,238,0.1); border: 1px solid rgba(123,104,238,0.2); }
.mem-score-entry .pts { font-weight: 700; color: var(--neon-yellow); font-family: var(--font-mono); }

/* ══════════════════ WORD CHAIN ══════════════════ */
.wordchain-container { width: 100%; max-width: 600px; padding: clamp(12px, 3vw, 24px); }
.wc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wc-category { font-size: 0.8rem; color: var(--neon-cyan); text-transform: uppercase; font-weight: 700; letter-spacing: 2px; }
.wc-timer-ring { width: 52px; height: 52px; position: relative; flex-shrink: 0; }
.wc-timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wc-timer-ring .timer-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 6; }
.wc-timer-ring .timer-fg { fill: none; stroke: var(--neon-green); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.1s linear, stroke 0.3s; }
.wc-timer-ring .timer-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700;
}
.wc-chain { text-align: center; margin-bottom: 16px; }
.wc-prompt { font-size: 1.1rem; }
.wc-last-word {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 800;
  background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.wc-arrow { color: var(--text-muted); font-size: 1.3rem; margin: 0 8px; }
.wc-next-letter { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; color: var(--neon-cyan); }
.wc-word-history {
  max-height: 140px; overflow-y: auto; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 4px; padding: 8px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-sm);
}
.wc-history-entry { font-size: 0.85rem; padding: 4px 8px; border-radius: 6px; animation: fadeInUp 0.3s ease; }
.wc-history-entry.accepted { color: var(--text-secondary); }
.wc-history-entry.rejected { color: var(--neon-red); text-decoration: line-through; opacity: 0.5; }
.wc-h-name { color: var(--text-muted); font-weight: 600; }
.wc-input-area { display: flex; gap: 10px; margin-bottom: 16px; transition: opacity 0.3s; }
.wc-input {
  flex: 1; padding: 12px 16px; font-size: 1.05rem; text-align: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md); color: white; outline: none; font-family: var(--font-primary);
}
.wc-input:focus { border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(123,104,238,0.15); }
.wc-submit {
  padding: 12px 24px; font-weight: 700; border: none; cursor: pointer;
  background: var(--gradient-primary); color: white; border-radius: var(--radius-md);
  font-family: var(--font-display); min-height: 48px; transition: transform 0.15s;
}
.wc-submit:active { transform: scale(0.95); }
.wc-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wc-player {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm);
  font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s;
}
.wc-player.active { border-color: var(--neon-cyan); background: rgba(0,229,255,0.06); }
.wc-player.me { border-color: rgba(123,104,238,0.3); }
.wc-player.dead { opacity: 0.35; }
.wc-name { font-weight: 600; }
.wc-lives { font-size: 0.7rem; }
.wc-score { font-family: var(--font-mono); font-weight: 700; color: var(--neon-yellow); font-size: 0.8rem; }

/* ══════════════════ REACTION RACE ══════════════════ */
.reaction-container { width: 100%; max-width: 600px; padding: clamp(12px, 3vw, 24px); }
.reaction-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rx-round { font-family: var(--font-display); font-weight: 700; }
.rx-challenge-type { font-size: 0.8rem; color: var(--neon-cyan); text-transform: uppercase; font-weight: 700; letter-spacing: 1.5px; }
.reaction-arena { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.rx-waiting-text { color: var(--text-muted); font-size: 1.1rem; }
.reaction-scoreboard { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.rx-score-entry {
  display: flex; justify-content: space-between; padding: 8px 12px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); font-size: 0.85rem;
}
.rx-score-entry.me { background: rgba(123,104,238,0.1); border: 1px solid rgba(123,104,238,0.2); }
.rx-instruction { font-family: var(--font-display); font-size: clamp(1rem, 3vw, 1.4rem); font-weight: 700; margin-bottom: 20px; text-align: center; }
.rx-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 300px; }
.rx-color-btn {
  width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255,255,255,0.2);
  cursor: pointer; transition: all 0.2s; min-height: 64px;
}
.rx-color-btn:active, .rx-color-btn.pressed { transform: scale(0.9); border-color: white; }
.rx-big-btn {
  width: clamp(140px, 40vw, 200px); height: clamp(140px, 40vw, 200px);
  border-radius: 50%; border: 4px solid; font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.8rem); font-weight: 800; cursor: pointer;
  transition: all 0.3s; display: flex; align-items: center; justify-content: center;
}
.rx-big-btn.rx-waiting { background: rgba(255,82,82,0.1); border-color: var(--neon-red); color: var(--neon-red); }
.rx-big-btn.rx-go { background: rgba(105,240,174,0.15); border-color: var(--neon-green); color: var(--neon-green); box-shadow: 0 0 30px rgba(105,240,174,0.3); animation: goTarget 0.6s ease-in-out infinite; }
.rx-big-btn.rx-fail { background: rgba(255,82,82,0.15); border-color: var(--neon-red); color: var(--neon-red); opacity: 0.6; }
.rx-big-btn:active:not(:disabled) { transform: scale(0.92); }
@keyframes goTarget { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.rx-hold { background: rgba(0,229,255,0.1); border-color: var(--neon-cyan); color: var(--neon-cyan); }
.rx-hold.active { background: rgba(0,229,255,0.2); box-shadow: var(--shadow-neon-cyan); }
.rx-timer-bar { width: 80%; max-width: 300px; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; margin-top: 16px; overflow: hidden; }
.rx-timer-fill { height: 100%; border-radius: 4px; background: var(--neon-green); transition: width 30ms linear, background 0.3s; }
.rx-sequence-display { font-family: var(--font-display); font-size: 2rem; font-weight: 800; min-height: 80px; display: flex; align-items: center; justify-content: center; }
.rx-seq-num { animation: fadeInUp 0.3s ease; color: var(--neon-cyan); }
.rx-sequence-btns { display: flex; gap: 12px; }
.rx-seq-btn {
  width: 56px; height: 56px; border-radius: var(--radius-md); border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: white; font-size: 1.3rem; font-weight: 700; cursor: pointer;
  transition: all 0.15s;
}
.rx-seq-btn:active, .rx-seq-btn.pressed { background: rgba(123,104,238,0.2); border-color: var(--neon-purple); transform: scale(0.92); }
.rx-odd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; }
.rx-odd-btn {
  aspect-ratio: 1; border-radius: var(--radius-md); border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer; font-size: 1.5rem; font-weight: 700; transition: all 0.2s; min-height: 60px;
}
.rx-odd-btn:active, .rx-odd-btn.selected { border-color: white; transform: scale(0.92); }
.rx-math-problem { font-family: var(--font-mono); font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 800; margin-bottom: 20px; color: var(--neon-yellow); }
.rx-math-options { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.rx-math-btn {
  padding: 14px 28px; border-radius: var(--radius-md); border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04); color: white; font-size: 1.2rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; min-height: 52px;
}
.rx-math-btn:hover { border-color: var(--neon-purple); }
.rx-math-btn:active, .rx-math-btn.selected { background: rgba(123,104,238,0.15); border-color: var(--neon-purple); transform: scale(0.95); }
.rx-simon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 260px; }
.rx-simon-btn {
  aspect-ratio: 1; border-radius: var(--radius-md); border: 2px solid var(--simon-color, #555);
  background: rgba(255,255,255,0.04); cursor: pointer; transition: all 0.2s; min-height: 80px;
}
.rx-simon-btn.lit { background: var(--simon-color); box-shadow: 0 0 20px var(--simon-color); }
.rx-simon-btn:active { transform: scale(0.92); }
.rx-type-word {
  font-family: var(--font-mono); font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 800;
  margin-bottom: 16px; color: var(--neon-cyan); letter-spacing: 3px;
}
.rx-type-input {
  width: 100%; max-width: 300px; padding: 14px 20px; text-align: center;
  font-size: 1.1rem; font-family: var(--font-mono);
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md); color: white; outline: none; transition: border-color 0.3s;
}
.rx-type-input:focus { border-color: var(--neon-purple); }
.rx-result-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.rx-results { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.rx-result-entry {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); font-size: 0.9rem;
}
.rx-result-entry.me { background: rgba(123,104,238,0.08); border: 1px solid rgba(123,104,238,0.2); }
.rx-result-entry .rank { width: 28px; text-align: center; }
.rx-result-entry .name { flex: 1; font-weight: 600; }
.rx-result-entry .detail { color: var(--text-muted); font-size: 0.8rem; }
.rx-result-entry .pts { font-family: var(--font-mono); font-weight: 700; }
.rx-result-entry .pts.gained { color: var(--neon-green); }

/* ══════════════════ DUNGEON STATS ══════════════════ */
.dungeon-stats {
  position: absolute; top: 8px; left: 8px; display: flex; gap: 12px; z-index: 15; flex-wrap: wrap;
}

/* ══════════════════ TOAST NOTIFICATIONS ══════════════════ */
.toast-container {
  position: fixed; top: calc(16px + var(--safe-top)); right: 16px; left: 16px;
  z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px; pointer-events: auto;
  background: rgba(14,14,34,0.92); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md); color: white;
  font-size: 0.85rem; font-weight: 500; max-width: 360px;
  animation: toastIn 0.4s var(--transition-spring), toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.success { border-left: 3px solid var(--neon-green); }
.toast.error { border-left: 3px solid var(--neon-red); }
.toast.info { border-left: 3px solid var(--neon-cyan); }
.toast.warning { border-left: 3px solid var(--neon-orange); }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ══════════════════ FULLSCREEN BUTTON ══════════════════ */
#btn-fullscreen, #btn-how-to-play, #btn-sound-toggle {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: white; width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
#btn-fullscreen:hover, #btn-how-to-play:hover, #btn-sound-toggle:hover { background: rgba(255,255,255,0.12); }

/* ══════════════════ RESPONSIVE ══════════════════ */
@media (max-width: 768px) {
  .lobby-container { grid-template-columns: 1fr; }
  .quiz-answers { grid-template-columns: 1fr; }
  .game-popup { padding: 20px; }
  .game-popup h2 { font-size: 1.4rem; }
  .joystick-zone, .mobile-action-buttons { display: flex; }
  .hud-center { font-size: 0.8rem; gap: 8px; }
}
@media (min-width: 769px) {
  .joystick-zone, .mobile-action-buttons { display: none; }
}
@media (max-width: 480px) {
  .games-grid { gap: 12px; padding: 0 12px 40px; }
  .game-card { padding: 16px; }
  .game-hud { padding: 6px 12px; }
  .home-stats { gap: 6px; }
  .stat-pill { padding: 5px 10px; font-size: 0.75rem; }
  .avatar-picker { gap: 6px; }
  .avatar-btn { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ══════════ UTILITY ANIMATIONS ══════════ */
.shake { animation: shake 0.5s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes letterGlow {
  0%,100% { box-shadow: var(--shadow-neon-purple); }
  50% { box-shadow: 0 0 30px rgba(123,104,238,0.6), 0 0 80px rgba(255,107,157,0.3); }
}

/* ══════════ CONFETTI ══════════ */
.confetti-piece {
  position: fixed; pointer-events: none; z-index: 999;
  animation: confettiFall 2s ease-out forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0); opacity: 0; }
}

/* ══════════ SCROLLBAR ══════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ══════════ REACTION RACE v2 EXTRAS ══════════ */
.rx-responded { font-size: 0.75rem; color: var(--text-muted); }
.rx-streak-badge { background: linear-gradient(135deg, #FF6B35, #FF4500); padding: 1px 6px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; margin-left: 4px; }
.rx-emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 300px; margin: 16px auto; }
.rx-emoji-btn { font-size: 1.8rem; padding: 12px; border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; background: rgba(255,255,255,0.05); cursor: pointer; transition: all 0.15s; }
.rx-emoji-btn:hover { background: rgba(255,255,255,0.1); transform: scale(1.1); }
.rx-emoji-btn.selected { border-color: var(--neon-cyan); background: rgba(0,229,255,0.15); }
.rx-tf-statement { font-size: 1.2rem; text-align: center; padding: 20px; margin: 16px 0; background: rgba(255,255,255,0.03); border-radius: 12px; line-height: 1.6; }
.rx-tf-btns { display: flex; gap: 16px; justify-content: center; }
.rx-tf-btn { padding: 16px 32px; border: 2px solid rgba(255,255,255,0.1); border-radius: 14px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; background: rgba(255,255,255,0.03); color: var(--text-primary); }
.rx-tf-btn.true:hover { border-color: var(--neon-green); background: rgba(105,240,174,0.1); }
.rx-tf-btn.false:hover { border-color: var(--neon-red); background: rgba(255,107,157,0.1); }
.rx-tf-btn.selected { opacity: 0.6; }
.rx-count-grid { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 12px 0; font-size: 1.5rem; }
.rx-count-item { padding: 2px; }
.rx-count-choices { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.rx-count-btn { padding: 12px 24px; border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; font-size: 1.2rem; font-weight: 700; cursor: pointer; background: rgba(255,255,255,0.03); color: var(--text-primary); transition: all 0.15s; }
.rx-count-btn:hover { border-color: var(--neon-purple); background: rgba(123,104,238,0.1); }
.rx-count-btn.selected { border-color: var(--neon-cyan); background: rgba(0,229,255,0.12); }

/* ══════════ TRUTH OR DARE ══════════ */
.tod-container { display: flex; flex-direction: column; height: 100%; padding: 16px; gap: 12px; }
.tod-header { display: flex; align-items: center; justify-content: space-between; }
.tod-round { font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.tod-mode { font-size: 0.8rem; color: #E040FB; text-transform: uppercase; font-weight: 700; }
.tod-arena { flex: 1; overflow-y: auto; display: flex; align-items: center; justify-content: center; }
.tod-scoreboard { display: flex; flex-wrap: wrap; gap: 6px; }
.tod-score-entry { display: flex; justify-content: space-between; padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,0.03); font-size: 0.85rem; min-width: 120px; }
.tod-score-entry.me { background: rgba(224,64,251,0.1); border: 1px solid rgba(224,64,251,0.2); }
.tod-mode-select, .tod-turn, .tod-prompt-display, .tod-rating-section, .tod-result-display { text-align: center; width: 100%; }
.tod-modes, .imp-modes { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 400px; margin-left: auto; margin-right: auto; }
.tod-mode-btn, .imp-mode-btn { display: flex; flex-direction: column; align-items: center; padding: 16px; border: 2px solid rgba(255,255,255,0.08); border-radius: 14px; background: rgba(255,255,255,0.03); cursor: pointer; transition: all 0.2s; color: var(--text-primary); }
.tod-mode-btn:hover:not(:disabled), .imp-mode-btn:hover:not(:disabled) { border-color: #E040FB; background: rgba(224,64,251,0.06); transform: translateY(-2px); }
.tod-mode-btn.selected, .imp-mode-btn.selected { border-color: var(--neon-cyan); background: rgba(0,229,255,0.08); }
.tod-mode-icon, .imp-mode-icon { font-size: 2rem; margin-bottom: 4px; }
.tod-mode-name, .imp-mode-name { font-weight: 700; font-size: 1.1rem; }
.tod-mode-desc, .imp-mode-desc { font-size: 0.8rem; color: var(--text-muted); }
.tod-spotlight { font-size: 1.6rem; font-weight: 800; margin-bottom: 20px; }
.tod-choice-btns { display: flex; gap: 16px; justify-content: center; }
.tod-choice-btn { display: flex; flex-direction: column; align-items: center; padding: 24px 32px; border: 2px solid rgba(255,255,255,0.08); border-radius: 16px; background: rgba(255,255,255,0.03); cursor: pointer; transition: all 0.2s; position: relative; color: var(--text-primary); }
.tod-choice-btn.truth:hover { border-color: var(--neon-cyan); background: rgba(0,229,255,0.08); }
.tod-choice-btn.dare:hover { border-color: #FF6B9D; background: rgba(255,107,157,0.08); }
.tod-choice-icon { font-size: 2.5rem; margin-bottom: 6px; }
.tod-choice-text { font-weight: 700; font-size: 1.2rem; }
.tod-bonus-badge { position: absolute; top: -8px; right: -8px; background: linear-gradient(135deg, #FFD700, #FFA000); color: #000; font-size: 0.65rem; font-weight: 800; padding: 2px 8px; border-radius: 12px; }
.tod-badge { font-size: 1rem; font-weight: 700; padding: 6px 16px; border-radius: 20px; display: inline-block; margin: 10px 0; }
.tod-badge.truth { background: rgba(0,229,255,0.12); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.3); }
.tod-badge.dare { background: rgba(255,107,157,0.12); color: #FF6B9D; border: 1px solid rgba(255,107,157,0.3); }
.tod-prompt-text { font-size: 1.3rem; line-height: 1.6; padding: 20px; background: rgba(255,255,255,0.03); border-radius: 14px; margin: 12px 0; }
.tod-done-btn { padding: 14px 28px; border-radius: 50px; border: none; background: linear-gradient(135deg, var(--neon-green), #00C853); color: #000; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s; }
.tod-done-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(105,240,174,0.3); }
.tod-stars { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.tod-star { font-size: 2rem; cursor: pointer; background: none; border: none; opacity: 0.4; transition: all 0.15s; padding: 4px; }
.tod-star:hover, .tod-star.active { opacity: 1; transform: scale(1.2); }
.tod-star-label { font-size: 0.85rem; color: var(--text-muted); }
.tod-result-stars { font-size: 1.5rem; margin: 8px 0; }
.tod-result-points { font-size: 1.2rem; font-weight: 700; color: var(--neon-green); }
.tod-result-count { font-size: 0.8rem; color: var(--text-muted); }
.tod-performer { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }

/* ══════════ IMPOSTOR ══════════ */
.imp-container { display: flex; flex-direction: column; height: 100%; padding: 16px; gap: 12px; }
.imp-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.imp-round { font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.imp-role { font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.imp-role.impostor { color: #FF5252; background: rgba(255,82,82,0.1); border: 1px solid rgba(255,82,82,0.3); }
.imp-role.citizen { color: var(--neon-green); background: rgba(105,240,174,0.08); border: 1px solid rgba(105,240,174,0.2); }
.imp-mode { font-size: 0.75rem; color: var(--text-muted); }
.imp-arena { flex: 1; overflow-y: auto; display: flex; align-items: center; justify-content: center; }
.imp-scoreboard { display: flex; flex-wrap: wrap; gap: 6px; }
.imp-score-entry { display: flex; justify-content: space-between; padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,0.03); font-size: 0.85rem; min-width: 120px; }
.imp-score-entry.me { background: rgba(255,82,82,0.08); border: 1px solid rgba(255,82,82,0.15); }
.imp-role-reveal { text-align: center; width: 100%; padding: 24px; animation: fadeInUp 0.5s ease; }
.imp-role-icon { font-size: 4rem; margin-bottom: 12px; }
.imp-role-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.impostor-reveal .imp-role-title { color: #FF5252; }
.citizen-reveal .imp-role-title { color: var(--neon-green); }
.imp-role-info { font-size: 0.9rem; color: var(--text-muted); margin: 6px 0; }
.imp-secret-word { font-size: 1.3rem; margin: 12px 0; padding: 12px 24px; background: rgba(255,255,255,0.05); border-radius: 12px; display: inline-block; }
.imp-role-hint { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-top: 8px; }
.imp-describe, .imp-oneword, .imp-questions, .imp-voting, .imp-caught, .imp-round-result { width: 100%; text-align: center; }
.imp-turn-info { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.imp-category-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; background: rgba(255,82,82,0.08); color: #FF8A65; font-size: 0.8rem; font-weight: 600; margin-bottom: 10px; }
.imp-impostor-reminder { color: #FF5252; font-weight: 600; font-size: 0.9rem; margin: 6px 0; }
.imp-word-reminder { color: var(--neon-green); font-size: 0.9rem; margin: 6px 0; }
.imp-previous { margin: 12px 0; text-align: left; max-height: 150px; overflow-y: auto; }
.imp-prev-desc, .imp-prev-word { padding: 6px 10px; margin-bottom: 4px; border-radius: 8px; background: rgba(255,255,255,0.02); font-size: 0.9rem; animation: fadeInUp 0.3s ease; }
.imp-input-section { margin-top: 12px; }
.imp-desc-input, .imp-word-input, .imp-guess-input, .imp-q-input {
  width: 100%; padding: 12px 16px; border: 2px solid rgba(255,255,255,0.08); border-radius: 12px;
  background: rgba(255,255,255,0.03); color: var(--text-primary); font-size: 1rem; font-family: var(--font-body);
  resize: none; margin-bottom: 8px;
}
.imp-desc-input:focus, .imp-word-input:focus, .imp-guess-input:focus, .imp-q-input:focus { border-color: var(--neon-purple); outline: none; }
.imp-submit-btn { padding: 10px 24px; border-radius: 50px; border: none; background: linear-gradient(135deg, var(--neon-purple), #6C63FF); color: #fff; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.imp-submit-btn:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(123,104,238,0.3); }
.imp-vote-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.imp-vote-descriptions { text-align: left; margin: 12px 0; max-height: 200px; overflow-y: auto; }
.imp-vote-desc { padding: 8px 12px; margin-bottom: 4px; border-radius: 8px; background: rgba(255,255,255,0.02); font-size: 0.9rem; }
.imp-vote-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }
.imp-vote-btn { padding: 10px 20px; border: 2px solid rgba(255,255,255,0.08); border-radius: 12px; background: rgba(255,255,255,0.03); cursor: pointer; font-weight: 600; transition: all 0.2s; color: var(--text-primary); }
.imp-vote-btn:hover { border-color: #FF5252; background: rgba(255,82,82,0.08); }
.imp-vote-btn.selected { border-color: #FF5252; background: rgba(255,82,82,0.15); }
.imp-vote-status { font-size: 0.8rem; color: var(--text-muted); }
.imp-caught-title { font-size: 1.5rem; font-weight: 800; color: #FF5252; margin-bottom: 12px; }
.imp-caught-info { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 16px; }
.imp-guess-section { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.imp-result-word { font-size: 1.1rem; margin: 8px 0; }
.imp-result-impostor { font-size: 1rem; margin: 8px 0; color: #FF5252; }
.imp-result-outcome { font-size: 1.1rem; font-weight: 600; margin: 12px 0; padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,0.03); }
.imp-result-voted { font-size: 0.85rem; color: var(--text-muted); }
.imp-q-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.imp-q-list { text-align: left; margin: 12px 0; }
.imp-q-item { margin-bottom: 12px; }
.imp-q-item label { display: block; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 4px; }

/* Impostor Phase Guide */
.imp-phase-guide { display: flex; gap: 4px; justify-content: center; margin-bottom: 8px; }
.imp-phase-step { font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.03); color: var(--text-muted); transition: all 0.3s; border: 1px solid transparent; }
.imp-phase-step.active { background: rgba(255,82,82,0.12); color: #FF5252; border-color: rgba(255,82,82,0.3); }
.imp-phase-step.done { background: rgba(105,240,174,0.08); color: #69F0AE; border-color: rgba(105,240,174,0.15); }
.imp-vote-timer { margin: 8px 0; position: relative; padding: 6px 0; }
.imp-vote-timer-bar { height: 3px; background: linear-gradient(90deg, #FF5252, #FFE66D); border-radius: 2px; width: 100%; transition: width 20s linear; }
.imp-vote-timer span { font-size: 0.75rem; color: var(--text-muted); }
.imp-vote-hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; font-style: italic; }
.imp-vote-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-top: 8px; }
.imp-vote-name { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.imp-vote-text { display: block; font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.imp-vote-btn .vote-avatar { font-size: 1.3rem; display: block; margin-bottom: 2px; }
.imp-vote-btn .vote-name { font-size: 0.85rem; }

/* ══════════ WORD CHAIN PIANO KEYS ══════════ */
.wc-piano-keys { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; min-height: 42px; padding: 6px 0; }
.wc-piano-key {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 36px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--key-color, #69F0AE);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: pianoKeyIn 0.15s ease forwards;
  position: relative; overflow: hidden;
}
.wc-piano-key .key-letter {
  font-weight: 800; font-size: 0.95rem; color: var(--key-color, #69F0AE);
  text-shadow: 0 0 8px var(--key-color, #69F0AE);
  z-index: 1;
}
.wc-piano-key .key-glow {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  opacity: 0.6; filter: blur(2px);
}
@keyframes pianoKeyIn {
  from { transform: translateY(-10px) scale(0.8); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes keyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ══════════ WEREWOLF ══════════ */
.ww-container { display: flex; flex-direction: column; height: 100%; padding: 16px; gap: 10px; }
.ww-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ww-day { font-weight: 700; font-size: 0.9rem; color: var(--text-secondary); }
.ww-role-badge { font-size: 0.8rem; font-weight: 700; padding: 3px 12px; border-radius: 12px; }
.ww-role-badge.wolves { color: #FF5252; background: rgba(255,82,82,0.1); border: 1px solid rgba(255,82,82,0.3); }
.ww-role-badge.village { color: #69F0AE; background: rgba(105,240,174,0.08); border: 1px solid rgba(105,240,174,0.2); }
.ww-phase { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.ww-arena { flex: 1; overflow-y: auto; display: flex; align-items: center; justify-content: center; transition: background 0.5s; }
.ww-arena.night-mode { background: linear-gradient(180deg, rgba(10,10,30,0.5), rgba(20,0,40,0.3)); border-radius: 16px; }
.ww-players-ring { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 8px 0; }
.ww-player-pip { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.03); font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; }
.ww-player-pip.me { border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.05); }
.ww-player-pip.dead { opacity: 0.4; text-decoration: line-through; }
.ww-pip-icon { font-size: 0.75rem; }
.ww-pip-name { font-weight: 500; }
.ww-message { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 12px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.85rem; font-weight: 600; opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 100; }
.ww-message.visible { opacity: 1; }

/* Werewolf Setup */
.ww-setup { width: 100%; max-width: 500px; text-align: center; }
.ww-setup h3 { font-size: 1.3rem; margin-bottom: 8px; }
.ww-setup-info { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.ww-setup-section { margin-bottom: 20px; text-align: left; }
.ww-setup-label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-secondary); }
.ww-setup-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; text-align: center; }
.ww-wolf-count { display: flex; align-items: center; justify-content: center; gap: 16px; }
.ww-count-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,82,82,0.3); background: rgba(255,82,82,0.05); color: #FF5252; font-size: 1.3rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.ww-count-btn:hover { background: rgba(255,82,82,0.15); transform: scale(1.1); }
.ww-count-value { font-size: 2rem; font-weight: 800; color: #FF5252; min-width: 30px; text-align: center; }
.ww-role-list { display: flex; flex-direction: column; gap: 8px; }
.ww-role-toggle { cursor: pointer; display: block; }
.ww-role-toggle input { display: none; }
.ww-role-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 2px solid rgba(255,255,255,0.06); border-radius: 12px; background: rgba(255,255,255,0.02); transition: all 0.2s; }
.ww-role-toggle input:checked + .ww-role-card { border-color: rgba(105,240,174,0.4); background: rgba(105,240,174,0.05); }
.ww-role-icon { font-size: 1.5rem; min-width: 30px; text-align: center; }
.ww-role-name { font-weight: 700; font-size: 0.9rem; min-width: 90px; }
.ww-role-desc { font-size: 0.75rem; color: var(--text-muted); flex: 1; }
.ww-start-btn { padding: 14px 32px; border-radius: 50px; border: none; background: linear-gradient(135deg, #FF5252, #D32F2F); color: #fff; font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: all 0.2s; margin-top: 10px; }
.ww-start-btn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,82,82,0.3); }

/* Werewolf Role Reveal */
.ww-role-reveal { text-align: center; width: 100%; padding: 24px; animation: fadeInUp 0.6s ease; }
.ww-role-reveal.wolf { border: 2px solid rgba(255,82,82,0.15); border-radius: 20px; background: rgba(255,82,82,0.03); }
.ww-role-reveal.village { border: 2px solid rgba(105,240,174,0.1); border-radius: 20px; background: rgba(105,240,174,0.02); }
.ww-role-big-icon { font-size: 4rem; margin-bottom: 12px; }
.ww-role-title { font-size: 1.5rem; font-weight: 800; }
.ww-role-reveal.wolf .ww-role-title { color: #FF5252; }
.ww-role-reveal.village .ww-role-title { color: #69F0AE; }
.ww-role-team { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 12px; }
.ww-role-description { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; padding: 12px 16px; background: rgba(255,255,255,0.03); border-radius: 12px; }
.ww-teammates { margin-top: 12px; padding: 8px 14px; border-radius: 10px; background: rgba(255,82,82,0.08); color: #FF8A65; font-weight: 600; font-size: 0.9rem; }
.ww-game-info { margin-top: 12px; font-size: 0.8rem; color: var(--text-muted); }

/* Werewolf Night */
.ww-night-overlay { text-align: center; width: 100%; padding: 40px 20px; }
.ww-moon { font-size: 4rem; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.ww-night-text { font-size: 1.1rem; color: rgba(200,200,255,0.8); margin-top: 12px; }
.ww-loading-dots span { animation: blink 1.4s infinite; opacity: 0; font-size: 2rem; color: var(--text-muted); }
.ww-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ww-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* Werewolf Night Action */
.ww-night-action { width: 100%; text-align: center; padding: 16px; }
.ww-action-header { margin-bottom: 16px; }
.ww-action-role { font-size: 1.2rem; font-weight: 700; display: block; margin-bottom: 8px; }
.ww-action-msg { font-size: 0.95rem; color: var(--text-secondary); }
.ww-action-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-top: 8px; }
.ww-teammates-small { font-size: 0.8rem; color: #FF8A65; margin-bottom: 10px; }
.ww-action-targets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ww-target-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 18px; border: 2px solid rgba(255,255,255,0.08); border-radius: 12px; background: rgba(255,255,255,0.03); cursor: pointer; transition: all 0.2s; color: var(--text-primary); min-width: 80px; }
.ww-target-btn:hover:not(:disabled) { border-color: #FF5252; background: rgba(255,82,82,0.06); transform: translateY(-2px); }
.ww-target-btn.selected { border-color: #FF5252; background: rgba(255,82,82,0.15); }
.ww-target-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ww-target-icon { font-size: 1.5rem; }
.ww-target-name { font-size: 0.85rem; font-weight: 600; }

/* Witch action */
.ww-witch .ww-witch-section { margin: 12px 0; padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.02); }
.ww-witch-btn { padding: 10px 20px; border-radius: 50px; border: none; cursor: pointer; font-weight: 600; transition: all 0.2s; margin: 6px; color: #fff; }
.ww-witch-btn.heal { background: linear-gradient(135deg, #69F0AE, #00C853); }
.ww-witch-btn.skip { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.ww-witch-btn.heal:hover { box-shadow: 0 0 15px rgba(105,240,174,0.3); }
.ww-witch-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.ww-poison-btn { padding: 8px 14px; border: 2px solid rgba(255,82,82,0.2); border-radius: 10px; background: rgba(255,82,82,0.03); color: #FF6B9D; cursor: pointer; transition: all 0.2s; font-weight: 600; }
.ww-poison-btn:hover { background: rgba(255,82,82,0.1); border-color: #FF5252; }

/* Werewolf Seer */
.ww-seer-result { text-align: center; padding: 30px; animation: fadeInUp 0.4s ease; }
.ww-seer-result.wolf-found { border: 2px solid rgba(255,82,82,0.3); border-radius: 16px; background: rgba(255,82,82,0.05); }
.ww-seer-result.clear { border: 2px solid rgba(105,240,174,0.2); border-radius: 16px; background: rgba(105,240,174,0.03); }
.ww-seer-icon { font-size: 3rem; margin-bottom: 8px; }
.ww-seer-text { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.ww-seer-result.wolf-found .ww-seer-text { color: #FF5252; }
.ww-seer-result.clear .ww-seer-text { color: #69F0AE; }
.ww-seer-target { font-size: 1.8rem; font-weight: 800; }

/* Werewolf Dawn/Night Results */
.ww-dawn { text-align: center; width: 100%; padding: 24px; animation: fadeInUp 0.5s ease; }
.ww-sun { font-size: 3.5rem; margin-bottom: 8px; }
.ww-dawn-text { font-size: 1.2rem; font-weight: 700; }
.ww-dawn-sub { font-size: 0.9rem; color: var(--text-muted); }
.ww-death-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.ww-death-card { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(255,82,82,0.06); border-left: 3px solid #FF5252; animation: fadeInUp 0.4s ease; }
.ww-death-card.lover { border-left-color: #E040FB; background: rgba(224,64,251,0.06); }
.ww-death-icon { font-size: 1.5rem; }
.ww-death-name { font-weight: 700; flex: 1; }
.ww-death-role { font-size: 0.8rem; color: var(--text-muted); }
.ww-death-love { font-size: 0.8rem; color: #E040FB; }

/* Werewolf Day Discussion */
.ww-day-discussion { width: 100%; text-align: center; }
.ww-day-discussion h3 { font-size: 1.2rem; margin-bottom: 8px; }
.ww-discuss-hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.ww-discuss-timer { position: relative; margin: 12px 0; padding: 24px 0 8px; }
.ww-discuss-bar { height: 4px; background: linear-gradient(90deg, #69F0AE, #FFE66D, #FF6B9D); border-radius: 2px; }
.ww-discuss-timer span { font-size: 0.8rem; color: var(--text-muted); }
.ww-alive-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.ww-alive-player { padding: 6px 12px; border-radius: 20px; background: rgba(255,255,255,0.03); font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.05); }
.ww-alive-player.me { border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.05); }
.ww-discuss-info { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; font-style: italic; }

/* Werewolf Voting */
.ww-voting { width: 100%; text-align: center; }
.ww-voting h3 { font-size: 1.2rem; margin-bottom: 6px; }
.ww-vote-hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.ww-vote-timer { position: relative; margin: 8px 0; padding: 20px 0 6px; }
.ww-vote-bar { height: 4px; background: linear-gradient(90deg, #FF5252, #FFE66D); border-radius: 2px; }
.ww-vote-timer span { font-size: 0.8rem; color: var(--text-muted); }
.ww-vote-targets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.ww-vote-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 18px; border: 2px solid rgba(255,255,255,0.08); border-radius: 14px; background: rgba(255,255,255,0.03); cursor: pointer; transition: all 0.2s; color: var(--text-primary); min-width: 80px; }
.ww-vote-btn:hover:not(:disabled) { border-color: #FF5252; background: rgba(255,82,82,0.06); transform: translateY(-2px); }
.ww-vote-btn.selected { border-color: #FF5252; background: rgba(255,82,82,0.15); }
.ww-vote-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ww-vote-icon { font-size: 1.3rem; }
.ww-vote-name { font-size: 0.85rem; font-weight: 600; }
.ww-vote-status { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

/* Werewolf Vote Result */
.ww-vote-result { width: 100%; text-align: center; padding: 20px; animation: fadeInUp 0.4s ease; }
.ww-result-msg { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.ww-elim-icon { font-size: 3rem; margin-bottom: 8px; }
.ww-vote-details { margin-top: 12px; }
.ww-vote-entry { font-size: 0.85rem; color: var(--text-muted); padding: 2px 0; }

/* Werewolf Hunter Shot */
.ww-hunter-shot { text-align: center; padding: 30px; animation: fadeInUp 0.4s ease; }
.ww-shot-icon { font-size: 3rem; margin-bottom: 8px; }

/* Werewolf Game Over */
.ww-gameover { max-width: 500px; }
.ww-go-icon { font-size: 3rem; margin-bottom: 8px; }
.ww-go-days { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.ww-go-roles h3 { font-size: 1rem; margin-bottom: 8px; }
.ww-go-role { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; margin-bottom: 4px; font-size: 0.85rem; background: rgba(255,255,255,0.02); }
.ww-go-role.dead { opacity: 0.5; }
.ww-go-role.wolves { border-left: 3px solid #FF5252; }
.ww-go-role.village { border-left: 3px solid #69F0AE; }
.ww-go-role-icon { font-size: 1.2rem; min-width: 24px; }
.ww-go-role-name { font-weight: 600; flex: 1; }
.ww-go-role-title { font-size: 0.8rem; color: var(--text-muted); }
.ww-go-role-status { font-size: 0.75rem; }

/* Werewolf Waiting Screen */
.ww-waiting-screen { text-align: center; padding: 30px; }
.ww-wait-icon { font-size: 3rem; margin-bottom: 12px; animation: float 3s ease-in-out infinite; }

/* Cupid target selection */
.ww-target-btn.cupid-select.selected { border-color: #E040FB; background: rgba(224,64,251,0.12); }
.ww-confirm-btn { padding: 12px 24px; border-radius: 50px; border: none; background: linear-gradient(135deg, #E040FB, #9C27B0); color: #fff; font-weight: 700; cursor: pointer; transition: all 0.2s; margin-top: 12px; }
.ww-confirm-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ww-confirm-btn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 0 15px rgba(224,64,251,0.3); }

/* ═══════════════════════════════════════════════════════════════
   FEATURED GAME CARD + HUD ICON BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.game-card.featured { grid-column: 1 / -1; border: 1px solid rgba(255,138,101,0.35); background: linear-gradient(135deg,rgba(255,138,101,0.08),rgba(255,107,157,0.05)); position: relative; overflow: visible; }
.game-card.featured::before { content:''; position:absolute; inset:-1px; border-radius: var(--radius-md); background: linear-gradient(135deg,rgba(255,138,101,0.25),rgba(255,107,157,0.15),transparent); z-index:0; pointer-events:none; }
.game-card-featured-badge { position:absolute; top:-10px; left:16px; background: linear-gradient(135deg,#FF8A65,#FF6B9D); color:#fff; padding:3px 12px; border-radius:20px; font-size:0.72rem; font-weight:700; display:flex; align-items:center; gap:4px; z-index:2; box-shadow:0 2px 12px rgba(255,138,101,0.4); letter-spacing:0.03em; animation:featuredPulse 3s ease-in-out infinite; }
@keyframes featuredPulse { 0%,100%{box-shadow:0 2px 12px rgba(255,138,101,0.4)} 50%{box-shadow:0 2px 20px rgba(255,138,101,0.7)} }
.hud-icon-btn { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0!important; border-radius:10px; }
.hud-icon-btn svg { flex-shrink:0; }

/* ═══════════════════════════════════════════════════════════════
   SONG GUESSER v7.0 — Ultra Edition
   Modern Glassmorphism · Smooth Animations · Mobile First
   ═══════════════════════════════════════════════════════════════ */

/* ── Global Animations ── */
@keyframes sg3-fadeIn { from{opacity:0} to{opacity:1} }
@keyframes sg3-slideUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes sg3-popIn { from{opacity:0;transform:scale(0.8)} to{opacity:1;transform:scale(1)} }
@keyframes sg3-glow { 0%,100%{box-shadow:0 0 8px rgba(255,138,101,0.2)} 50%{box-shadow:0 0 20px rgba(255,138,101,0.4)} }
@keyframes sg3-shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
@keyframes sg3-floatUp { 0%{opacity:1;transform:translateY(0) scale(1)} 100%{opacity:0;transform:translateY(-50px) scale(1.3)} }
@keyframes sg3-particleBurst { 0%{opacity:1;transform:translate(0,0) scale(1)} 100%{opacity:0;transform:translate(calc(cos(var(--angle))*var(--dist)),calc(sin(var(--angle))*var(--dist))) scale(0)} }
@keyframes vinylSpin { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes streakPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
@keyframes playPulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,138,101,0.35)} 50%{box-shadow:0 0 0 10px rgba(255,138,101,0)} }
@keyframes timerUrgent { 0%,100%{transform:scale(1)} 50%{transform:scale(1.18)} }
@keyframes timerShake { 0%,100%{transform:translateX(0)} 15%{transform:translateX(-2px) rotate(-1deg)} 30%{transform:translateX(2px) rotate(1deg)} 45%{transform:translateX(-1px)} 60%{transform:translateX(1px)} }
@keyframes coverReveal { from{transform:scale(0.5) rotate(-12deg);opacity:0} to{transform:scale(1) rotate(0);opacity:1} }
@keyframes crownBounce { 0%{transform:translateY(-40px) scale(0) rotate(-15deg);opacity:0} 60%{transform:translateY(5px) scale(1.1) rotate(3deg);opacity:1} 100%{transform:translateY(0) scale(1) rotate(0)} }
@keyframes podiumRise { from{transform:translateY(50px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes countdownPop { 0%{transform:scale(1)} 50%{transform:scale(1.4)} 100%{transform:scale(1)} }
@keyframes pulseOnce { 0%{transform:scale(1)} 50%{transform:scale(1.08)} 100%{transform:scale(1)} }
@keyframes fbSlide { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }

.sg3-fade-in { animation:sg3-fadeIn 0.35s ease-out both; }
.sg3-slide-up { animation:sg3-slideUp 0.4s cubic-bezier(0.22,1,0.36,1) both; }
.sg3-pop-in { animation:sg3-popIn 0.35s cubic-bezier(0.22,1,0.36,1) both; }
.sg3-hover-glow { transition:all 0.25s cubic-bezier(0.22,1,0.36,1); }
.sg3-hover-glow:hover:not(:disabled) { box-shadow:0 0 16px rgba(255,138,101,0.2); transform:translateY(-2px); }
.sg3-hover-glow:active:not(:disabled) { transform:translateY(0) scale(0.97); }
.sg3-pulse-hint { animation:sg3-glow 1.5s ease-in-out infinite; }
.sg3-pulse-once { animation:pulseOnce 0.4s ease-out; }
.sg3-countdown-pop { animation:countdownPop 0.35s ease-out; }
.sg3-shake { animation:timerShake 0.4s ease-in-out; }

/* Floating Points */
.sg3-float-pts { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); font-size:1.4rem; font-weight:900; pointer-events:none; z-index:20; text-shadow:0 0 12px currentColor; opacity:0; }
.sg3-float-pts.go { animation:sg3-floatUp 1.1s ease-out forwards; }

/* Particles */
.sg3-particle { position:absolute; left:50%; top:50%; width:6px; height:6px; border-radius:50%; pointer-events:none; z-index:20; animation:sg3-particleBurst 0.7s ease-out forwards; }

/* ── Core Layout ── */
.sg3 {
  position:absolute; inset:0;
  display:flex; justify-content:center;
  overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
}
.sg3-inner {
  width:100%; max-width:600px;
  padding:16px 14px 32px;
  display:flex; flex-direction:column;
  align-items:center;
  margin:0 auto;
  box-sizing:border-box;
}
.sg3-inner > * { width:100%; box-sizing:border-box; }
.sg3::-webkit-scrollbar { width:4px; }
.sg3::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.08); border-radius:4px; }

/* Loading Init */
.sg3-loading-init { text-align:center; padding:60px 20px; }
.sg3-loading-init .sg3-logo { font-size:3rem; animation:vinylSpin 3s linear infinite; margin-bottom:10px; }
.sg3-loading-init .sg3-logo .sg3-icon { width:3rem; height:3rem; color:#FF8A65; filter:drop-shadow(0 0 12px rgba(255,138,101,0.3)); }
.sg3-loading-init p { color:var(--text-muted); font-size:0.9rem; }

/* SVG Icon Base */
.sg3-icon { display:inline-flex; align-items:center; justify-content:center; width:1em; height:1em; vertical-align:middle; flex-shrink:0; }
.sg3-icon svg { width:100%; height:100%; }

/* ── Setup Screen ── */
.sg3-setup { display:flex; flex-direction:column; gap:14px; }
.sg3-setup-header { text-align:center; padding:16px 0 4px; }
.sg3-setup-icon { font-size:3rem; margin-bottom:8px; filter:drop-shadow(0 0 18px rgba(255,138,101,0.35)); }
.sg3-setup-icon .sg3-icon { width:3rem; height:3rem; color:#FF8A65; }
.sg3-setup-title { font-family:var(--font-display); font-size:1.7rem; font-weight:800; background:linear-gradient(135deg,#FF8A65 0%,#FF6B9D 50%,#BB86FC 100%); background-size:200% auto; -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; animation:sg3-shimmer 4s linear infinite; }
.sg3-setup-sub { font-size:0.82rem; color:var(--text-muted); margin-top:3px; letter-spacing:0.02em; }

/* Action Bar */
.sg3-action-bar { display:flex; gap:8px; }
.sg3-action-btn { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:11px 12px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); backdrop-filter:blur(8px); color:var(--text-secondary); font:inherit; font-size:0.82rem; font-weight:600; cursor:pointer; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); }
.sg3-action-btn:hover { background:var(--bg-card-hover); border-color:rgba(255,138,101,0.3); color:var(--text-primary); }
.sg3-action-btn .sg3-icon { font-size:1.15rem; color:#FF8A65; transition:transform 0.25s; }
.sg3-action-btn:hover .sg3-icon { transform:scale(1.15); }

/* Leaderboard Preview */
.sg3-lb-preview { background:var(--bg-card); backdrop-filter:blur(8px); border:1px solid var(--glass-border); border-radius:var(--radius-md); padding:12px; }
.sg3-lb-preview-title { display:flex; align-items:center; gap:6px; font-size:0.85rem; font-weight:700; margin-bottom:8px; color:var(--neon-orange); }
.sg3-lb-preview-title .sg3-icon { font-size:1rem; }
.sg3-lb-preview-row { display:flex; align-items:center; gap:8px; padding:5px 0; font-size:0.82rem; transition:background 0.15s; border-radius:4px; }
.sg3-lb-preview-row:hover { background:rgba(255,255,255,0.02); }
.sg3-lb-preview-rank { width:28px; text-align:center; font-weight:700; }
.sg3-lb-preview-rank .sg3-icon { font-size:1rem; color:#FFD700; filter:drop-shadow(0 0 4px rgba(255,215,0,0.3)); }
.sg3-lb-preview-name { flex:1; font-weight:600; }
.sg3-lb-preview-score { font-weight:700; color:var(--neon-orange); min-width:48px; text-align:right; }
.sg3-lb-preview-stat { font-size:0.75rem; color:var(--text-muted); min-width:35px; text-align:right; }

/* Round Select */
.sg3-round-select { display:flex; flex-direction:column; gap:6px; }
.sg3-section-label { font-size:0.8rem; font-weight:600; color:var(--text-muted); display:flex; align-items:center; gap:5px; }
.sg3-section-label .sg3-icon { font-size:0.9rem; }
.sg3-round-options { display:flex; gap:6px; flex-wrap:wrap; }
.sg3-round-btn { padding:7px 14px; border:1px solid var(--glass-border); border-radius:var(--radius-full); background:var(--bg-card); color:var(--text-secondary); font:inherit; font-size:0.82rem; font-weight:600; cursor:pointer; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); }
.sg3-round-btn:hover:not(:disabled):not(.selected) { background:var(--bg-card-hover); border-color:rgba(255,138,101,0.25); }
.sg3-round-btn.selected { background:linear-gradient(135deg,#FF8A65,#FF6B9D); border-color:transparent; color:#fff; box-shadow:0 0 16px rgba(255,138,101,0.35); }
.sg3-round-btn:disabled { opacity:0.4; cursor:not-allowed; }

/* Artist Search */
.sg3-artist-search { display:flex; flex-direction:column; gap:6px; }
.sg3-search-wrap { position:relative; z-index:100; }
.sg3-search-input { width:100%; padding:10px 14px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); backdrop-filter:blur(8px); color:var(--text-primary); font:inherit; font-size:0.88rem; outline:none; transition:all 0.25s; position:relative; z-index:101; }
.sg3-search-input:focus { border-color:var(--neon-orange); box-shadow:0 0 12px rgba(255,138,101,0.15); }
.sg3-search-input:disabled { opacity:0.4; }
.sg3-search-results { position:absolute; top:100%; left:0; right:0; z-index:102; max-height:240px; overflow-y:auto; background:#1a1a35; border:1px solid rgba(255,138,101,0.35); border-top:2px solid rgba(255,138,101,0.4); border-radius:0 0 var(--radius-md) var(--radius-md); display:flex; flex-direction:column; box-shadow:0 16px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06) inset; }
.sg3-ar-item { display:flex; align-items:center; gap:8px; padding:10px 14px; border:none; background:#1e1e38; color:var(--text-primary); font:inherit; font-size:0.85rem; cursor:pointer; text-align:left; transition:all 0.15s; border-bottom:1px solid rgba(255,255,255,0.06); }
.sg3-ar-item:hover { background:#2a2850; padding-left:18px; color:#fff; }
.sg3-ar-item:last-child { border-bottom:none; }
.sg3-ar-item .sg3-icon { font-size:0.9rem; color:var(--neon-orange); }
.sg3-ar-count { margin-left:auto; font-size:0.75rem; color:var(--text-muted); }
.sg3-ar-empty { padding:14px; text-align:center; font-size:0.82rem; color:var(--text-muted); }

/* Category All */
.sg3-cat-all-wrap { display:flex; }
.sg3-cat-btn.all { width:100%; display:flex; align-items:center; gap:10px; padding:14px 16px; border:1px solid rgba(255,138,101,0.3); border-radius:var(--radius-md); background:linear-gradient(135deg,rgba(255,138,101,0.08),rgba(255,107,157,0.05)); backdrop-filter:blur(8px); color:var(--text-primary); font:inherit; font-size:0.9rem; font-weight:700; cursor:pointer; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); }
.sg3-cat-btn.all:hover { background:linear-gradient(135deg,rgba(255,138,101,0.18),rgba(255,107,157,0.12)); border-color:rgba(255,138,101,0.5); box-shadow:0 4px 20px rgba(255,138,101,0.15); }
.sg3-cat-btn.all .sg3-cat-icon-svg { font-size:1.5rem; color:#FF8A65; }
.sg3-cat-btn.all .sg3-cat-count { margin-left:auto; font-size:0.75rem; color:var(--text-muted); }

/* Category Groups */
.sg3-cat-group { display:flex; flex-direction:column; gap:6px; }
.sg3-cat-group-label { font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-muted); padding-left:2px; }
.sg3-cat-group-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(100px, 1fr)); gap:6px; }
.sg3-cat-btn { display:flex; flex-direction:column; align-items:center; gap:4px; padding:12px 6px 10px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); backdrop-filter:blur(6px); color:var(--text-secondary); font:inherit; cursor:pointer; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); text-align:center; position:relative; overflow:hidden; }
.sg3-cat-btn::before { content:''; position:absolute; inset:0; background:linear-gradient(135deg,rgba(255,138,101,0.06),transparent); opacity:0; transition:opacity 0.3s; }
.sg3-cat-btn:hover::before { opacity:1; }
.sg3-cat-btn:hover { border-color:var(--glass-border-hover); transform:translateY(-2px); box-shadow:0 6px 16px rgba(0,0,0,0.15); }
.sg3-cat-btn.selected { border-color:var(--neon-orange); background:rgba(255,138,101,0.1); color:var(--text-primary); box-shadow:0 0 16px rgba(255,138,101,0.2); }
.sg3-cat-btn:disabled { opacity:0.4; cursor:not-allowed; transform:none; box-shadow:none; }
.sg3-cat-icon-svg { font-size:1.3rem; color:#FF8A65; transition:transform 0.3s; }
.sg3-cat-btn:hover .sg3-cat-icon-svg { transform:scale(1.15); }
.sg3-cat-name { font-size:0.75rem; font-weight:600; line-height:1.2; }
.sg3-cat-count { font-size:0.65rem; color:var(--text-muted); }

/* ── Loading ── */
.sg3-loading { text-align:center; padding:60px 20px; }
.sg3-load-vinyl { font-size:3.5rem; animation:vinylSpin 2s linear infinite; filter:drop-shadow(0 0 16px rgba(255,138,101,0.3)); }
.sg3-load-vinyl .sg3-icon { width:3.5rem; height:3.5rem; color:#FF8A65; }
.sg3-load-bar-wrap { width:80%; max-width:250px; height:4px; border-radius:4px; background:rgba(255,255,255,0.06); margin:16px auto 0; overflow:hidden; }
.sg3-load-bar { height:100%; border-radius:4px; background:linear-gradient(90deg,#FF8A65,#FF6B9D,#BB86FC); background-size:200% 100%; animation:sg3-shimmer 2s linear infinite; transition:width 0.3s; }
.sg3-load-status { font-size:0.8rem; color:var(--text-muted); margin-top:8px; }
.sg3-error { text-align:center; padding:40px; }
.sg3-error .sg3-icon { font-size:2rem; color:#FF5252; filter:drop-shadow(0 0 8px rgba(255,82,82,0.3)); }

/* Game Start Splash */
.sg3-start-splash { text-align:center; padding:60px 20px; }
.sg3-start-icon { font-size:3.5rem; margin-bottom:14px; filter:drop-shadow(0 0 20px rgba(255,138,101,0.4)); }
.sg3-start-icon .sg3-icon { width:3.5rem; height:3.5rem; color:#FF8A65; }
.sg3-start-title { font-family:var(--font-display); font-size:1.3rem; font-weight:800; margin-bottom:6px; }
.sg3-start-meta { font-size:0.82rem; color:var(--text-muted); margin-bottom:20px; }
.sg3-start-countdown { font-size:3rem; font-weight:900; font-family:var(--font-display); background:linear-gradient(135deg,#FF8A65,#FF6B9D); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; text-shadow:none; }

/* ── Game Round ── */
.sg3-game { display:flex; flex-direction:column; gap:10px; width:100%; }
.sg3-topbar { display:flex; align-items:center; gap:8px; padding:6px 0; }
.sg3-round-pill { font-size:0.78rem; font-weight:700; padding:5px 12px; border-radius:var(--radius-full); background:var(--bg-card); border:1px solid var(--glass-border); backdrop-filter:blur(8px); }
.sg3-streak-badge { display:inline-flex; align-items:center; gap:3px; font-size:0.78rem; font-weight:700; padding:5px 10px; border-radius:var(--radius-full); background:linear-gradient(135deg,#FF6B9D,#FF8A65); color:#fff; animation:streakPulse 1.5s ease-in-out infinite; box-shadow:0 2px 12px rgba(255,107,157,0.3); }
.sg3-streak-badge .sg3-icon { font-size:0.85rem; }

/* Timer Ring */
.sg3-timer-ring { width:42px; height:42px; position:relative; margin-left:auto; transition:filter 0.3s; }
.sg3-timer-ring.sg3-shake { animation:timerShake 0.4s ease-in-out; }
.sg3-timer-svg { width:100%; height:100%; transform:rotate(-90deg); }
.sg3-timer-bg { fill:none; stroke:rgba(255,255,255,0.06); stroke-width:3; }
.sg3-timer-fg { fill:none; stroke:#69F0AE; stroke-width:3; stroke-linecap:round; transition:stroke-dashoffset 0.5s linear, stroke 0.3s; filter:drop-shadow(0 0 4px currentColor); }
.sg3-timer-num { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:0.78rem; font-weight:700; font-family:var(--font-mono); transition:color 0.3s; }
.sg3-timer-num.urgent { color:#FFE66D; animation:timerUrgent 0.5s ease-in-out infinite; }
.sg3-timer-num.critical { color:#FF5252; animation:timerUrgent 0.35s ease-in-out infinite; font-size:0.85rem; }

.sg3-points-pill { display:flex; align-items:center; gap:3px; font-size:0.78rem; font-weight:700; padding:5px 10px; border-radius:var(--radius-full); background:linear-gradient(135deg,rgba(255,230,109,0.12),rgba(255,138,101,0.12)); color:var(--neon-yellow); border:1px solid rgba(255,230,109,0.2); backdrop-filter:blur(6px); transition:all 0.3s; }
.sg3-points-pill .sg3-icon { font-size:0.85rem; }

/* Waveform / Visualizer */
.sg3-viz-area { display:flex; flex-direction:column; gap:8px; padding:10px; background:var(--bg-card); backdrop-filter:blur(8px); border:1px solid var(--glass-border); border-radius:var(--radius-md); position:relative; overflow:hidden; }
.sg3-viz-area::before { content:''; position:absolute; inset:0; background:radial-gradient(ellipse at center bottom,rgba(255,138,101,0.04),transparent 70%); pointer-events:none; }
.sg3-waveform { width:100%; height:110px; display:block; border-radius:8px; position:relative; z-index:1; }
.sg3-reveal-track { position:relative; padding:14px 20px 6px; z-index:1; }
.sg3-reveal-dots-row { display:flex; align-items:center; position:relative; height:20px; }
.sg3-reveal-bar-bg { position:absolute; top:50%; left:0; right:0; height:3px; background:rgba(255,255,255,0.07); border-radius:3px; transform:translateY(-50%); }
.sg3-reveal-bar-fill { position:absolute; top:50%; left:0; height:3px; background:linear-gradient(90deg,#FF8A65,#FF6B9D,#c471ed); border-radius:3px; transform:translateY(-50%); transition:width 0.5s cubic-bezier(0.22,1,0.36,1); box-shadow:0 0 10px rgba(255,138,101,0.35); }
.sg3-reveal-dot-wrap { flex:1; display:flex; justify-content:center; position:relative; z-index:2; }
.sg3-step-dot { width:14px; height:14px; border-radius:50%; background:rgba(255,255,255,0.06); border:2px solid rgba(255,255,255,0.1); transition:all 0.4s cubic-bezier(0.22,1,0.36,1); }
.sg3-reveal-dot-wrap.active .sg3-step-dot { background:#FF8A65; border-color:#FF8A65; box-shadow:0 0 14px rgba(255,138,101,0.6),0 0 4px rgba(255,138,101,0.4); transform:scale(1.2); }
.sg3-reveal-dot-wrap.done .sg3-step-dot { background:rgba(255,138,101,0.5); border-color:rgba(255,138,101,0.5); }
.sg3-reveal-labels-row { display:flex; align-items:center; margin-top:6px; }
.sg3-reveal-label-wrap { flex:1; text-align:center; }
.sg3-step-label { font-size:0.68rem; font-weight:700; color:rgba(255,255,255,0.2); transition:color 0.35s; display:block; }
.sg3-step-pts { font-size:0.58rem; font-weight:600; color:rgba(255,255,255,0.12); transition:color 0.35s; display:block; }
.sg3-reveal-dot-wrap.active ~ .sg3-reveal-label-wrap .sg3-step-label,
.sg3-reveal-label-wrap.active .sg3-step-label { color:#FF8A65; text-shadow:0 0 8px rgba(255,138,101,0.25); }
.sg3-reveal-label-wrap.active .sg3-step-pts { color:rgba(255,138,101,0.6); }
.sg3-reveal-label-wrap.done .sg3-step-label { color:rgba(255,138,101,0.4); }
.sg3-reveal-label-wrap.done .sg3-step-pts { color:rgba(255,138,101,0.25); }

/* Controls */
.sg3-ctrls { display:flex; gap:8px; }
.sg3-ctrl-btn { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:12px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); backdrop-filter:blur(8px); color:var(--text-primary); font:inherit; font-size:0.88rem; font-weight:600; cursor:pointer; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); }
.sg3-ctrl-btn.play { background:linear-gradient(135deg,#FF8A65,#FF6B9D); border-color:transparent; color:#fff; box-shadow:0 4px 16px rgba(255,138,101,0.25); }
.sg3-ctrl-btn.play:hover { box-shadow:0 6px 24px rgba(255,138,101,0.35); transform:translateY(-1px); }
.sg3-ctrl-btn.play.playing { background:linear-gradient(135deg,#FF6B9D,#BB86FC); animation:playPulse 1.5s ease-in-out infinite; }
.sg3-ctrl-btn.more:disabled { opacity:0.3; cursor:not-allowed; }
.sg3-ctrl-btn.more:not(:disabled):hover { background:var(--bg-card-hover); border-color:rgba(255,138,101,0.3); }
.sg3-ctrl-btn .sg3-icon { font-size:1rem; }

/* Answer Options */
.sg3-source-hint { display:flex; align-items:center; justify-content:center; gap:6px; padding:8px 16px; background:linear-gradient(135deg,rgba(187,134,252,0.15),rgba(255,138,101,0.15)); border:1px solid rgba(187,134,252,0.3); border-radius:20px; font-size:0.88rem; font-weight:700; color:#BB86FC; margin-bottom:4px; }
.sg3-source-hint .sg3-icon { font-size:1rem; }
.sg3-opt.source-mode .sg3-opt-cover-ph .sg3-icon { color:#BB86FC; }
.sg3-options { display:flex; flex-direction:column; gap:6px; }
.sg3-opt { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); backdrop-filter:blur(6px); color:var(--text-primary); font:inherit; cursor:pointer; text-align:left; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); position:relative; overflow:hidden; }
.sg3-opt::after { content:''; position:absolute; inset:0; background:linear-gradient(135deg,transparent 60%,rgba(255,138,101,0.04)); opacity:0; transition:opacity 0.3s; pointer-events:none; }
.sg3-opt:hover:not(:disabled):not(.locked)::after { opacity:1; }
.sg3-opt:hover:not(:disabled):not(.locked) { background:var(--bg-card-hover); border-color:rgba(255,138,101,0.25); transform:translateX(4px); box-shadow:0 3px 12px rgba(0,0,0,0.1); }
.sg3-opt.selected { border-color:var(--neon-orange); background:rgba(255,138,101,0.1); box-shadow:0 0 12px rgba(255,138,101,0.15); }
.sg3-opt.locked { opacity:0.45; cursor:default; }
.sg3-opt.correct { border-color:#69F0AE; background:rgba(105,240,174,0.1); box-shadow:0 0 16px rgba(105,240,174,0.15); }
.sg3-opt.wrong { border-color:#FF5252; background:rgba(255,82,82,0.1); }
.sg3-opt-cover { width:44px; height:44px; border-radius:8px; overflow:hidden; flex-shrink:0; background:var(--bg-surface); display:flex; align-items:center; justify-content:center; transition:transform 0.3s; }
.sg3-opt:hover .sg3-opt-cover { transform:scale(1.05); }
.sg3-opt-cover img { width:100%; height:100%; object-fit:cover; }
.sg3-opt-cover-ph .sg3-icon { font-size:1.2rem; color:var(--text-muted); }
.sg3-opt-info { flex:1; min-width:0; }
.sg3-opt-title { display:block; font-size:0.85rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg3-opt-artist { display:block; font-size:0.75rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg3-opt-check { display:none; font-size:1.1rem; color:#69F0AE; filter:drop-shadow(0 0 6px rgba(105,240,174,0.4)); }
.sg3-opt.correct .sg3-opt-check { display:flex; animation:sg3-popIn 0.3s ease-out; }

/* Feedback */
.sg3-feedback { min-height:24px; }
.sg3-fb { display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:var(--radius-md); animation:fbSlide 0.35s cubic-bezier(0.22,1,0.36,1); backdrop-filter:blur(8px); }
.sg3-fb.correct { background:rgba(105,240,174,0.1); border:1px solid rgba(105,240,174,0.25); box-shadow:0 0 12px rgba(105,240,174,0.08); }
.sg3-fb.wrong { background:rgba(255,82,82,0.1); border:1px solid rgba(255,82,82,0.25); }
.sg3-fb-icon { font-size:1.2rem; }
.sg3-fb.correct .sg3-fb-icon { color:#69F0AE; filter:drop-shadow(0 0 6px rgba(105,240,174,0.4)); }
.sg3-fb.wrong .sg3-fb-icon { color:#FF5252; }
.sg3-fb-info { flex:1; }
.sg3-fb-main { display:block; font-size:0.85rem; font-weight:700; }
.sg3-fb-detail { display:block; font-size:0.75rem; color:var(--text-muted); }
.sg3-guess-counter { font-size:0.75rem; color:var(--text-muted); text-align:center; margin-top:4px; }

/* Mini Scores */
.sg3-mini-scores { display:flex; flex-wrap:wrap; gap:4px; }
.sg3-ms { display:flex; align-items:center; gap:4px; padding:3px 8px; border-radius:var(--radius-full); background:var(--bg-card); font-size:0.72rem; border:1px solid transparent; backdrop-filter:blur(4px); transition:all 0.2s; }
.sg3-ms.me { border-color:rgba(255,138,101,0.3); background:rgba(255,138,101,0.06); }
.sg3-ms-rank { font-weight:700; min-width:16px; }
.sg3-ms-rank .sg3-icon { font-size:0.7rem; color:#FFD700; }
.sg3-ms-name { max-width:60px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sg3-ms-pts { font-weight:700; color:var(--neon-orange); }

/* ── Round End ── */
.sg3-round-end { display:flex; flex-direction:column; gap:12px; width:100%; align-items:center; }
.sg3-re-reveal { display:flex; flex-direction:column; align-items:center; gap:10px; padding:24px 16px; transition:all 0.5s cubic-bezier(0.22,1,0.36,1); }
.sg3-re-reveal.minimized { opacity:0; height:0; padding:0; overflow:hidden; }
.sg3-re-cover-box { width:150px; height:150px; border-radius:18px; overflow:hidden; position:relative; box-shadow:0 10px 48px rgba(0,0,0,0.4); transition:box-shadow 0.3s; }
.sg3-re-cover-box.correct { box-shadow:0 10px 48px rgba(105,240,174,0.25); }
.sg3-re-cover-box.wrong { box-shadow:0 10px 48px rgba(255,82,82,0.25); }
.sg3-re-cover-glow { position:absolute; inset:-60%; border-radius:50%; opacity:0.18; z-index:0; animation:vinylSpin 6s linear infinite; }
.sg3-re-cover-glow.correct { background:conic-gradient(#69F0AE,transparent,#69F0AE,transparent,#69F0AE); }
.sg3-re-cover-glow.wrong { background:conic-gradient(#FF5252,transparent,#FF5252,transparent,#FF5252); }
.sg3-re-cover-img { width:100%; height:100%; object-fit:cover; position:relative; z-index:1; animation:coverReveal 0.8s cubic-bezier(0.22,1,0.36,1); }
.sg3-re-cover-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:var(--bg-surface); font-size:2.5rem; }
.sg3-re-reveal-title { font-family:var(--font-display); font-size:1.25rem; font-weight:800; text-align:center; }
.sg3-re-reveal-artist { font-size:0.9rem; color:var(--text-muted); text-align:center; }
.sg3-re-verdict { display:flex; align-items:center; gap:8px; padding:8px 18px; border-radius:var(--radius-full); font-size:0.9rem; font-weight:700; backdrop-filter:blur(8px); }
.sg3-re-verdict.correct { background:rgba(105,240,174,0.12); color:#69F0AE; box-shadow:0 0 16px rgba(105,240,174,0.1); }
.sg3-re-verdict.wrong { background:rgba(255,82,82,0.12); color:#FF5252; }
.sg3-re-verdict .sg3-icon { font-size:1.1rem; }

.sg3-re-scores-wrap { display:flex; flex-direction:column; gap:10px; animation:fbSlide 0.4s cubic-bezier(0.22,1,0.36,1); width:100%; }
.sg3-re-answer-mini { display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--bg-card); backdrop-filter:blur(8px); border-radius:var(--radius-md); border:1px solid var(--glass-border); }
.sg3-re-album,.sg3-re-album-ph { width:40px; height:40px; border-radius:8px; flex-shrink:0; }
.sg3-re-album { object-fit:cover; }
.sg3-re-album-ph { background:var(--bg-surface); display:flex; align-items:center; justify-content:center; }
.sg3-re-title { font-size:0.85rem; font-weight:700; }
.sg3-re-artist { font-size:0.75rem; color:var(--text-muted); }
.sg3-re-progress { text-align:center; font-size:0.78rem; color:var(--text-muted); font-weight:600; }
.sg3-re-results { display:flex; flex-direction:column; gap:3px; }
.sg3-re-row { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--radius-sm); font-size:0.82rem; background:var(--bg-card); animation:fbSlide 0.35s cubic-bezier(0.22,1,0.36,1) both; backdrop-filter:blur(4px); transition:all 0.2s; }
.sg3-re-row:hover { background:var(--bg-card-hover); }
.sg3-re-row.correct { border-left:3px solid #69F0AE; }
.sg3-re-row.timeout { border-left:3px solid #FFE66D; opacity:0.7; }
.sg3-re-row.wrong { border-left:3px solid #FF5252; opacity:0.6; }
.sg3-re-row.me { background:rgba(255,138,101,0.06); border-right:2px solid var(--neon-orange); }
.sg3-re-pos { font-weight:700; min-width:24px; color:var(--neon-orange); }
.sg3-re-name { flex:1; font-weight:600; }
.sg3-re-streak { font-size:0.7rem; color:var(--neon-orange); }
.sg3-re-streak .sg3-icon { font-size:0.65rem; }
.sg3-re-time { font-size:0.75rem; color:var(--text-muted); font-family:var(--font-mono); }
.sg3-re-pts { font-weight:700; color:#69F0AE; min-width:32px; text-align:right; }
.sg3-re-row.wrong .sg3-re-pts { color:#FF5252; }
.sg3-re-row.timeout .sg3-re-pts { color:#FFE66D; }
.sg3-re-scores { display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.sg3-re-score { display:flex; align-items:center; gap:8px; padding:6px 12px; border-radius:var(--radius-sm); background:var(--bg-card); font-size:0.82rem; transition:background 0.15s; }
.sg3-re-score:hover { background:var(--bg-card-hover); }
.sg3-re-score.me { background:rgba(255,138,101,0.06); }
.sg3-re-rank { font-weight:700; min-width:20px; }
.sg3-re-rank .sg3-icon { font-size:0.85rem; color:#FFD700; }
.sg3-re-sname { flex:1; font-weight:600; }
.sg3-re-spts { font-weight:700; color:var(--neon-orange); }

/* ── Game Over ── */
.sg3-gameover { display:flex; flex-direction:column; gap:16px; padding-bottom:24px; width:100%; align-items:center; text-align:center; }
.sg3-go-spotlight { text-align:center; padding:28px 16px 18px; background:linear-gradient(180deg,rgba(255,138,101,0.1),rgba(187,134,252,0.03),transparent); border-radius:var(--radius-lg); width:100%; position:relative; overflow:hidden; }
.sg3-go-spotlight::before { content:''; position:absolute; top:-50%; left:50%; transform:translateX(-50%); width:200px; height:200px; border-radius:50%; background:radial-gradient(rgba(255,215,0,0.08),transparent 70%); pointer-events:none; }
.sg3-go-crown { font-size:2.8rem; animation:crownBounce 1s cubic-bezier(0.22,1,0.36,1); position:relative; z-index:1; }
.sg3-go-crown .sg3-icon { width:2.8rem; height:2.8rem; color:#FFD700; filter:drop-shadow(0 0 16px rgba(255,215,0,0.5)); }
.sg3-go-winner-name { font-family:var(--font-display); font-size:1.6rem; font-weight:800; background:linear-gradient(135deg,#FFD700 0%,#FF8A65 50%,#FF6B9D 100%); background-size:200% auto; -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; animation:sg3-shimmer 3s linear infinite; }
.sg3-go-winner-score { font-size:1.15rem; font-weight:700; color:var(--neon-orange); }
.sg3-go-meta { font-size:0.78rem; color:var(--text-muted); margin-top:4px; }

.sg3-go-leaderboard { display:flex; flex-direction:column; gap:10px; width:100%; }
.sg3-go-lb-title { display:flex; align-items:center; gap:6px; font-size:1rem; font-weight:700; }
.sg3-go-lb-title .sg3-icon { font-size:1.1rem; color:#FFD700; }

/* Podium */
.sg3-go-podium { display:flex; justify-content:center; align-items:flex-end; gap:8px; padding:16px 0; }
.sg3-podium-col { display:flex; flex-direction:column; align-items:center; width:calc(33% - 8px); animation:podiumRise 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.sg3-podium-info { text-align:center; margin-bottom:8px; }
.sg3-podium-info.me { background:rgba(255,138,101,0.06); border-radius:var(--radius-sm); padding:4px 6px; border:1px solid rgba(255,138,101,0.15); }
.sg3-podium-medal { font-size:1.3rem; }
.sg3-podium-medal .sg3-icon { width:1.3rem; height:1.3rem; color:#FFD700; filter:drop-shadow(0 0 6px rgba(255,215,0,0.35)); }
.sg3-podium-name { display:block; font-size:0.78rem; font-weight:700; max-width:80px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sg3-podium-score { display:block; font-size:0.85rem; font-weight:800; color:var(--neon-orange); }
.sg3-podium-stat { display:block; font-size:0.65rem; color:var(--text-muted); }
.sg3-podium-bar { width:100%; border-radius:var(--radius-sm) var(--radius-sm) 0 0; display:flex; align-items:flex-end; justify-content:center; padding-bottom:6px; transition:height 0.6s cubic-bezier(0.22,1,0.36,1); }
.sg3-podium-col:nth-child(1) .sg3-podium-bar { background:linear-gradient(180deg,rgba(192,192,192,0.18),rgba(192,192,192,0.04)); }
.sg3-podium-col:nth-child(2) .sg3-podium-bar { background:linear-gradient(180deg,rgba(255,215,0,0.22),rgba(255,215,0,0.04)); }
.sg3-podium-col:nth-child(3) .sg3-podium-bar { background:linear-gradient(180deg,rgba(205,127,50,0.18),rgba(205,127,50,0.04)); }
.sg3-podium-rank { font-size:1.2rem; font-weight:900; color:var(--text-muted); }

.sg3-go-rankings { display:flex; flex-direction:column; gap:3px; width:100%; text-align:left; }
.sg3-go-rank-row { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--radius-sm); background:var(--bg-card); font-size:0.82rem; animation:fbSlide 0.35s cubic-bezier(0.22,1,0.36,1) both; transition:all 0.2s; backdrop-filter:blur(4px); }
.sg3-go-rank-row:hover { background:var(--bg-card-hover); }
.sg3-go-rank-row.me { background:rgba(255,138,101,0.06); border:1px solid rgba(255,138,101,0.2); }
.sg3-go-rank-num { font-weight:800; min-width:20px; color:var(--text-muted); }
.sg3-go-rank-name { font-weight:600; min-width:60px; }
.sg3-go-rank-stats { flex:1; display:flex; gap:8px; flex-wrap:wrap; }
.sg3-go-stat { display:flex; align-items:center; gap:2px; font-size:0.72rem; color:var(--text-muted); }
.sg3-go-stat .sg3-icon { font-size:0.7rem; }
.sg3-go-rank-score { font-weight:800; color:var(--neon-orange); }

/* Stats Grid */
.sg3-go-stats-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:8px; width:100%; text-align:left; }
.sg3-go-stat-card { background:var(--bg-card); backdrop-filter:blur(8px); border:1px solid var(--glass-border); border-radius:var(--radius-md); padding:12px; transition:all 0.2s; }
.sg3-go-stat-card:hover { border-color:var(--glass-border-hover); }
.sg3-go-stat-card.me { border-color:rgba(255,138,101,0.3); background:rgba(255,138,101,0.03); }
.sg3-go-sc-name { font-size:0.82rem; font-weight:700; margin-bottom:8px; }
.sg3-go-sc-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.sg3-go-sc-item { text-align:center; }
.sg3-go-sc-val { display:block; font-size:0.9rem; font-weight:700; }
.sg3-go-sc-val .sg3-icon { font-size:0.8rem; color:var(--neon-orange); }
.sg3-go-sc-label { display:block; font-size:0.65rem; color:var(--text-muted); }

/* Song History & All-Time */
.sg3-go-history,.sg3-go-alltime { border:1px solid var(--glass-border); border-radius:var(--radius-md); overflow:hidden; width:100%; text-align:left; backdrop-filter:blur(4px); }
.sg3-go-history-toggle,.sg3-go-alltime-toggle { width:100%; display:flex; align-items:center; gap:8px; padding:12px 14px; border:none; background:var(--bg-card); color:var(--text-primary); font:inherit; font-size:0.85rem; font-weight:600; cursor:pointer; transition:all 0.2s; }
.sg3-go-history-toggle:hover,.sg3-go-alltime-toggle:hover { background:var(--bg-card-hover); }
.sg3-go-ht-icon,.sg3-go-at-icon { font-size:1rem; color:#FF8A65; }
.sg3-go-ht-text,.sg3-go-at-text { flex:1; text-align:left; }
.sg3-go-ht-arrow,.sg3-go-at-arrow { font-size:0.9rem; transition:transform 0.3s; }

.sg3-go-history-list,.sg3-go-alltime-list { display:flex; flex-direction:column; gap:0; }
.sg3-go-song-row { display:flex; align-items:center; gap:10px; padding:8px 14px; border-top:1px solid rgba(255,255,255,0.03); transition:all 0.2s; }
.sg3-go-song-row:hover { background:var(--bg-card); padding-left:18px; }
.sg3-go-song-cover { width:36px; height:36px; border-radius:6px; overflow:hidden; flex-shrink:0; background:var(--bg-surface); display:flex; align-items:center; justify-content:center; transition:transform 0.2s; }
.sg3-go-song-row:hover .sg3-go-song-cover { transform:scale(1.05); }
.sg3-go-song-cover img { width:100%; height:100%; object-fit:cover; }
.sg3-go-song-cover .sg3-icon { font-size:1rem; color:var(--text-muted); }
.sg3-go-song-info { flex:1; min-width:0; }
.sg3-go-song-num { font-size:0.65rem; color:var(--text-muted); margin-right:4px; }
.sg3-go-song-title { font-size:0.82rem; font-weight:600; }
.sg3-go-song-artist { display:block; font-size:0.72rem; color:var(--text-muted); }
.sg3-go-song-play { width:34px; height:34px; border-radius:50%; border:1px solid var(--glass-border); background:var(--bg-card); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); color:var(--text-secondary); }
.sg3-go-song-play:hover { background:var(--bg-card-hover); border-color:rgba(255,138,101,0.3); transform:scale(1.1); }
.sg3-go-song-play.playing { border-color:var(--neon-orange); color:var(--neon-orange); background:rgba(255,138,101,0.1); box-shadow:0 0 10px rgba(255,138,101,0.2); }
.sg3-go-sp-icon { font-size:0.8rem; display:flex; }
.sg3-go-sp-icon .sg3-icon { width:0.8rem; height:0.8rem; }

/* All-Time Leaderboard in Game Over */
.sg3-go-at-row { display:flex; align-items:center; gap:8px; padding:8px 14px; font-size:0.82rem; border-top:1px solid rgba(255,255,255,0.03); transition:all 0.15s; }
.sg3-go-at-row:hover { background:rgba(255,255,255,0.02); }
.sg3-go-at-row.me { background:rgba(255,138,101,0.06); }
.sg3-go-at-rank { font-weight:700; min-width:22px; }
.sg3-go-at-rank .sg3-icon { font-size:0.85rem; color:#FFD700; }
.sg3-go-at-name { font-weight:600; min-width:60px; }
.sg3-go-at-stats { flex:1; display:flex; gap:8px; flex-wrap:wrap; font-size:0.72rem; color:var(--text-muted); }
.sg3-go-at-stats .sg3-icon { font-size:0.65rem; }
.sg3-go-at-score { font-weight:800; color:var(--neon-orange); }

/* Replay Button */
.sg3-go-replay { width:100%; padding:14px; border:none; border-radius:var(--radius-md); background:linear-gradient(135deg,#FF8A65,#FF6B9D); color:#fff; font:inherit; font-size:1rem; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); box-shadow:0 4px 16px rgba(255,138,101,0.25); position:relative; overflow:hidden; }
.sg3-go-replay::before { content:''; position:absolute; inset:0; background:linear-gradient(135deg,transparent,rgba(255,255,255,0.1),transparent); background-size:200% 100%; animation:sg3-shimmer 3s linear infinite; }
.sg3-go-replay:hover { transform:translateY(-2px); box-shadow:0 8px 28px rgba(255,138,101,0.35); }
.sg3-go-replay:active { transform:translateY(0) scale(0.98); }
.sg3-go-replay .sg3-icon { font-size:1.1rem; }

/* ── Collection View ── */
.sg3-collection { display:flex; flex-direction:column; gap:12px; width:100%; }
.sg3-coll-header { display:flex; flex-direction:column; gap:8px; }
.sg3-coll-header h2 { display:flex; align-items:center; gap:8px; font-size:1.2rem; }
.sg3-coll-header h2 .sg3-icon { font-size:1.3rem; color:#FF8A65; }
.sg3-back-btn { display:flex; align-items:center; gap:4px; padding:6px 12px; border:1px solid var(--glass-border); border-radius:var(--radius-full); background:var(--bg-card); backdrop-filter:blur(8px); color:var(--text-secondary); font:inherit; font-size:0.8rem; font-weight:600; cursor:pointer; align-self:flex-start; transition:all 0.25s; }
.sg3-back-btn:hover { background:var(--bg-card-hover); color:var(--text-primary); transform:translateX(-2px); }
.sg3-back-btn .sg3-icon { font-size:0.9rem; }

.sg3-coll-progress { margin-top:4px; }
.sg3-coll-progress-bar { height:6px; border-radius:6px; background:rgba(255,255,255,0.06); overflow:hidden; }
.sg3-coll-progress-fill { height:100%; border-radius:6px; background:linear-gradient(90deg,#FF8A65,#69F0AE,#BB86FC); background-size:200% 100%; animation:sg3-shimmer 4s linear infinite; transition:width 0.5s; }
.sg3-coll-progress-text { display:block; font-size:0.75rem; color:var(--text-muted); margin-top:4px; }

.sg3-coll-filter-bar { display:flex; gap:6px; flex-wrap:wrap; }
.sg3-coll-fbtn { padding:6px 14px; border:1px solid var(--glass-border); border-radius:20px; background:var(--bg-card); color:var(--text-secondary); font:inherit; font-size:0.8rem; cursor:pointer; transition:all 0.25s; display:flex; align-items:center; gap:4px; }
.sg3-coll-fbtn:hover { background:var(--bg-card-hover); border-color:rgba(255,138,101,0.3); }
.sg3-coll-fbtn.selected { background:rgba(255,138,101,0.15); border-color:var(--neon-orange); color:var(--neon-orange); font-weight:600; }
.sg3-coll-fbtn .sg3-icon { font-size:0.75rem; }
.sg3-coll-loadmore { width:100%; padding:10px; border:1px dashed var(--glass-border); border-radius:var(--radius-md); background:transparent; color:var(--text-muted); font:inherit; font-size:0.85rem; cursor:pointer; transition:all 0.25s; margin-top:4px; }
.sg3-coll-loadmore:hover { border-color:var(--neon-orange); color:var(--neon-orange); background:rgba(255,138,101,0.05); }

.sg3-coll-controls { display:flex; gap:8px; }
.sg3-coll-search { flex:1; padding:8px 12px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); backdrop-filter:blur(8px); color:var(--text-primary); font:inherit; font-size:0.85rem; outline:none; transition:all 0.25s; }
.sg3-coll-search:focus { border-color:var(--neon-orange); box-shadow:0 0 10px rgba(255,138,101,0.12); }
.sg3-coll-sort-btn { width:38px; height:38px; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-card); color:var(--text-secondary); display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.25s; }
.sg3-coll-sort-btn:hover { background:var(--bg-card-hover); transform:rotate(180deg); }
.sg3-coll-sort-btn .sg3-icon { font-size:1rem; }

.sg3-coll-list { display:flex; flex-direction:column; gap:4px; }
.sg3-coll-artist { border:1px solid var(--glass-border); border-radius:var(--radius-md); overflow:hidden; transition:border-color 0.2s; }
.sg3-coll-artist:hover { border-color:var(--glass-border-hover); }
.sg3-coll-artist-header { width:100%; display:flex; align-items:center; gap:8px; padding:10px 12px; border:none; background:var(--bg-card); color:var(--text-primary); font:inherit; cursor:pointer; text-align:left; transition:all 0.2s; }
.sg3-coll-artist-header:hover { background:var(--bg-card-hover); }
.sg3-coll-artist-info { display:flex; align-items:center; gap:6px; flex:1; min-width:0; }
.sg3-coll-artist-info .sg3-icon { font-size:0.9rem; color:var(--neon-orange); flex-shrink:0; }
.sg3-coll-artist-name { font-weight:600; font-size:0.85rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg3-coll-artist-count { font-size:0.72rem; color:var(--text-muted); flex-shrink:0; }
.sg3-coll-artist-bar { width:50px; height:4px; border-radius:4px; background:rgba(255,255,255,0.06); flex-shrink:0; overflow:hidden; }
.sg3-coll-artist-bar div { height:100%; border-radius:4px; background:linear-gradient(90deg,#FF8A65,#69F0AE); transition:width 0.3s; }
.sg3-coll-arrow { font-size:0.9rem; color:var(--text-muted); flex-shrink:0; transition:transform 0.3s; }
.sg3-coll-songs { display:flex; flex-direction:column; gap:0; background:rgba(0,0,0,0.15); }

/* Playlist-style song rows */
.sg3-coll-song { display:flex; align-items:center; gap:10px; padding:6px 12px 6px 14px; font-size:0.82rem; border-top:1px solid rgba(255,255,255,0.04); transition:all 0.2s; }
.sg3-coll-song.guessed:hover { background:rgba(255,138,101,0.06); }
.sg3-coll-song.guessed { color:var(--text-primary); cursor:default; }
.sg3-coll-song.locked { color:var(--text-muted); opacity:0.4; padding-left:14px; }

.sg3-coll-song-art { width:36px; height:36px; border-radius:6px; overflow:hidden; flex-shrink:0; background:rgba(255,255,255,0.04); display:flex; align-items:center; justify-content:center; }
.sg3-coll-song-art img { width:100%; height:100%; object-fit:cover; }
.sg3-coll-song-art .sg3-icon { font-size:0.9rem; color:var(--text-muted); }
.sg3-coll-song.guessed .sg3-coll-song-art .sg3-icon { color:var(--neon-orange); }

.sg3-coll-song-meta { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.sg3-coll-song-title { font-weight:600; font-size:0.82rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg3-coll-song-artist { font-size:0.72rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg3-coll-song-cat { font-size:0.65rem; color:var(--text-muted); flex-shrink:0; padding:2px 6px; background:rgba(255,255,255,0.04); border-radius:8px; }

/* Play button */
.sg3-coll-play-btn { width:32px; height:32px; border-radius:50%; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; transition:all 0.25s cubic-bezier(0.22,1,0.36,1); color:var(--text-secondary); }
.sg3-coll-play-btn:hover { background:rgba(255,138,101,0.12); border-color:rgba(255,138,101,0.3); transform:scale(1.1); color:var(--neon-orange); }
.sg3-coll-play-btn.playing { border-color:var(--neon-orange); color:var(--neon-orange); background:rgba(255,138,101,0.12); box-shadow:0 0 10px rgba(255,138,101,0.2); animation:sg3-coll-pulse 1.5s ease-in-out infinite; }
.sg3-coll-play-btn.loading { pointer-events:none; opacity:0.7; }
.sg3-coll-play-ic { display:flex; align-items:center; justify-content:center; font-size:0.75rem; }
.sg3-coll-play-ic .sg3-icon { width:0.75rem; height:0.75rem; }

.sg3-coll-spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,138,101,0.2); border-top-color:var(--neon-orange); border-radius:50%; animation:sg3-spin 0.6s linear infinite; }

@keyframes sg3-coll-pulse { 0%,100% { box-shadow:0 0 6px rgba(255,138,101,0.15); } 50% { box-shadow:0 0 14px rgba(255,138,101,0.35); } }
@keyframes sg3-spin { to { transform:rotate(360deg); } }

/* Currently playing song row highlight */
.sg3-coll-song.guessed:has(.sg3-coll-play-btn.playing) { background:rgba(255,138,101,0.06); }
.sg3-coll-song.guessed:has(.sg3-coll-play-btn.playing) .sg3-coll-song-title { color:var(--neon-orange); }
.sg3-coll-song.guessed:has(.sg3-coll-play-btn.playing) .sg3-coll-song-art { box-shadow:0 0 8px rgba(255,138,101,0.2); }

/* ── Full Leaderboard View ── */
.sg3-lb-full { display:flex; flex-direction:column; gap:12px; width:100%; }
.sg3-lb-full-header { display:flex; flex-direction:column; gap:8px; }
.sg3-lb-full-header h2 { display:flex; align-items:center; gap:8px; font-size:1.2rem; }
.sg3-lb-full-header h2 .sg3-icon { font-size:1.3rem; color:#FF8A65; }

.sg3-lb-podium { display:flex; justify-content:center; align-items:flex-end; gap:10px; padding:20px 0 10px; }
.sg3-lb-pod-col { display:flex; flex-direction:column; align-items:center; width:calc(33% - 10px); }
.sg3-lb-pod-info { text-align:center; margin-bottom:8px; }
.sg3-lb-pod-medal { font-size:1.5rem; }
.sg3-lb-pod-medal .sg3-icon { width:1.5rem; height:1.5rem; color:#FFD700; filter:drop-shadow(0 0 6px rgba(255,215,0,0.35)); }
.sg3-lb-pod-name { display:block; font-size:0.82rem; font-weight:700; }
.sg3-lb-pod-score { display:block; font-size:1rem; font-weight:800; color:var(--neon-orange); }
.sg3-lb-pod-stat { display:block; font-size:0.65rem; color:var(--text-muted); }
.sg3-lb-pod-bar { width:100%; border-radius:var(--radius-sm) var(--radius-sm) 0 0; display:flex; align-items:flex-end; justify-content:center; padding-bottom:8px; }
.sg3-lb-pod-col:nth-child(1) .sg3-lb-pod-bar { background:linear-gradient(180deg,rgba(192,192,192,0.18),rgba(192,192,192,0.04)); }
.sg3-lb-pod-col:nth-child(2) .sg3-lb-pod-bar { background:linear-gradient(180deg,rgba(255,215,0,0.22),rgba(255,215,0,0.04)); }
.sg3-lb-pod-col:nth-child(3) .sg3-lb-pod-bar { background:linear-gradient(180deg,rgba(205,127,50,0.18),rgba(205,127,50,0.04)); }

.sg3-lb-full-list { display:flex; flex-direction:column; gap:3px; }
.sg3-lb-full-row { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--radius-sm); background:var(--bg-card); font-size:0.82rem; transition:all 0.15s; }
.sg3-lb-full-row:hover { background:var(--bg-card-hover); }
.sg3-lb-full-row.top3 { background:rgba(255,138,101,0.04); }
.sg3-lb-full-rank { font-weight:700; min-width:24px; }
.sg3-lb-full-rank .sg3-icon { font-size:0.85rem; color:#FFD700; }
.sg3-lb-full-name { font-weight:600; min-width:60px; }
.sg3-lb-full-stats { flex:1; display:flex; gap:8px; flex-wrap:wrap; font-size:0.72rem; color:var(--text-muted); }
.sg3-lb-full-stats .sg3-icon { font-size:0.65rem; }
.sg3-lb-full-score { font-weight:800; color:var(--neon-orange); }

/* ── Responsive — Mobile First ── */

/* Small phones */
@media (max-width:380px) {
  .sg3-inner { padding:8px 6px 24px; max-width:100%; }
  .sg3-setup-title { font-size:1.3rem; }
  .sg3-action-bar { flex-direction:column; }
  .sg3-cat-group-grid { grid-template-columns:repeat(3, 1fr); gap:4px; }
  .sg3-cat-btn { padding:10px 4px 8px; }
  .sg3-cat-name { font-size:0.68rem; }
  .sg3-go-stats-grid { grid-template-columns:1fr; }
  .sg3-go-rank-stats { gap:3px; }
  .sg3-go-stat { font-size:0.62rem; }
  .sg3-lb-podium,.sg3-go-podium { gap:4px; padding:10px 0; }
  .sg3-podium-name,.sg3-lb-pod-name { font-size:0.65rem; max-width:55px; }
  .sg3-re-cover-box { width:110px; height:110px; }
  .sg3-opt-cover { width:36px; height:36px; }
  .sg3-ctrl-btn { padding:10px 8px; font-size:0.8rem; }
  .sg3-round-btn { padding:6px 10px; font-size:0.78rem; }
  .sg3-coll-song { padding:5px 8px 5px 10px; gap:8px; }
  .sg3-coll-song-art { width:30px; height:30px; border-radius:4px; }
  .sg3-coll-play-btn { width:28px; height:28px; }
  .sg3-waveform { height:80px; }
}

/* Standard phones */
@media (max-width:480px) {
  .sg3-inner { padding:10px 8px 28px; }
  .sg3-cat-group-grid { grid-template-columns:repeat(3, 1fr); }
  .sg3-go-stats-grid { grid-template-columns:1fr; }
  .sg3-go-rank-stats { gap:4px; }
  .sg3-go-stat { font-size:0.65rem; }
  .sg3-lb-podium,.sg3-go-podium { gap:6px; padding:12px 0; }
  .sg3-podium-name,.sg3-lb-pod-name { font-size:0.7rem; max-width:60px; }
  .sg3-re-cover-box { width:120px; height:120px; }
  .sg3-go-spotlight { padding:18px 12px; }
  .sg3-go-winner-name { font-size:1.25rem; }
  .sg3-go-crown { font-size:2.2rem; }
  .sg3-go-crown .sg3-icon { width:2.2rem; height:2.2rem; }
  .sg3-waveform { height:90px; }
}

/* Tablets */
@media (min-width:481px) and (max-width:768px) {
  .sg3-inner { max-width:560px; }
  .sg3-cat-group-grid { grid-template-columns:repeat(4, 1fr); }
  .sg3-go-stats-grid { grid-template-columns:repeat(2, 1fr); }
}

/* Desktop */
@media (min-width:769px) {
  .sg3-inner { max-width:640px; }
  .sg3-cat-group-grid { grid-template-columns:repeat(5, 1fr); }
  .sg3-go-stats-grid { grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); }
}

/* Touch-friendly tap targets */
@media (pointer:coarse) {
  .sg3-opt { min-height:48px; }
  .sg3-ctrl-btn { min-height:48px; }
  .sg3-action-btn { min-height:44px; }
  .sg3-round-btn { min-height:44px; }
  .sg3-cat-btn { min-height:52px; }
  .sg3-back-btn { min-height:44px; }
  .sg3-coll-sort-btn { min-width:44px; min-height:44px; }
  .sg3-go-song-play { width:44px; height:44px; }
  .sg3-go-history-toggle,.sg3-go-alltime-toggle { min-height:48px; }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce) {
  .sg3-fade-in,.sg3-slide-up,.sg3-pop-in,.sg3-hover-glow,.sg3-pulse-hint,.sg3-float-pts,.sg3-particle { animation:none !important; transition:none !important; }
  .sg3-re-cover-glow { animation:none; }
  .sg3-setup-title,.sg3-go-winner-name,.sg3-load-bar,.sg3-coll-progress-fill,.sg3-go-replay::before { animation:none; }
}
