/* ═══════════════════════════════════════════════════════════
   CUSTOM ROOM — Création de partie privée
   ═══════════════════════════════════════════════════════════ */

:root {
  --header-height: 58px;
  --bg: #0b0e14;
  --panel: #111726;
  --panel-2: #0f1520;
  --line: #1a2236;
  --text: #e8eefc;
  --muted: #9aa3b2;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-green: #1db954;
  --accent-gold: #ffd166;
  --accent-pink: #f472b6;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #0b0e14;
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--header-height);
}

/* ── Navbar ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #0b0e14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-bar {
  max-width: 1400px;
  margin: 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}
.lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
.lang-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.35) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 0 5px !important;
  text-shadow: none !important;
}
.lang-btn.active {
  color: #fff !important;
}
.lang-btn:focus,
.lang-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.lang-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  pointer-events: none;
}

.brand {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.profile-link,
.stats-button,
.records-button,
.suggest-button,
.likes-button {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.profile-link:hover,
.stats-button:hover,
.records-button:hover,
.likes-button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.stats-button {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.3);
}
.records-button {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}
.likes-button {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.3);
}
.suggest-button {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.3);
}
.logout-button {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.15s;
}

.logout-button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.google-icon {
  width: 18px;
  height: 18px;
}

.logout-button {
  color: var(--muted);
}
.login-button-google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.google-icon {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL — 3 COLONNES
   ═══════════════════════════════════════════════════════════ */
.custom-room-page {
  display: grid;
  grid-template-columns: 220px 1fr 460px;
  gap: 16px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  min-height: calc(100vh - var(--header-height));
}

.col-invite {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
}

/* ── Colonne joueurs ── */
.col-players {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 60px);
  overflow-y: auto;
}

.col-players-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.players-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 0;
  text-transform: uppercase;
}

.players-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.players-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.player-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.player-card.is-host {
  border-color: rgba(255, 209, 102, 0.35);
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.player-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-badge {
  font-size: 11px;
  color: var(--accent-gold);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   COLONNE CENTRE
   ═══════════════════════════════════════════════════════════ */
.col-center {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.center-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-icon {
  font-size: 20px;
  color: var(--accent);
}

.center-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.3px;
}

/* ── Settings ── */
.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setting-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* Select playlist */
.playlist-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa3b2' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.playlist-select:focus {
  outline: none;
  border-color: var(--accent);
}

.kick-btn {
  margin-left: auto;
  background: rgba(255, 77, 77, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.kick-btn:hover {
  background: rgba(255, 77, 77, 0.35);
}

.kick-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.kick-modal-box {
  background: #111827;
  border: 1px solid rgba(99, 120, 220, 0.3);
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.kick-modal-text {
  color: #e8eefc;
  font-size: 16px;
  margin-bottom: 24px;
}

.kick-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.kick-modal-confirm {
  padding: 8px 22px;
  background: rgba(255, 77, 77, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 77, 77, 0.35);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.kick-modal-confirm:hover {
  background: rgba(255, 77, 77, 0.3);
}

.kick-modal-cancel {
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.05);
  color: #9aa3b2;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.kick-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Import buttons */
.import-row {
  display: flex;
  gap: 10px;
}

.import-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.import-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}
#btn-import-deezer:hover {
  border-color: #ff6b6b;
  color: #ff8080;
}
#btn-import-spotify:hover {
  border-color: var(--accent-green);
  color: #4ade80;
}

.import-icon {
  font-size: 14px;
}

.imported-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(29, 185, 84, 0.08);
  border: 1px solid rgba(29, 185, 84, 0.3);
  border-radius: 10px;
  font-size: 13px;
  color: #a7f3c0;
}
.imported-icon {
  font-weight: 700;
}

/* ── Sliders ── */
.slider-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-name {
  font-size: 14px;
  color: var(--text);
}
.slider-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform 0.15s;
}
.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--panel);
}

.slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* ── Bouton lancer ── */
.center-footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}
.launch-btn:hover:not(:disabled) {
  background: #4a8ef2;
  transform: translateY(-1px);
}
.launch-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   COLONNE DROITE — Invitation
   ═══════════════════════════════════════════════════════════ */
.col-invite {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - var(--header-height) - 48px);
  position: sticky;
  top: calc(var(--header-height) + 24px);
  overflow: hidden;
}

.invite-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.invite-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.invite-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.qr-container {
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#qr-canvas {
  display: block;
}

.invite-code-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.invite-code-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.invite-code {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

.copy-link-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  background: var(--accent);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.copy-link-btn:hover {
  background: #4a8ef2;
}

.invite-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.invite-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.qr-container {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qr-canvas {
  display: block;
}

.invite-code-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.invite-code-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.invite-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

.copy-link-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.copy-link-btn:hover {
  background: #4a8ef2;
}

.copied-feedback {
  margin: 0;
  font-size: 12px;
  color: #a7f3c0;
  font-weight: 600;
}

.chat-placeholder {
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.chat-placeholder-text {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════
   MODAL D'IMPORT
   ═══════════════════════════════════════════════════════════ */
.import-modal {
  display: none;
}
.import-modal:not(.hidden) {
  display: block;
}
.hidden {
  display: none !important;
}

.import-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 998;
}
.import-modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.import-modal-box h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.import-modal-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.import-url-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
}
.import-url-input:focus {
  outline: none;
  border-color: var(--accent);
}

.import-modal-error {
  font-size: 13px;
  color: var(--danger);
  margin: 0 0 12px;
}

.import-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.modal-btn {
  padding: 9px 22px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-btn.cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}
.modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}
.modal-btn.confirm {
  background: var(--accent);
  color: #fff;
}
.modal-btn.confirm:hover {
  background: #4a8ef2;
}
.modal-btn.confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  border-color: rgba(29, 185, 84, 0.4);
}
.toast.error {
  border-color: rgba(248, 113, 113, 0.4);
}

/* ── Chat lobby ── */
.lobby-chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.lobby-chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.lobby-chat-messages {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px; /* ← était 8px */
}

.chat-empty-hint {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  margin: auto 0;
}

.lobby-chat-msg {
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
  padding: 2px 6px;
  border-radius: 5px;
  margin: 0;
}
.lobby-chat-msg .author {
  font-weight: 700;
  margin-right: 4px;
  /* couleur portée par le style inline depuis JS, plus de color fixe ici */
}

.lobby-chat-input-row {
  display: flex;
  border-top: 1px solid var(--line);
  padding: 10px;
  gap: 8px;
}
.lobby-chat-input {
  flex: 1;
  background: #f0f4ff;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
}
.lobby-chat-input:focus {
  outline: none;
  border-color: var(--accent);
}
.lobby-chat-send {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  width: 38px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
.lobby-chat-send:hover {
  background: #4a8ef2;
}

/* Mobile : 1 colonne */
@media (max-width: 1024px) {
  .col-invite {
    grid-template-columns: 1fr;
    height: auto;
    position: static;
  }
  .lobby-chat {
    min-height: 280px;
    max-height: 400px;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .custom-room-page {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .col-players {
    max-height: 220px;
  }
  .col-center {
    padding: 20px;
  }
}

@media (max-width: 800px) {
  .header-bar {
    height: 48px !important;
    padding: 0 8px !important;
    gap: 6px !important;
  }
  .lang-switcher {
    display: none !important;
  }

  .brand {
    font-size: 13px !important;
  }
  .header-tabs {
    gap: 4px !important;
  }
  .tab-link {
    font-size: 10px !important;
    padding: 4px 5px !important;
  }
  .nav-right .records-button,
  .nav-right .likes-button,
  .nav-right .logout-button,
  .nav-right .profile-link {
    display: none !important;
  }
  .nav-right .stats-button {
    font-size: 11px !important;
    padding: 4px 7px !important;
  }
  .profile-img {
    width: 26px !important;
    height: 26px !important;
  }
  .username {
    display: none !important;
  }
  .login-button-google {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
  .login-button-google span {
    display: inline !important;
  }
  .google-icon {
    width: 14px !important;
    height: 14px !important;
  }

  .import-row {
    flex-direction: column;
  }
  .import-modal-box {
    padding: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════
   À AJOUTER à la fin de public/css/custom-room.css
   ═══════════════════════════════════════════════════════════ */

.join-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  padding: 40px 20px;
}

.join-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 36px;
  width: 460px;
  max-width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.join-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.join-code-badge {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.join-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.4px;
}

.join-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.join-subtitle strong {
  color: var(--accent-gold);
  font-weight: 600;
}

.join-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.join-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.join-info-label {
  color: var(--muted);
}

.join-info-value {
  color: var(--text);
  font-weight: 600;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-form-label {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.join-form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.join-form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.join-btn:hover:not(:disabled) {
  background: #4a8ef2;
  transform: translateY(-1px);
}

.join-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.join-error {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
  text-align: left;
}

.launch-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  text-align: center;
}

.waiting-spinner {
  font-size: 48px;
  text-align: center;
  margin-bottom: 10px;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.waiting-players {
  margin-top: 20px;
  padding: 16px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.waiting-players .section-label {
  text-align: center;
}
.waiting-players-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.waiting-players-list li {
  padding: 8px 12px;
  background: var(--panel);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.center-footer {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.launch-hint {
  margin: 0;
}

@media (max-width: 768px) {
  .suggest-button {
    display: none !important;
  }
}

/* ── Custom dropdown playlist ── */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  background: #f0f4ff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #111;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-align: left;
  font-family: inherit;
}

.dropdown-trigger:hover {
  background: #e8eef8;
  border-color: rgba(0, 0, 0, 0.15);
}

.custom-dropdown.open .dropdown-trigger {
  background: #e8eef8;
  border-color: rgba(0, 0, 0, 0.15);
}

.chevron {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.custom-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.custom-dropdown.open .dropdown-menu {
  display: block;
  animation: ddIn 0.14s ease;
}

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

.dropdown-option {
  padding: 11px 16px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  font-family: inherit;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-option.selected {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.1);
  font-weight: 700;
}


/* ── Hamburger ── */
.hamburger-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  z-index: 998;
}
.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hamburger-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
}
.hamburger-overlay.open {
  display: block;
}

.hamburger-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: #111827;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 20px 0 32px;
  overflow-y: auto;
}
.hamburger-panel.open {
  transform: translateX(0);
}

.hamburger-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #9aa3b2;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.5;
}
.hamburger-close:hover {
  color: #fff;
  opacity: 1;
}

.hamburger-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
  border-bottom: 2px solid rgba(99, 120, 255, 0.5);
}
.hamburger-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.hamburger-username {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hamburger-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 12px;
  flex: 1;
}
.hamburger-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  color: #e8eefc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid transparent;
  transition:
    background 0.15s,
    border-left 0.15s;
}
.hamburger-link:last-child {
  border-bottom: none;
}
.hamburger-link:hover {
  background: rgba(99, 120, 255, 0.08);
  border-left: 3px solid rgba(99, 120, 255, 0.6);
  color: #fff;
}
.hamburger-logout {
  color: #9aa3b2;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
  border-left: 3px solid transparent;
}
.hamburger-logout:hover {
  color: #fff;
  background: rgba(255, 80, 80, 0.08);
  border-left: 3px solid rgba(255, 80, 80, 0.5);
}
.hamburger-suggest {
  margin-top: 8px;
}
.hamburger-login {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.hamburger-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 20px 0;
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }
  .nav-right .profile-link,
  .nav-right .stats-button,
  .nav-right .records-button,
  .nav-right .likes-button,
  .nav-right .suggest-button,
  .nav-right .logout-button,
  .nav-right .login-button-google,
  .nav-right .lang-switcher,
  .nav-right .username,
  .nav-right .profile-img,
  .header-tabs {
    display: none !important;
  }
  .nav-right {
    margin-left: auto;
    display: flex !important;
    align-items: center;
    gap: 8px;
    overflow: visible !important;
  }
  .header-bar {
    height: 56px !important;
    padding: 0 12px !important;
    gap: 0 !important;
  }
}
