/* ============================================================
   MUSIKRATEN — DARK CORAL
   Dark navy base, coral-red accent, red buzz button
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --bg:           #0b0b1a;
  --surface:      #111128;
  --surface2:     #191930;
  --surface3:     #242444;
  --accent:       #e94560;
  --accent-hover: #c73652;
  --accent-dim:   rgba(233,69,96,0.10);
  --text:         #f0f0f8;
  --text-sub:     #9898b8;
  --text-muted:   #6060a0;
  --success:      #4ade80;
  --warning:      #f59e0b;
  --danger:       #f87171;
  --border:       rgba(255,255,255,0.07);
  --border-med:   rgba(255,255,255,0.12);
  --radius:       14px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --shadow:       0 1px 8px rgba(0,0,0,0.6);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.85);
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --t:            0.13s ease;
}

body[data-theme="light"] {
  --bg:           #f2f2f7;
  --surface:      #ffffff;
  --surface2:     #e8e8f0;
  --surface3:     #dcdce8;
  --accent:       #e94560;
  --accent-hover: #c73652;
  --accent-dim:   rgba(233,69,96,0.10);
  --text:         #0d0d1a;
  --text-sub:     #44445a;
  --text-muted:   #88889a;
  --success:      #16a34a;
  --warning:      #d97706;
  --danger:       #dc2626;
  --border:       rgba(0,0,0,0.09);
  --border-med:   rgba(0,0,0,0.15);
  --shadow:       0 1px 8px rgba(0,0,0,0.12);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.18);
}

body[data-theme="light"] {
  background: radial-gradient(ellipse at 50% 0%, rgba(233,69,96,0.08) 0%, var(--bg) 60%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  caret-color: transparent;
}

input, textarea {
  caret-color: var(--accent);
  -webkit-user-select: text;
  user-select: text;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse at 50% 15%, #200a35 0%, var(--bg) 60%);
  background-attachment: fixed;
}

body[data-theme="light"] {
  background: radial-gradient(ellipse at 50% 0%, rgba(233,69,96,0.1) 0%, var(--bg) 55%);
  background-attachment: fixed;
}

body {
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

iconify-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ===== ADMIN BANNER ===== */
.admin-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #7c2d12, #e94560);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.admin-banner.hidden { display: none; }
.admin-banner span { flex: 1; }
.admin-banner-close {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  padding: 2px 5px;
  display: flex;
  align-items: center;
  transition: background 0.1s;
}
.admin-banner-close:hover { background: rgba(255,255,255,0.3); }

/* ===== VIEWS ===== */
.view {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeIn 0.2s ease;
}

.view.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

/* ===== HOME VIEW ===== */
#view-home {
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.home-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo-icon {
  color: #7eb8c8;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(126,184,200,0.4));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.logo-crash {
  color: rgba(255,255,255,0.92);
  -webkit-text-fill-color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
body[data-theme="light"] .logo-crash {
  color: #1a1a2e;
  -webkit-text-fill-color: #1a1a2e;
  text-shadow: none;
}

.logo-tune {
  background: linear-gradient(135deg, #ff6b81 0%, #e94560 50%, #c73652 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-theme="light"] .logo-tune {
  filter: none;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.name-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.name-input-row input { flex: 1; }

.input-group label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* ===== INPUTS ===== */
input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  outline: none;
  transition: border-color var(--t), background var(--t);
}

input[type="text"]:focus {
  border-color: rgba(233,69,96,0.5);
  background: var(--surface3);
}

input[type="text"]::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), transform 0.08s ease, opacity var(--t);
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active { transform: scale(0.96); }
.btn-full   { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, #e94560, #c73652);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  box-shadow: 0 4px 18px rgba(233,69,96,0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f05070, #e94560);
  box-shadow: 0 4px 24px rgba(233,69,96,0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border-med);
}

.btn-secondary:hover {
  background: var(--surface2);
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text-sub);
  border-color: var(--border-med);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: var(--radius-xs);
  transition: background var(--t), color var(--t);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--surface2);
  color: var(--text-sub);
}

/* ===== DIVIDER ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-family: var(--font-mono);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== JOIN ROW ===== */
.join-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.join-row input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 5px;
  text-align: center;
}

.join-row .btn { flex-shrink: 0; }

/* ===== LOBBY VIEW ===== */
#view-lobby {
  background: var(--bg);
  overflow: hidden;
}

.lobby-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  align-items: center;
  flex-shrink: 0;
}

.lobby-header-left  { display: flex; align-items: center; }
.lobby-header-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.room-code-box      { display: flex; align-items: center; justify-content: center; gap: 10px; }

.room-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.room-code-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.room-code-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-family: var(--font-mono);
}

.code-big {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--text);
}

/* Mobile: stacked column */
.lobby-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.lobby-left {
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.lobby-left .players-grid {
  flex-wrap: nowrap;
}

/* ===== MOBILE LOBBY PLAYER STRIP ===== */
.lobby-player-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lobby-strip-avatars {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow: hidden;
  align-items: center;
  flex-wrap: wrap;
}
.lobby-strip-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px 3px 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.lobby-strip-chip.is-me {
  border-color: rgba(233,69,96,0.4);
}
.lobby-strip-chip.is-host {
  border-color: rgba(245,158,11,0.4);
}
.lobby-strip-more {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
@media (max-width: 599px) {
  .lobby-header { grid-template-columns: auto 1fr auto; }
  .lobby-left { display: none; }
  .lobby-player-strip:not(.hidden) { display: flex; }
}
@media (min-width: 600px) {
  .lobby-player-strip { display: none !important; }
}

.lobby-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 20px;
  overflow-y: auto;
  min-height: 0;
}

#btn-start, #waiting-msg {
  margin-top: 20px;
}
#waiting-msg {
  align-self: center;
}

/* Desktop: sidebar + main (≥ 600px) */
@media (min-width: 600px) {
  .lobby-body {
    flex-direction: row;
  }
  .lobby-left {
    flex-shrink: 0;
    width: 250px;
    min-width: 250px;
    border-bottom: none;
    border-right: 1px solid var(--border);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 16px;
  }
  .lobby-left .players-grid {
    flex-wrap: wrap;
  }
  .lobby-right {
    padding: 20px 28px 24px;
  }
}

.section-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

/* ===== PLAYERS GRID ===== */
.players-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  flex: 0 0 100%;
  animation: popIn 0.17s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.84); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-name {
  font-weight: 600;
  font-size: 0.87rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-score {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: var(--text-muted);
}

.player-owner-badge {
  font-size: 0.56rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: auto;
  flex-shrink: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  border: 1px solid rgba(233,69,96,0.2);
}

/* ===== SETTINGS ===== */
.settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setting-row label {
  font-size: 0.87rem;
  color: var(--text-sub);
  flex-shrink: 0;
}

select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 8px 11px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t);
  min-width: 125px;
  -webkit-appearance: none;
  appearance: none;
}

select:focus { border-color: rgba(233,69,96,0.45); }

.settings-readonly { padding: 14px; }

.settings-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.info-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.74rem;
  color: var(--text-sub);
  font-family: var(--font-mono);
}

.waiting-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 8px;
  animation: fadeOsc 2.8s ease-in-out infinite;
}

@keyframes fadeOsc {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ===== LOADING VIEW ===== */
#view-loading {
  align-items: center;
  justify-content: center;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--surface3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.loading-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: -18px;
  font-family: var(--font-mono);
}

/* ===== GAME VIEW ===== */
#view-game {
  background: var(--bg);
  overflow: hidden;
}

.game-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.game-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.round-info {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.scores-mini {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 62%;
}

.score-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.66rem;
  font-weight: 600;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: transparent;
  transition: border-color 0.2s;
}

.score-chip.leading {
  border-color: rgba(233,69,96,0.38);
  color: var(--accent);
}

.score-chip .chip-score { font-weight: 700; }

/* ===== PROGRESS BAR ===== */
.progress-container {
  height: 3px;
  background: var(--surface3);
  flex-shrink: 0;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 100%;
  transform-origin: left;
  box-shadow: 0 0 6px rgba(233,69,96,0.5);
}

.progress-bar.animating {
  animation: progressShrink linear forwards;
}

@keyframes progressShrink {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ===== GAME LAYOUT (sidebar + game body) ===== */
.game-layout {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ===== PLAYER SIDEBAR ===== */
.player-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 250px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.sp-entry {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: var(--radius-xs);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: border-color var(--t), background var(--t);
  min-width: 0;
  position: relative;
}

.sp-entry.is-me {
  border-color: rgba(233,69,96,0.35);
}

.sp-entry.is-dj {
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.06);
}

.sp-entry.is-buzz {
  border-color: rgba(248,113,113,0.45);
  background: rgba(248,113,113,0.07);
}

.sp-rank {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.sp-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--text-sub);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
}

.sp-avatar .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.sp-name {
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.sp-score {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 600;
}

.sp-badge {
  flex-shrink: 0;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-transform: uppercase;
  align-self: center;
}

.sp-dj {
  background: rgba(245,158,11,0.2);
  color: var(--warning);
  border: 1px solid rgba(245,158,11,0.35);
}

.sp-buzz {
  background: rgba(248,113,113,0.18);
  color: var(--danger);
  border: 1px solid rgba(248,113,113,0.3);
}

.sp-offline {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
}

.sp-entry.is-offline {
  opacity: 0.38;
}

/* ===== GAME BODY ===== */
.game-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

@media (max-width: 999px) and (min-width: 501px) {
  .game-body {
    padding-left: 270px; /* sidebar visible → center in right area */
  }
}

.game-state {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: fadeIn 0.18s ease;
}

.live-host-input {
  width: 100%;
  background: var(--surface2);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ===== VINYL ANIMATION ===== */
.vinyl-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
}

/* vinyl-inner is the single rotating unit: disc + cover + cracks all spin together */
.vinyl-inner {
  position: relative;
  width: 100%;
  height: 100%;
  animation: vinyl-idle 6s ease-in-out infinite;
}

.vinyl-wrap.spinning .vinyl-inner {
  animation: vinyl-spin 1.8s linear infinite;
}

.vinyl-wrap.wobble .vinyl-inner {
  animation: vinyl-wobble 0.25s ease-in-out 4;
}

.vinyl-wrap.glitch .vinyl-inner {
  animation: vinyl-glitch 0.08s step-end 8;
}

.vinyl-wrap.broken .vinyl-inner {
  animation: none;
  transform: rotate(var(--vinyl-freeze-angle, 37deg)) scale(0.97);
  filter: brightness(0.55) saturate(0.3);
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

/* Album cover hint — centered over the label area */
.vinyl-cover-img {
  position: absolute;
  width: 29%;
  height: 29%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.vinyl-cover-img.visible {
  opacity: 1;
}

/* Center hole stays on top of cover */
.vinyl-hole-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes vinyl-idle {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  50%       { transform: rotate(2deg) scale(1.005); }
}

/* ===== SHAKE ===== */
@keyframes shake {
  0%,100% { transform: translate(0,0) rotate(0); }
  15%  { transform: translate(-5px, 3px) rotate(-1deg); }
  30%  { transform: translate(5px, -3px) rotate(1deg); }
  45%  { transform: translate(-4px, 2px) rotate(-0.5deg); }
  60%  { transform: translate(4px, -2px) rotate(0.5deg); }
  75%  { transform: translate(-2px, 1px); }
}
body.shake { animation: shake 0.4s ease; }

/* ===== POINT POPUP ===== */
@keyframes pointPopUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  60%  { opacity: 1; transform: translateY(-60px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-90px) scale(0.9); }
}
.point-popup {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  pointer-events: none;
  z-index: 100;
  text-shadow: 0 0 20px rgba(233,69,96,0.6);
  animation: pointPopUp 1.2s ease forwards;
}

/* ===== REVEAL SUMMARY ===== */
.reveal-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-top: 4px;
}
.rs-winner { font-weight: 700; color: var(--text); }
.rs-pts { font-weight: 800; color: var(--accent); font-size: 1rem; }
.rs-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rs-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}
.rs-tag.speed { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.rs-tag.streak { background: rgba(233,69,96,0.15); color: var(--accent); border: 1px solid rgba(233,69,96,0.3); }

/* ===== REACTION BAR ===== */
.reaction-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 6px 0;
}
.react-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.1s ease, background var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
}
.react-btn:hover { background: var(--surface3); transform: scale(1.15); }
.react-btn.react-pop { transform: scale(1.4); }

/* ===== EMOJI BUBBLES ===== */
@keyframes emojiFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0.7); }
  15%  { opacity: 1; transform: translateY(-20px) scale(1.1); }
  80%  { opacity: 1; transform: translateY(-120px) scale(1); }
  100% { opacity: 0; transform: translateY(-150px) scale(0.9); }
}
.emoji-bubble {
  position: absolute;
  bottom: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  z-index: 300;
  animation: emojiFloat 2.2s ease forwards;
}
.eb-emoji { font-size: 1.8rem; line-height: 1; }
.eb-name  { font-size: 0.65rem; color: #fff; background: rgba(0,0,0,0.5); padding: 1px 5px; border-radius: 10px; }
body[data-theme="light"] .eb-name { color: #1a1a2e; background: transparent; font-weight: 600; }

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes vinyl-wobble {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-10deg) scale(0.96); }
  50%  { transform: rotate(12deg) scale(1.03); }
  80%  { transform: rotate(-6deg) scale(0.98); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes vinyl-glitch {
  0%  { transform: translate(4px, 0) skewX(3deg) rotate(35deg); filter: brightness(1.4) hue-rotate(20deg); }
  15% { transform: translate(-5px, 2px) rotate(38deg); filter: brightness(0.6); }
  30% { transform: translate(3px, -3px) skewX(-3deg) rotate(32deg); }
  50% { transform: translate(-4px, 1px) rotate(41deg); filter: brightness(1.3) hue-rotate(-20deg); }
  70% { transform: translate(6px, 0) rotate(35deg); filter: brightness(0.7); }
  85% { transform: translate(-2px, -2px) rotate(37deg); }
  100%{ transform: translate(0, 0) rotate(37deg); filter: none; }
}

.vinyl-crack {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.vinyl-crack.visible {
  opacity: 1;
}

/* ===== OLD HINT COVER (hidden, replaced by vinyl-cover-img) ===== */
.hint-cover { display: none; }

/* ===== HOME VINYL ===== */
#home-vinyl {
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 0 48px rgba(233,69,96,0.22)) drop-shadow(0 16px 48px rgba(0,0,0,0.8));
  position: relative;
}

#home-vinyl::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(233,69,96,0.08) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

#home-vinyl .vinyl-inner {
  animation: vinyl-spin 4s linear infinite;
}

#home-vinyl .vinyl-cover-img {
  opacity: 0;
  filter: none;
  transition: opacity 0.8s ease;
}

#home-vinyl .vinyl-cover-img.loaded {
  opacity: 1;
}

.song-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: color 0.3s ease, font-size 0.3s ease;
}

.letter-hints-zone {
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.letter-hints-display {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-align: center;
  padding: 6px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  word-break: break-all;
  line-height: 1.8;
  animation: fadeIn 0.3s ease;
}

.hint-cover {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  opacity: 0;
  filter: blur(2px);
  transition: opacity 1s ease;
  pointer-events: none;
}

.hint-cover.visible {
  opacity: 0.4;
}

/* ===== BUZZ BUTTON — CIRCULAR ===== */
.buzz-btn {
  width: clamp(158px, 52vw, 210px);
  height: clamp(158px, 52vw, 210px);
  border-radius: 28px;
  background: linear-gradient(145deg, #f05070 0%, #e94560 50%, #c73652 100%);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 4px;
  cursor: pointer;
  box-shadow:
    0 0 0 8px rgba(233,69,96,0.12),
    0 8px 32px rgba(233,69,96,0.45),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.1s ease, box-shadow 0.18s ease;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

.buzz-btn:active {
  transform: scale(0.93);
  box-shadow:
    0 0 0 2px rgba(233,69,96,0.08),
    0 4px 12px rgba(233,69,96,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.buzz-btn.pulse {
  animation: buzzPulse 2s ease-in-out infinite;
}

@keyframes buzzPulse {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(233,69,96,0.12),
      0 8px 32px rgba(233,69,96,0.45),
      inset 0 1px 0 rgba(255,255,255,0.2);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 26px rgba(233,69,96,0.05),
      0 8px 48px rgba(233,69,96,0.6),
      inset 0 1px 0 rgba(255,255,255,0.2);
    transform: scale(1.025);
  }
}

.buzz-btn.disabled,
.buzz-btn.buzz-blocked,
.buzz-btn:disabled {
  background: var(--surface3);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.35;
  animation: none;
}

.buzz-sub {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 24px;
  letter-spacing: 0.04em;
}

/* ===== BUZZED BANNER ===== */
.buzzed-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  justify-content: center;
}

.buzz-icon {
  animation: ring 0.5s ease-in-out 3;
}

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  25%       { transform: rotate(-14deg); }
  75%       { transform: rotate(14deg); }
}

.my-buzz {
  background: var(--accent-dim);
  border: 1px solid rgba(233,69,96,0.24);
  color: var(--accent);
}

.other-buzz {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-med);
  color: var(--text);
}

.guess-instruction {
  color: var(--text-sub);
  font-size: 0.87rem;
  text-align: center;
}

.guess-input-row { width: 100%; }

.guess-input-row input {
  font-size: 1rem;
  text-align: center;
  border-color: rgba(233,69,96,0.16);
}

.guess-input-row input:focus {
  border-color: rgba(233,69,96,0.48);
}

.guess-timer {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: center;
  animation: timerPulse 1s ease-in-out infinite;
}

.guess-timer.urgent {
  color: var(--danger);
  animation: timerPulse 0.46s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

.waiting-guess-text {
  color: var(--text-sub);
  font-size: 0.9rem;
}

.waiting-dots {
  display: flex;
  gap: 7px;
}

.waiting-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  display: block;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: 0.18s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes dotBounce {
  0%, 100% { transform: translateY(0);     opacity: 0.22; }
  50%       { transform: translateY(-9px);  opacity: 0.8; }
}

/* ===== REVEAL STATE ===== */
.reveal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  animation: revealPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes revealPop {
  from { transform: scale(0.82); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.album-cover {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 10px 36px rgba(0,0,0,0.7);
  background: var(--surface2);
}

.reveal-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.song-title-big {
  font-family: var(--font-display);
  font-size: clamp(1rem, 5vw, 1.55rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.3px;
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
  text-align: center;
}

.song-artist-big {
  font-size: 0.86rem;
  color: var(--text-sub);
  font-weight: 500;
}

.song-year-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.reveal-series {
  font-size: 0.78rem;
  color: var(--accent);
  font-style: italic;
  margin: 2px 0 4px;
  opacity: 0.85;
}

.reveal-result {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  text-align: center;
  width: 100%;
}

.reveal-result.correct {
  background: rgba(74,222,128,0.07);
  border: 1px solid rgba(74,222,128,0.2);
  color: var(--success);
}

.reveal-result.wrong {
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.2);
  color: var(--danger);
}

.reveal-result.neutral {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-med);
  color: var(--text-sub);
}
.reveal-result.timeout {
  background: rgba(233,69,96,0.1);
  border: 1px solid rgba(233,69,96,0.3);
  color: var(--accent);
}

/* ===== SKIP BUTTON ===== */
.skip-btn {
  position: absolute;
  bottom: 16px;
  right: 14px;
  font-size: 0.75rem;
  padding: 7px 12px;
}

/* ===== GAMEOVER VIEW ===== */
#view-gameover {
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.gameover-inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.gameover-trophy {
  color: var(--warning);
  animation: trophyBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
             float 5s ease-in-out infinite 0.45s;
  filter: drop-shadow(0 0 20px rgba(245,158,11,0.3));
}

@keyframes trophyBounce {
  from { transform: scale(0) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);      opacity: 1; }
}

.gameover-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-align: center;
}

.final-scores {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.final-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  animation: slideInLeft 0.27s ease forwards;
  opacity: 0;
}

@keyframes slideInLeft {
  from { transform: translateX(-16px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.final-rank {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 34px;
  text-align: center;
}

.final-rank.rank-1 { color: var(--warning); }
.final-rank.rank-2 { color: #94a3b8; }
.final-rank.rank-3 { color: #78716c; }

.final-player-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.final-player-score {
  font-family: var(--font-mono);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.final-score-row.is-me {
  border-color: rgba(233,69,96,0.24);
  background: rgba(233,69,96,0.04);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: opacity 0.24s, transform 0.24s;
  text-align: center;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
}

/* Between 501-999px: sidebar visible → offset toast into right area */
@media (max-width: 999px) and (min-width: 501px) {
  .toast {
    left: calc(50% + 125px);
  }
}

@media (max-width: 600px) {
  .toast {
    bottom: auto;
    top: 14px;
  }
  .toast.hidden {
    transform: translateX(-50%) translateY(-12px);
  }
}

.toast.error   { border-color: rgba(248,113,113,0.3);  color: var(--danger); }
.toast.success { border-color: rgba(74,222,128,0.3);   color: var(--success); }
.toast.info    { border-color: rgba(233,69,96,0.3);   color: var(--accent); }

/* ===== YOUTUBE UNMUTE BANNER ===== */
.yt-unmute-banner {
  width: 100%; padding: 10px 16px; margin-bottom: 8px;
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.4);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.83rem; font-weight: 600; color: #fbbf24;
  text-align: center; transition: background 0.2s;
  animation: pulse-border 2s ease-in-out infinite;
}
.yt-unmute-banner:hover { background: rgba(251,191,36,0.2); }
.yt-unmute-banner.hidden { display: none; }
@keyframes pulse-border {
  0%,100% { border-color: rgba(251,191,36,0.4); }
  50%      { border-color: rgba(251,191,36,0.8); }
}

/* ===== FEEDBACK BUTTON ===== */
.feedback-wrap {
  margin-top: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.feedback-wrap.hidden { display: none; }
.btn-feedback {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-muted); font-size: 0.72rem; padding: 4px 13px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-feedback:hover { border-color: var(--accent); color: var(--accent); }
.feedback-options {
  display: flex; gap: 8px;
}
.feedback-options.hidden { display: none; }
.btn-feedback-opt {
  background: var(--surface2); border: 1px solid var(--border-med);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.78rem; padding: 6px 14px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-feedback-opt:hover { border-color: var(--accent); background: var(--surface3); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .buzz-btn  { width: 220px; height: 220px; font-size: 2.3rem; }
  .logo-icon { font-size: 60px; }
  .logo-text { font-size: 2.4rem; }
}

@media (max-height: 600px) {
  .buzz-btn    { width: 130px; height: 130px; font-size: 1.5rem; }
  .vinyl-wrap  { width: 110px; height: 110px; }
  .game-body   { padding: 8px 14px; gap: 12px; }
  .game-state  { gap: 10px; }
  #home-vinyl  { width: 180px; height: 180px; }
}

@media (max-width: 400px) {
  #home-vinyl  { width: 220px; height: 220px; }
}

/* On narrow screens: sidebar hidden — replaced by mobile score strip */
@media (max-width: 500px) {
  .player-sidebar {
    display: none;
  }
  /* Leave button: hide text on mobile */
  .btn-leave-text { display: none; }
  /* Fixed buzz bar at bottom */
  #buzz-area:not(.hidden) {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    padding: 10px 20px 22px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  /* Skip button anchored just above the fixed buzz bar */
  .vote-skip-row {
    position: fixed;
    bottom: 140px; left: 0; right: 0;
    z-index: 201;
    display: flex;
    justify-content: center;
    pointer-events: none;
  }
  .vote-skip-row .skip-btn {
    pointer-events: auto;
    font-size: 0.72rem;
    padding: 4px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-sub);
  }
  .buzz-btn {
    width: 100% !important;
    height: 64px !important;
    border-radius: 16px !important;
    font-size: 1.35rem !important;
  }
  .buzz-sub { font-size: 0.72rem; }
  #state-playing {
    padding-bottom: 160px;
  }
}

/* ===== MOBILE SCORE STRIP ===== */
.mobile-score-strip {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
@media (max-width: 500px) {
  .mobile-score-strip:not(.hidden) { display: flex; }
}
.mobile-score-entries {
  display: flex;
  gap: 5px;
  flex: 1;
  overflow: hidden;
  align-items: center;
}
.mobile-score-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.mobile-score-chip.is-me {
  border-color: rgba(233,69,96,0.4);
}
.mobile-score-chip .msc-score {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.mobile-score-sep {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.mobile-score-more {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ===== MOBILE PLAYERS MODAL ===== */
.players-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.players-modal-overlay.hidden { display: none; }
.players-modal-box {
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.players-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.players-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.players-modal-list {
  overflow-y: auto;
  padding: 10px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ===== AVATAR PICKER ===== */
.avatar-name-row {
  display: flex;
  gap: 11px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.avatar-display {
  width: 64px;
  height: 64px;
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t), transform 0.12s ease;
  flex-shrink: 0;
  padding: 0;
  color: var(--text-sub);
  overflow: hidden;
}

.avatar-display:hover {
  border-color: rgba(233,69,96,0.4);
  transform: scale(1.05);
}

.avatar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.avatar-modal-overlay.hidden { display: none; }

.avatar-modal-box {
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#lobby-modal-overlay .avatar-modal-box {
  max-width: 560px;
}

.avatar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.95rem;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
}

.avatar-opt {
  aspect-ratio: 1;
  background: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--t), transform 0.1s ease, box-shadow var(--t);
}

.avatar-opt:hover {
  transform: scale(1.05);
  border-color: rgba(255,255,255,0.25);
}

.avatar-opt.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ===== AVATAR IMAGES ===== */
.avatar-img {
  object-fit: cover;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.avatar-display .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
}

.avatar-opt .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

/* ===== PLAYER AVATAR IN LIST ===== */
.player-avatar-emoji {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-sub);
  background: var(--surface2);
  border-radius: 8px;
  overflow: hidden;
}

.player-avatar-emoji .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* ===== MODE CARDS ===== */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.mode-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 6px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: border-color var(--t), background var(--t), transform 0.1s ease;
  user-select: none;
  color: var(--text-muted);
  position: relative;
  z-index: 10;
}

.mode-card:hover {
  border-color: var(--border-med);
  background: var(--surface3);
  transform: translateY(-1px);
  color: var(--text-sub);
}

.mode-card:active { transform: scale(0.96); }

.mode-card.selected {
  border-color: rgba(233,69,96,0.42);
  background: var(--accent-dim);
  color: var(--accent);
}

.mode-card.selected .mode-label { color: var(--accent); }

.mode-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.mode-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  transition: color var(--t);
}

/* ===== SUBMODE CHIPS ===== */
.submode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.submode-chip {
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t), transform 0.1s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.submode-chip:hover {
  border-color: rgba(233,69,96,0.3);
  color: var(--text);
  background: var(--surface3);
  transform: translateY(-1px);
}

.submode-chip.active {
  border-color: rgba(233,69,96,0.55);
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px rgba(233,69,96,0.15);
}

.chip-count {
  font-size: 0.7em;
  opacity: 0.45;
  font-weight: 400;
  font-family: var(--font-mono);
}

/* ===== SETTINGS SELECTS ===== */
.settings-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-selects .setting-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.settings-selects select { width: 100%; min-width: unset; }

/* Advanced settings collapsible */
.settings-advanced {
  margin-bottom: 14px;
}

.settings-advanced-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  padding: 6px 2px;
  user-select: none;
  transition: color var(--t);
}

.settings-advanced-toggle::-webkit-details-marker { display: none; }
.settings-advanced-toggle::before {
  content: '▶';
  font-size: 9px;
  transition: transform 0.2s;
  display: inline-block;
}
.settings-advanced[open] .settings-advanced-toggle::before { transform: rotate(90deg); }
.settings-advanced-toggle:hover { color: var(--text-sub); }

@media (max-width: 480px) {
  .settings-selects { grid-template-columns: 1fr; }
}

/* ===== SETTINGS TOGGLES ===== */
/* Lobby-Name + Passwort nebeneinander */
.settings-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.settings-name-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.settings-field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.settings-field-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}
.settings-text-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color var(--t);
  width: 100%;
}
.settings-text-input:focus { border-color: var(--accent-muted); }

/* 2-spaltige Toggle-Karten */
.settings-toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.toggle-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background var(--t), border-color var(--t);
  user-select: none;
}
.toggle-card:hover { background: var(--surface3); }
.toggle-card.is-active { background: rgba(233,69,96,0.06); border-color: rgba(233,69,96,0.2); }
.toggle-card.is-active .toggle-label-main { color: var(--text); }
.toggle-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-toggles {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .settings-name-row { grid-template-columns: 1fr; }
  .settings-toggles-grid { grid-template-columns: 1fr; }
}

.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
  user-select: none;
}

.setting-toggle-row:last-child { border-bottom: none; }

.setting-toggle-row:hover {
  background: var(--surface3);
}

.setting-toggle-row.is-active {
  background: rgba(233,69,96,0.05);
}

.setting-toggle-row.is-active .toggle-label-main {
  color: var(--text);
}

/* Sub-setting: indented, only active when parent is on */
.setting-toggle-sub {
  padding-left: 28px;
  background: var(--surface);
  border-top: none;
}

.setting-toggle-sub::before {
  content: '';
  position: absolute;
  left: 16px;
  width: 8px;
  height: 1px;
  background: var(--border-med);
}

.setting-toggle-sub .toggle-label-main {
  font-size: 0.82rem;
  font-weight: 500;
}

.setting-toggle-sub.sub-disabled {
  opacity: 0.38;
  pointer-events: none;
}

.toggle-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.toggle-label-main {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-sub);
}

.toggle-label-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ===== NON-OWNER READONLY ===== */
.settings-readonly {
  margin-bottom: 16px;
}

.readonly-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.settings-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.settings-info-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--text-muted);
}

.sic-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.sic-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.info-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
}

.info-toggle-badge {
  background: var(--accent-dim);
  border: 1px solid rgba(233,69,96,0.25);
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

/* ===== WAITING ANIMATION ===== */
.waiting-dots-big {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 8px;
}

.waiting-dots-big span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: waitPulse 1.2s ease-in-out infinite;
}

.waiting-dots-big span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots-big span:nth-child(3) { animation-delay: 0.4s; }

@keyframes waitPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ===== SUBMODE SECTION ===== */
.submode-section {
  margin-bottom: 14px;
}

.submode-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

/* ===== CUSTOM SECTION ===== */
.custom-section { margin-top: 4px; }

.btn-toggle-section {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color var(--t), color var(--t), border-radius var(--t);
}

.btn-toggle-section:hover {
  border-color: var(--border-med);
  color: var(--text-sub);
}

.btn-toggle-section.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--border-med);
  color: var(--text-sub);
}

.custom-count {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.custom-songs-panel {
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 14px;
}

.yt-url-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  resize: vertical;
  min-height: 76px;
  line-height: 1.6;
  transition: border-color var(--t);
  caret-color: var(--accent);
  margin-bottom: 8px;
}

.yt-url-textarea:focus { border-color: rgba(233,69,96,0.45); }

.yt-url-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.55;
  font-size: 0.82rem;
}

/* ===== YT LOADING ===== */
.yt-loading {
  font-size: 0.74rem;
  color: var(--text-muted);
  padding: 6px 0;
  text-align: center;
  font-family: var(--font-mono);
}

/* ===== YT THUMBNAIL ===== */
.yt-thumb {
  width: 44px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--surface);
}

/* ===== CHIP AVATAR ===== */
.chip-avatar {
  display: inline-flex;
  align-items: center;
  margin-right: 1px;
  color: inherit;
}

/* ===== FINAL SCORE AVATAR ===== */
.final-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  color: var(--text-sub);
}

/* ===== CUSTOM YOUTUBE SONGS ===== */
.custom-songs-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.custom-songs-header h3 {
  font-size: 0.9rem;
  color: var(--text);
}

.custom-hint {
  font-size: 0.72rem;
  color: var(--warning);
  opacity: 0.8;
  margin-bottom: 8px;
}

.yt-add-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.yt-url-row {
  display: flex;
  gap: 7px;
}

.yt-url-row input { flex: 1; min-width: 0; }

.yt-meta-row { display: flex; gap: 7px; }
.yt-meta-row input { flex: 1; min-width: 0; }

/* ===== CUSTOM ADD SECTIONS ===== */
.custom-add-section { margin-bottom: 10px; }

.panel-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 10px 0;
}

.panel-divider::before,
.panel-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== DEEZER SEARCH RESULTS ===== */
.deezer-results {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.deezer-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
  background: var(--surface);
}

.deezer-result-row:last-child { border-bottom: none; }
.deezer-result-row:hover { background: var(--surface3); }

.deezer-result-row img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}

.deezer-result-info { flex: 1; min-width: 0; }

.deezer-result-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deezer-result-artist {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deezer-result-add {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--accent-dim);
  border: 1px solid rgba(233,69,96,0.2);
}

/* ===== SONG ORDER BUTTONS ===== */
.song-order-btns {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.btn-sort {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 0.65rem;
  width: 20px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background var(--t), color var(--t);
}

.btn-sort:hover { background: var(--surface2); color: var(--text); }
.btn-sort.ph { visibility: hidden; }

.btn-sm {
  padding: 8px 11px;
  font-size: 0.79rem;
  white-space: nowrap;
}

.custom-songs-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.custom-empty {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
  font-family: var(--font-mono);
}

.custom-song-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  border: 1px solid var(--border);
}

.yt-icon {
  color: #f87171;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.custom-song-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.custom-song-title {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-song-artist {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-remove-yt {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  transition: color var(--t), background var(--t);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.btn-remove-yt:hover {
  color: var(--danger);
  background: rgba(248,113,113,0.08);
}

/* ===== VOTE SKIP ===== */
.vote-skip-row {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

/* ===== LEAVE BUTTON ===== */
.leave-btn {
  color: var(--danger);
  border-color: rgba(248,113,113,0.2);
}
.leave-btn:hover {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.4);
  color: var(--danger);
}

/* ===== DJ CONTROLS (seekbar + mini playlist) ===== */
.dj-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0 4px;
}

.dj-seekbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.dj-seek-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-sub);
  min-width: 34px;
  text-align: center;
}

.dj-seekbar {
  flex: 1;
  height: 4px;
  appearance: none;
  background: var(--surface3);
  border-radius: 2px;
  cursor: pointer;
  caret-color: transparent;
}
.dj-seekbar::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
}
.dj-seekbar::-webkit-slider-thumb:active { cursor: grabbing; }
.dj-seekbar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: grab;
}

.dj-playlist-mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 120px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
}

.dj-mini-song {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  background: var(--surface2);
  opacity: 0.5;
  font-size: 0.78rem;
}
.dj-mini-song.active {
  opacity: 1;
  background: var(--surface3);
  border: 1px solid var(--accent);
}
.dj-mini-song.played { opacity: 0.25; }

.dj-mini-thumb {
  width: 32px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.dj-mini-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.dj-mini-title {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dj-mini-artist {
  color: var(--text-sub);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dj-mini-playing {
  color: var(--accent);
  flex-shrink: 0;
}

/* ===== DJ BANNER ===== */
.dj-banner {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.18);
  color: var(--warning);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* ===== LOBBY BROWSER ===== */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.btn-lobbies-count {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  width: 100%;
  position: relative;
}
.btn-lobbies-count::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: livePulse 1.6s ease-in-out infinite;
}
.btn-lobbies-count:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
  color: var(--text);
}

.lobby-modal-filters {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lbf-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  font-size: 0.83rem;
  color: var(--text);
  font-family: var(--font-body);
  caret-color: var(--accent);
}
.lbf-search:focus { outline: none; border-color: rgba(233,69,96,0.4); }
.lbf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.lbf-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}
.lbf-switch {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface3);
  border: 1px solid var(--border-med);
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lbf-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s ease, background 0.2s ease;
}
#lbf-free:checked + .lbf-switch {
  background: var(--accent);
  border-color: var(--accent);
}
#lbf-free:checked + .lbf-switch::after {
  transform: translateX(14px);
  background: #fff;
}
.lbf-toggle:hover .lbf-switch { border-color: rgba(255,255,255,0.2); }
.lbf-pills {
  display: flex;
  gap: 4px;
}
.lbf-pill {
  background: none;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.lbf-pill:hover { background: var(--surface3); color: var(--text); }
.lbf-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.lobby-modal-list {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 0;
}
.lobby-browser-empty {
  padding: 20px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}
.lobby-browser-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.lobby-browser-row:last-child { border-bottom: none; }
.lobby-browser-row:hover { background: rgba(255,255,255,0.03); }
.lbr-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 24px;
}
.lbr-info { flex: 1; min-width: 0; }
.lbr-host {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lbr-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.lbr-join {
  flex-shrink: 0;
}

/* ===== CUSTOM SONG BADGE ===== */
.custom-badge {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.18);
  color: var(--warning);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-block;
  font-family: var(--font-mono);
}

/* ===== REVEAL ACTIONS ===== */
.reveal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
}

.reveal-countdown {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  min-height: 18px;
}

/* ===== GAME CONTROLS ===== */
.game-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ctrl-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-sub);
  cursor: pointer;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: border-color var(--t), background var(--t), color var(--t);
  white-space: nowrap;
}

.ctrl-btn:hover {
  background: var(--surface3);
  border-color: var(--border-med);
  color: var(--text);
}

.ctrl-btn:disabled {
  opacity: 0.26;
  cursor: not-allowed;
}

.ctrl-btn.used { opacity: 0.2; }

.pause-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.4;
}

.volume-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* ===== VOLUME MODAL ===== */
.vol-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vol-overlay.hidden { display: none; }
.vol-modal-box {
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius);
  width: min(320px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.vol-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t), background var(--t);
  line-height: 1;
}
.vol-close-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.vol-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.settings-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0 6px;
  padding: 0 2px;
}
.settings-section-label:first-child { margin-top: 4px; }

.vol-modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.vol-row span { flex-shrink: 0; min-width: 52px; }
.vol-row-master { color: var(--text); font-weight: 600; }
.vol-divider { height: 1px; background: var(--border); margin: 8px 0; }
.vol-val { min-width: 28px; text-align: right; font-family: var(--font-mono); font-size: 0.75rem; }
.vol-row input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--surface3);
  outline: none;
  cursor: pointer;
}
.vol-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.2);
}
.vol-row input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

/* ===== PAUSE OVERLAY ===== */
.pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pause-overlay.hidden { display: none; }

.countdown-modal {
  text-align: center;
}

@media (max-width: 999px) and (min-width: 501px) {
  .countdown-modal {
    margin-left: 250px; /* sidebar visible — center in right area */
  }
}

.qr-modal {
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.18s ease;
}

.qr-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 16px;
}

#qr-code {
  display: inline-block;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

#qr-code img, #qr-code canvas {
  display: block;
}

.qr-url {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 12px;
  word-break: break-all;
  max-width: 220px;
  margin-inline: auto;
}


.countdown-number {
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 40px rgba(233,69,96,0.6);
  display: block;
}

.countdown-pop {
  animation: countdownPop 0.9s ease-out forwards;
}

@keyframes countdownPop {
  0%   { transform: scale(1.5); opacity: 0.3; }
  20%  { transform: scale(1.0); opacity: 1; }
  80%  { transform: scale(1.0); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.5; }
}

.countdown-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-top: 14px;
  letter-spacing: 0.5px;
}

.pause-modal {
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius);
  padding: 34px 26px;
  text-align: center;
  max-width: 310px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.18s ease;
}

.pause-icon-big {
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1;
}

.pause-modal h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.pause-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 0.87rem;
  margin-bottom: 6px;
}
.pause-by .avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pause-countdown-text {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-bottom: 20px;
  min-height: 18px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== YOUTUBE PLAYER (hidden off-screen) ===== */
/* Must NOT be display:none / visibility:hidden / opacity:0 / 1px — browsers block unmuted autoplay for invisible iframes */
#yt-host-player {
  position: fixed;
  width: 200px;
  height: 120px;
  top: -9999px;
  left: -9999px;
  pointer-events: none;
}
#yt-host-player iframe,
#yt-player {
  width: 200px;
  height: 120px;
  border: none;
}

/* ===== PROGRESS SECONDS ===== */
.progress-seconds {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  pointer-events: none;
}

/* ===== DJ TURN STATES ===== */
.dj-turn-avatar {
  width: 72px;
  height: 72px;
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  animation: float 3.5s ease-in-out infinite;
  overflow: hidden;
}

.dj-turn-avatar .avatar-img,
.dj-big-avatar .avatar-img,
.final-avatar .avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.dj-sub-text {
  color: var(--text-sub);
  font-size: 0.88rem;
  text-align: center;
}

.dj-action-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.dj-action-row .btn {
  flex: 1;
  max-width: 170px;
}

.dj-waiting-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border-med);
  animation: djPulse 2.8s ease-in-out infinite;
  color: var(--text-sub);
}

@keyframes djPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.04); }
}

.dj-big-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dj-other-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.waiting-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.dj-submit-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-align: center;
}

.dj-submit-error {
  color: var(--danger);
  font-size: 0.8rem;
  text-align: center;
  padding: 5px 0;
}

.dj-url-row {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: center;
}

.dj-url-row input {
  flex: 1;
}

.dj-search-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dj-search-type-row {
  display: flex;
  gap: 6px;
}

.dj-search-type {
  flex: 1;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dj-search-type.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.yt-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.yt-result-row:hover { background: var(--surface-hover); }

.yt-result-thumb {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--surface-2);
}

.yt-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.yt-result-title {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-result-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-result-dur {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.dj-preview-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.dj-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dj-preview-hint {
  font-size: 0.78rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.dj-preview-hint strong {
  color: var(--accent);
  font-family: var(--font-mono);
}

.dj-hint-minus1 {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===== SELECT OPTGROUPS ===== */
select optgroup {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.74rem;
}

select option {
  background: var(--surface);
  color: var(--text);
}

/* ===== TOGGLE SWITCH ===== */
.setting-toggle-row {
  align-items: center;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.2s;
}

.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
  background: #fff;
}

/* ===== JUDGE STATES ===== */
.judge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 20px;
  background: var(--surface);
  border: 2px solid var(--warning);
  border-radius: var(--radius);
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  animation: popIn 0.2s ease;
}

.judge-cover-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
}

.judge-cover {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.judge-icon {
  color: var(--warning);
}

.play-again-hint {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-top: 6px;
}

.judge-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--warning);
  text-align: center;
}

.judge-guesser-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.judge-guess-bubble {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  width: 100%;
  word-break: break-word;
  letter-spacing: 0.02em;
}

.judge-song-info {
  font-size: 0.78rem;
  color: var(--text-sub);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  width: 100%;
  text-align: center;
  font-style: italic;
}

.judge-btn-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-judge-correct,
.btn-judge-wrong {
  flex: 1;
  padding: 14px 0;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, opacity 0.15s;
}

.btn-judge-correct {
  background: var(--success);
  color: #0f0f1a;
}

.btn-judge-wrong {
  background: var(--danger);
  color: #fff;
}

.btn-judge-correct:hover { opacity: 0.88; transform: scale(1.03); }
.btn-judge-wrong:hover   { opacity: 0.88; transform: scale(1.03); }
.btn-judge-correct:disabled,
.btn-judge-wrong:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.judge-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
}

.judge-wait-icon {
  color: var(--warning);
  animation: spin 2s linear infinite;
}

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

.judge-wait-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--warning);
}

.judge-wait-guess {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

@media (min-width: 760px) {
  .lobby-header { padding: 14px 32px; }
  .lobby-right { padding: 24px 36px 28px; }
  .player-card { flex: 0 0 100%; }
}

/* ===== THEME TOGGLE BUTTONS ===== */
.theme-btn {
  background: var(--surface2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-xs);
  color: var(--text-sub);
  font-size: 0.78rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
  font-family: var(--font-body);
}
.theme-btn:hover {
  background: var(--surface3);
  color: var(--text);
}
.theme-btn.active {
  background: var(--accent-dim);
  border-color: rgba(233,69,96,0.4);
  color: var(--accent);
}

/* ===== LIGHT THEME OVERRIDES ===== */
body[data-theme="light"] .card { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
body[data-theme="light"] .player-sidebar { border-right-color: var(--border); }
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="password"],
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-med);
}
body[data-theme="light"] .buzz-btn {
  background: linear-gradient(145deg, #e94560, #c73652);
  box-shadow: 0 6px 28px rgba(233,69,96,0.35), 0 2px 8px rgba(0,0,0,0.12);
}
body[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--surface3); }

/* ===== LIGHT THEME — COMPONENT OVERRIDES ===== */
body[data-theme="light"] .vinyl-disc { filter: brightness(0.85) saturate(0.9); }
body[data-theme="light"] .vinyl-disc circle[fill="#111"] { fill: #ddd; }

body[data-theme="light"] .sp-entry {
  background: var(--surface);
  border-color: var(--border-med);
}
body[data-theme="light"] .sp-entry.is-me { border-color: rgba(233,69,96,0.4); }

body[data-theme="light"] .progress-bar-wrap { background: var(--surface3); }

body[data-theme="light"] .reveal-card,
body[data-theme="light"] .judge-card,
body[data-theme="light"] .buzzed-banner { box-shadow: var(--shadow); }

body[data-theme="light"] .vol-modal-box { background: var(--surface); }

body[data-theme="light"] .toggle-card {
  background: var(--surface);
  border-color: var(--border-med);
}
body[data-theme="light"] .toggle-track { background: var(--surface3); }

body[data-theme="light"] .mobile-score-strip {
  background: var(--surface);
  border-bottom-color: var(--border-med);
}

body[data-theme="light"] .logo-icon {
  filter: drop-shadow(0 0 18px rgba(233,69,96,0.25));
  color: #e94560;
}

body[data-theme="light"] .player-sidebar {
  background: #e0e0eb;
  border-right-color: #ccccd8;
}
body[data-theme="light"] .sp-entry {
  background: #d4d4e2;
  border-color: #c4c4d4;
}

/* ===== FOCUS WARNING BANNER ===== */
.focus-banner {
  position: relative;
  z-index: 99999;
  background: rgba(233,69,96,0.92);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  overflow: hidden;
  max-height: 0;
  padding: 0 16px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.focus-banner.visible {
  max-height: 60px;
  padding: 9px 16px;
}

/* ===== GLOBAL THEME TOGGLE ===== */
.global-theme-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  transition: background var(--t), color var(--t), transform 0.15s ease, opacity 0.2s ease;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), color var(--t), transform 0.15s ease;
}
.global-theme-btn:hover {
  background: var(--surface3);
  color: var(--text);
  transform: scale(1.1);
}
body.in-game .global-theme-btn,
body.in-lobby .global-theme-btn {
  display: none;
}

/* ===== LIGHT THEME — VINYL ===== */
/* Dark vinyl on light bg looks natural — no filter needed */
body[data-theme="light"] .vinyl-wrap {
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
}
