/* ─── Reset ─────────────────────────────────────────────────────────────── */
/* Les variables de thème (bg, text, accent, glow…) viennent de theme.css.  */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Noise texture overlay (host screen) ──────────────────────────────────── */

.salon-host::after,
.salon-play::after,
.salon-join::after,
.salon-setup::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9998;
}

/* ─── Setup page ────────────────────────────────────────────────────────────── */

.salon-setup {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 16px 64px;
  position: relative;
  background: var(--bg);
}

.salon-setup::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse,
    rgba(124, 58, 237, 0.14) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: ambientDrift 12s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  from {
    transform: translateX(-50%) translateY(0);
  }
  to {
    transform: translateX(-50%) translateY(40px);
  }
}

.salon-setup-logo {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 6px;
}
.salon-setup-logo span {
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.salon-setup-sub {
  color: var(--mid);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.salon-card {
  background: rgb(var(--c-glass) / 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow:
    0 0 0 1px rgb(var(--c-glass) / 0.04),
    0 32px 64px rgba(0, 0, 0, 0.4);
}

/* ─── Setup 2-column grid ───────────────────────────────────────────────────── */

.salon-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 900px;
}
.salon-setup-grid .salon-card {
  max-width: none;
}
.salon-setup-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  width: 100%;
  max-width: 900px;
}
.salon-join-link {
  font-size: 0.85rem;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.15s;
}
.salon-join-link:hover {
  color: var(--accent2);
}

/* ─── Playlist picker ───────────────────────────────────────────────────────── */

.salon-playlist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.salon-playlist-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgb(var(--c-accent2, 168 85 247) / 0.12);
  border: 1px solid var(--accent2);
  border-radius: 999px;
  padding: 4px 10px 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent2);
  max-width: 200px;
}
.salon-playlist-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.salon-chip-remove {
  background: none;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.salon-chip-remove:hover {
  opacity: 1;
}
.salon-playlist-total {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 10px;
  opacity: 0.8;
}
.salon-playlist-check {
  color: var(--accent2);
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-left: auto;
}
.salon-playlist-search {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  margin-bottom: 8px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.salon-playlist-search:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
.salon-playlist-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
}
.salon-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.salon-playlist-item:hover {
  background: rgb(var(--c-glass) / 0.06);
}
.salon-playlist-item.selected {
  background: rgb(var(--c-accent2, 168 85 247) / 0.08);
  border-color: var(--accent2);
}
.salon-playlist-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.salon-playlist-info {
  flex: 1;
  min-width: 0;
}
.salon-playlist-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.salon-playlist-meta {
  font-size: 0.72rem;
  color: var(--dim);
  margin-top: 1px;
}
.salon-playlist-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent2);
  flex-shrink: 0;
  white-space: nowrap;
}

.salon-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.salon-field {
  margin-bottom: 20px;
}

.salon-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.salon-field select,
.salon-field input[type="range"] {
  width: 100%;
}

.salon-field select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  appearance: none;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.salon-field select:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.salon-range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.salon-range-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent2);
  min-width: 48px;
  text-align: right;
}
.salon-range-num {
  width: 52px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent2);
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  padding: 4px 8px;
  text-align: center;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.salon-range-num:focus {
  outline: none;
  border-color: var(--accent2);
}
.salon-range-num::-webkit-inner-spin-button,
.salon-range-num::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.salon-range-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dim);
  flex-shrink: 0;
}

.salon-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.salon-toggle-row:hover {
  background: var(--surface3);
  border-color: var(--border2);
}
.salon-toggle-label {
  font-size: 0.95rem;
  font-weight: 500;
}
.salon-toggle-desc {
  font-size: 0.78rem;
  color: var(--mid);
  margin-top: 2px;
}

.salon-toggle {
  width: 44px;
  height: 24px;
  background: var(--dim);
  border-radius: 12px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.salon-toggle.on {
  background: var(--accent2);
  box-shadow: 0 0 12px var(--glow-purple);
}
.salon-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.salon-toggle.on::after {
  transform: translateX(20px);
}

.salon-mode-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.salon-mode-btn {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
  user-select: none;
}
.salon-mode-btn:hover {
  background: var(--surface2);
  transform: translateY(-2px);
}
.salon-mode-btn .mode-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}
.salon-mode-btn .mode-name {
  font-size: 0.85rem;
  font-weight: 700;
}
.salon-mode-btn .mode-desc {
  font-size: 0.72rem;
  color: var(--mid);
  margin-top: 3px;
}
.salon-mode-btn.selected {
  border-color: var(--accent2);
  background: rgba(168, 85, 247, 0.1);
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.2),
    0 0 20px rgba(168, 85, 247, 0.08);
}

.salon-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.btn-salon-create {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  margin-top: 8px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  letter-spacing: -0.01em;
}
.btn-salon-create:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
}
.btn-salon-create:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}
.btn-salon-create:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.salon-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 12px;
  text-align: center;
}

.salon-back {
  background: none;
  border: none;
  color: var(--mid);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  transition: color 0.15s;
  align-self: flex-start;
}
.salon-back:hover {
  color: var(--text);
}

/* ─── Host screen ───────────────────────────────────────────────────────────── */

.salon-host {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.salon-host-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  background: rgba(6, 8, 16, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
}

.salon-host-code {
  display: flex;
  align-items: center;
  gap: 12px;
}
.salon-code-label {
  font-size: 0.7rem;
  color: var(--mid);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.salon-code-val {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px var(--glow-purple);
}

.salon-host-qr {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  padding: 4px;
  width: 72px;
  height: 72px;
}
.salon-host-qr img {
  width: 64px;
  height: 64px;
  display: block;
}

.salon-host-round {
  font-size: 0.82rem;
  color: var(--mid);
  text-align: center;
  letter-spacing: 0.02em;
}
.salon-host-round strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.salon-host-qr-sm {
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}

.salon-host-url-full {
  font-size: 0.78rem;
  color: var(--mid);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 14px;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

/* Timer bar */
.salon-timer-bar {
  height: 0;
  background: var(--surface2);
  flex-shrink: 0;
  transition: height 0.25s;
  overflow: hidden;
  position: relative;
}
.salon-timer-bar.active {
  height: 4px;
}
.salon-timer-fill {
  height: 100%;
  transition:
    width 0.9s linear,
    background 0.5s;
  background: var(--success);
  position: relative;
}
.salon-timer-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 40px;
  background: inherit;
  filter: blur(6px);
  opacity: 0.7;
}

/* Main layout */
.salon-host-body {
  display: grid;
  grid-template-columns: 1fr 270px;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.salon-host-center {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Stage: fills center, panels overlay each other */
.salon-host-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

.salon-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.salon-panel.active {
  opacity: 1;
  pointer-events: auto;
}

/* YouTube fills its panel entirely */
.salon-panel #salon-yt-player {
  width: 100%;
  height: 100%;
  display: block;
}
.salon-panel #salon-yt-player iframe {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border: none;
}

/* Info area below stage */
.salon-host-info {
  flex-shrink: 0;
  max-height: 40%;
  overflow-y: auto;
  width: 100%;
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: rgba(6, 8, 16, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* During summary/gameover: stage fixed at 58%, info fills the rest */
.salon-host-center.phase-summary .salon-host-stage {
  flex: 0 0 58%;
  min-height: 0;
}
.salon-host-center.phase-summary .salon-host-info {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  align-items: stretch;
  padding: 0;
  gap: 0;
}
/* Gameover keeps its own centered layout inside the expanded info area */
.salon-host-center.phase-summary .salon-gameover {
  overflow-y: auto;
  height: 100%;
  justify-content: center;
}
.salon-info-placeholder {
  height: 1px;
}

/* ─── Lobby panel (host) ────────────────────────────────────────────────────── */

.salon-lobby {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  width: 100%;
  position: relative;
}

/* Ambient glow behind the QR */
.salon-lobby::before {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: ambientDrift 10s ease-in-out infinite alternate;
}

.salon-lobby-qr-wrap {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.25),
    0 0 50px rgba(168, 85, 247, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.5);
  animation: qrFloat 4s ease-in-out infinite alternate;
}

@keyframes qrFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

.salon-lobby-qr {
  display: block;
  border-radius: 6px;
}

.salon-lobby-code {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px var(--glow-purple);
  line-height: 1;
}

.salon-lobby-url {
  font-size: 0.95rem;
  color: var(--mid);
  background: var(--surface2);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 20px;
  letter-spacing: 0.01em;
}

.salon-lobby-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.salon-player-count {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent2);
  text-shadow: 0 0 20px var(--glow-purple);
  line-height: 1;
}
.salon-lobby-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--mid);
}

/* ─── Round stage (host) ────────────────────────────────────────────────────── */

.salon-round-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 16px;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.salon-big-timer {
  font-size: 7rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--success);
  transition:
    color 0.4s,
    filter 0.4s;
  filter: drop-shadow(0 0 24px var(--glow-green));
  font-variant-numeric: tabular-nums;
}
.salon-big-timer.ok {
  color: var(--success);
  filter: drop-shadow(0 0 24px var(--glow-green));
}
.salon-big-timer.warn {
  color: var(--warn);
  filter: drop-shadow(0 0 24px var(--glow-yellow));
}
.salon-big-timer.danger {
  color: var(--danger);
  filter: drop-shadow(0 0 30px var(--glow-red));
  animation: pulseScale 0.5s infinite;
}

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

.salon-phrase {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mid);
  text-align: center;
  letter-spacing: 0.01em;
  max-width: 400px;
}

/* Visualizer — CSS animated bars */
.salon-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 72px;
}
.salon-vis-bar {
  width: 8px;
  border-radius: 5px;
  background: linear-gradient(to top, var(--accent), var(--accent2), #e879f9);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
  animation: visBar 0.9s ease-in-out infinite alternate;
}
.salon-vis-bar:nth-child(1) {
  height: 30%;
  animation-duration: 0.7s;
  animation-delay: 0s;
}
.salon-vis-bar:nth-child(2) {
  height: 60%;
  animation-duration: 1.1s;
  animation-delay: 0.04s;
}
.salon-vis-bar:nth-child(3) {
  height: 90%;
  animation-duration: 0.8s;
  animation-delay: 0.08s;
}
.salon-vis-bar:nth-child(4) {
  height: 45%;
  animation-duration: 1.3s;
  animation-delay: 0.12s;
}
.salon-vis-bar:nth-child(5) {
  height: 75%;
  animation-duration: 0.6s;
  animation-delay: 0.16s;
}
.salon-vis-bar:nth-child(6) {
  height: 55%;
  animation-duration: 1s;
  animation-delay: 0.2s;
}
.salon-vis-bar:nth-child(7) {
  height: 85%;
  animation-duration: 0.9s;
  animation-delay: 0.24s;
}
.salon-vis-bar:nth-child(8) {
  height: 40%;
  animation-duration: 1.2s;
  animation-delay: 0.28s;
}
.salon-vis-bar:nth-child(9) {
  height: 70%;
  animation-duration: 0.75s;
  animation-delay: 0.32s;
}
.salon-vis-bar:nth-child(10) {
  height: 50%;
  animation-duration: 1.1s;
  animation-delay: 0.36s;
}
.salon-vis-bar:nth-child(11) {
  height: 65%;
  animation-duration: 0.85s;
  animation-delay: 0.4s;
}
.salon-vis-bar:nth-child(12) {
  height: 35%;
  animation-duration: 0.95s;
  animation-delay: 0.44s;
}
.salon-vis-bar:nth-child(13) {
  height: 80%;
  animation-duration: 0.72s;
  animation-delay: 0.48s;
}
.salon-vis-bar:nth-child(14) {
  height: 48%;
  animation-duration: 1.05s;
  animation-delay: 0.52s;
}
.salon-vis-bar:nth-child(15) {
  height: 62%;
  animation-duration: 0.88s;
  animation-delay: 0.56s;
}
.salon-vis-bar:nth-child(16) {
  height: 38%;
  animation-duration: 1.15s;
  animation-delay: 0.6s;
}
.salon-vis-bar:nth-child(17) {
  height: 72%;
  animation-duration: 0.78s;
  animation-delay: 0.64s;
}
.salon-vis-bar:nth-child(18) {
  height: 42%;
  animation-duration: 0.98s;
  animation-delay: 0.68s;
}

@keyframes visBar {
  from {
    transform: scaleY(0.2);
    opacity: 0.45;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Finders chips (host round) */
.salon-finders {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 16px;
}
.salon-finder-chip {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--success);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  animation: chipIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.12);
}
@keyframes chipIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Summary + Gameover (host info area) ───────────────────────────────────── */

.salon-summary {
  background: rgb(var(--c-glass) / 0.04);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 20px 28px;
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
  animation: slideUpFade 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.salon-summary-reason {
  font-size: 0.8rem;
  color: var(--mid);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.salon-summary-answer {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.salon-summary-first {
  font-size: 0.85rem;
  color: var(--accent2);
  margin-top: 8px;
  font-weight: 700;
}
.salon-summary-cover {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  margin: 12px auto 0;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

/* Gameover */
.salon-gameover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 36px 24px;
  width: 100%;
  animation: slideUpFade 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.salon-gameover h2 {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.salon-gameover-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Salon host podium ─────────────────────────────────────────────────────── */
.salon-go-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 600px;
  padding: 0 8px;
}
.salon-go-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 180px;
}
.salon-go-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6) translateY(24px);
  width: 100%;
}
.salon-go-player.salon-go-revealed {
  visibility: visible;
  animation: salonPodiumReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes salonPodiumReveal {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.salon-go-player.salon-go-placeholder {
  animation: none !important;
  opacity: 0.3;
}
.salon-go-avatar.empty {
  background: transparent;
  border-style: dashed;
  color: var(--mid);
  font-size: 1.1rem;
}
.salon-go-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  flex-shrink: 0;
}
.salon-go-slot.pos-1 .salon-go-avatar {
  width: 68px;
  height: 68px;
  font-size: 1.8rem;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.4);
}
.salon-go-name {
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.salon-go-score {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
}
.salon-go-block {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
}
.salon-go-block.pos-1 {
  height: 88px;
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.3);
}
.salon-go-block.pos-2 {
  height: 64px;
  background: rgba(148, 163, 184, 0.07);
  border-color: rgba(148, 163, 184, 0.22);
}
.salon-go-block.pos-3 {
  height: 46px;
  background: rgba(205, 127, 50, 0.07);
  border-color: rgba(205, 127, 50, 0.22);
}
/* Rest list (rank 4+) */
.salon-go-rest {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 520px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
/* Confetti (reused from game, defined here for salon host scope) */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -12px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

/* ─── Players sidebar ───────────────────────────────────────────────────────── */

.salon-host-sidebar {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(6, 8, 16, 0.5);
}
.salon-sidebar-title {
  padding: 12px 16px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
.salon-players-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.salon-player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  transition:
    background 0.2s,
    transform 0.15s;
}
.salon-player-row:hover {
  background: var(--surface2);
  transform: translateX(2px);
}
.salon-player-rank {
  font-size: 0.72rem;
  color: var(--dim);
  min-width: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.salon-player-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.salon-player-score {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent2);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Per-element found indicators */
.salon-player-found {
  display: flex;
  gap: 2px;
  align-items: center;
}
.found-el {
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 0.2s;
}
.found-el:not(.empty) {
  animation: foundPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.found-el.empty {
  opacity: 0.15;
}
@keyframes foundPop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer controls */
.salon-host-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(6, 8, 16, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

.btn-salon-start {
  padding: 12px 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  letter-spacing: -0.01em;
}
.btn-salon-start:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
}
.btn-salon-start:active {
  transform: scale(0.97);
}
.btn-salon-start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-salon-next {
  padding: 11px 28px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  letter-spacing: -0.01em;
}
.btn-salon-next:hover {
  background: var(--surface3);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.btn-salon-next:active {
  transform: scale(0.97);
}

.salon-auto-next {
  font-size: 0.85rem;
  color: var(--mid);
}
.salon-auto-next strong {
  color: var(--accent2);
  font-weight: 800;
}

/* ─── Scores table ───────────────────────────────────────────────────────────── */

.salon-scores-table {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: slideUpFade 0.4s 0.08s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.salon-scores-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.salon-scores-row:last-child {
  border-bottom: none;
}
.salon-scores-row.top {
  background: rgba(168, 85, 247, 0.08);
}
.salon-scores-medal {
  font-size: 1.1rem;
  text-align: center;
}
.salon-scores-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.salon-scores-pts {
  font-weight: 800;
  color: var(--accent2);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* ─── Play screen (phone) ───────────────────────────────────────────────────── */

.salon-play {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}

.salon-play::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(
    ellipse,
    rgba(124, 58, 237, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: ambientDrift 10s ease-in-out infinite alternate;
}

.salon-play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.salon-play-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mid);
  letter-spacing: 0.01em;
}
.salon-play-score {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--accent2);
  text-shadow: 0 0 16px var(--glow-purple);
  font-variant-numeric: tabular-nums;
}

/* Timer bar (top of play screen, inside RoundPlay) */
.salon-timer-bar {
  height: 0;
  overflow: hidden;
  transition: height 0.2s;
  position: relative;
  width: 100%;
  flex-shrink: 0;
  background: var(--surface2);
}
.salon-timer-bar + * {
  /* ensures the bar is flush */
}
/* When used inside play body (RoundPlay renders it) */
.salon-play-body .salon-timer-bar,
.salon-play-body > .salon-timer-bar {
  height: 4px;
  margin: 0 -16px;
  width: calc(100% + 32px);
}

/* Override for always-visible in play mode */
.salon-play-body .salon-timer-bar {
  height: 4px !important;
}

.salon-timer-fill {
  height: 100%;
  transition: width 0.9s linear;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  position: relative;
}

.salon-play-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 40px;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.salon-play-round {
  text-align: center;
  color: var(--mid);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.salon-play-round strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

/* ─── SVG Arc Timer (play screen) ───────────────────────────────────────────── */

.salon-timer-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}
.salon-timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.timer-track {
  fill: none;
  stroke: rgb(var(--c-glass) / 0.07);
  stroke-width: 7;
}
.timer-arc {
  fill: none;
  stroke: var(--success);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  transition:
    stroke-dashoffset 0.9s linear,
    stroke 0.4s,
    filter 0.4s;
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5));
}
.timer-arc.warning {
  stroke: var(--warn);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}
.timer-arc.danger {
  stroke: var(--danger);
  filter: drop-shadow(0 0 10px rgba(248, 113, 113, 0.6));
}
.salon-timer-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
  letter-spacing: -0.03em;
}
.salon-timer-num.warning {
  color: var(--warn);
}
.salon-timer-num.danger {
  color: var(--danger);
  animation: pulseScale 0.5s infinite;
}

/* ─── Progress chips (free mode) ────────────────────────────────────────────── */

.salon-progress-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.salon-progress-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--dim);
  transition: all 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
  background: var(--surface);
}
.salon-progress-chip.found {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--success);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.15);
  transform: scale(1.05);
}

/* ─── All found state ────────────────────────────────────────────────────────── */

.salon-all-found {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: slideUpFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.salon-all-found-emoji {
  font-size: 3rem;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes bounceIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.salon-all-found-text {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--success);
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
  letter-spacing: -0.02em;
}
.salon-all-found-sub {
  font-size: 0.85rem;
  color: var(--mid);
}

/* ─── Music loading state ────────────────────────────────────────────────────── */

.salon-music-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--mid);
  font-size: 0.9rem;
}

/* ─── Free text input ────────────────────────────────────────────────────────── */

.salon-play-guess {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.salon-play-guess input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1.1rem;
  padding: 15px 18px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  -webkit-font-smoothing: antialiased;
}
.salon-play-guess input:focus {
  border-color: var(--accent2);
  background: var(--surface3);
  box-shadow:
    0 0 0 3px rgba(168, 85, 247, 0.15),
    0 0 20px rgba(168, 85, 247, 0.08);
}
.salon-play-guess input::placeholder {
  color: var(--dim);
}

.btn-salon-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  letter-spacing: -0.01em;
}
.btn-salon-submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
}
.btn-salon-submit:active:not(:disabled) {
  transform: scale(0.97);
}
.btn-salon-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--surface3);
  box-shadow: none;
}

/* ─── Multiple choice (Kahoot-style) ─────────────────────────────────────────── */

/* Host TV view: smaller, non-interactive */
.salon-host-choices .salon-choice-btn {
  min-height: 64px;
  font-size: 0.78rem;
  padding: 10px 8px 12px;
  cursor: default;
  pointer-events: none;
}
.salon-host-choices .salon-choice-btn::after {
  display: none;
}

.salon-choices {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.salon-choice-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 12px 16px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition:
    opacity 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.salon-choice-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(var(--c-glass) / 0);
  transition: background 0.15s;
}
.salon-choice-btn:hover:not(:disabled)::after {
  background: rgb(var(--c-glass) / 0.08);
}
.salon-choice-btn:active:not(:disabled) {
  transform: scale(0.96);
}
.salon-choice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── QCM: waiting state (player has clicked, awaiting round end) ── */
.salon-choice-btn.is-selected {
  outline: 3px solid rgb(var(--c-glass) / 0.85);
  outline-offset: 2px;
  opacity: 1;
  transform: scale(1.02);
}
.salon-choice-btn.is-waiting {
  opacity: 0.32;
  filter: saturate(0.4);
}

/* ── QCM: reveal states (shown for 2s after round ends) ── */
.salon-choice-btn.reveal-correct {
  background: linear-gradient(135deg, #16a34a, #4ade80) !important;
  box-shadow:
    0 0 0 3px rgba(74, 222, 128, 0.6),
    0 8px 32px rgba(74, 222, 128, 0.45) !important;
  opacity: 1 !important;
  transform: scale(1.04);
  animation: revealPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.salon-choice-btn.reveal-wrong {
  background: linear-gradient(135deg, #7f1d1d, #ef4444) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.4) !important;
  opacity: 1 !important;
}
.salon-choice-btn.reveal-neutral {
  opacity: 0.2 !important;
  filter: saturate(0) brightness(0.6);
}

@keyframes revealPop {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1.04);
  }
}

/* ── QCM: "answer locked" waiting message ── */
.salon-qcm-waiting {
  text-align: center;
  color: var(--mid);
  font-size: 0.82rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.salon-qcm-waiting .waiting-dots span {
  animation: dotPulse 1.2s ease-in-out infinite;
  display: inline-block;
  font-size: 0.6rem;
  opacity: 0.5;
}
.salon-qcm-waiting .waiting-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.salon-qcm-waiting .waiting-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

/* Kahoot-style shape icons */
.choice-shape {
  font-size: 1.5rem;
  line-height: 1;
  display: block;
}
.c0 .choice-shape::before {
  content: "▲";
}
.c1 .choice-shape::before {
  content: "◆";
}
.c2 .choice-shape::before {
  content: "●";
  color: inherit;
}
.c3 .choice-shape::before {
  content: "■";
}

.choice-text {
  display: block;
  font-size: 0.85rem;
}

.salon-choice-btn.c0 {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}
.salon-choice-btn.c1 {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.35);
}
.salon-choice-btn.c2 {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.35);
  color: #fff;
}
.salon-choice-btn.c3 {
  background: linear-gradient(135deg, #15803d, #22c55e);
  box-shadow: 0 4px 20px rgba(21, 128, 61, 0.35);
}
.salon-choice-btn:hover:not(:disabled).c0 {
  box-shadow: 0 6px 28px rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
}
.salon-choice-btn:hover:not(:disabled).c1 {
  box-shadow: 0 6px 28px rgba(29, 78, 216, 0.5);
  transform: translateY(-2px);
}
.salon-choice-btn:hover:not(:disabled).c2 {
  box-shadow: 0 6px 28px rgba(217, 119, 6, 0.5);
  transform: translateY(-2px);
}
.salon-choice-btn:hover:not(:disabled).c3 {
  box-shadow: 0 6px 28px rgba(21, 128, 61, 0.5);
  transform: translateY(-2px);
}

/* ─── Feedback overlay ───────────────────────────────────────────────────────── */

.salon-feedback {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
}

@media (max-width: 640px) {
  .salon-feedback {
    align-items: flex-start;
    padding-top: 18dvh;
  }
}
.salon-feedback-inner {
  background: rgba(6, 8, 16, 0.7);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgb(var(--c-glass) / 0.1);
  border-radius: 24px;
  padding: 36px 56px;
  text-align: center;
  animation: feedbackPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}
.salon-feedback-inner.is-correct {
  border-color: rgba(74, 222, 128, 0.25);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(74, 222, 128, 0.1);
}
.salon-feedback-inner.is-close {
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(251, 191, 36, 0.1);
}
.salon-feedback-inner.is-wrong {
  border-color: rgba(248, 113, 113, 0.2);
}

.salon-feedback-emoji {
  font-size: 3.5rem;
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}
.salon-feedback-msg {
  font-size: 1.4rem;
  font-weight: 900;
  margin-top: 10px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.salon-feedback-inner.is-correct .salon-feedback-msg {
  color: var(--success);
}
.salon-feedback-inner.is-close .salon-feedback-msg {
  color: var(--warn);
}
.salon-feedback-inner.is-wrong .salon-feedback-msg {
  color: var(--danger);
}

.salon-feedback-pts {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent2);
  margin-top: 6px;
  text-shadow: 0 0 16px var(--glow-purple);
}

@keyframes feedbackPop {
  from {
    opacity: 0;
    transform: scale(0.65) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ─── Round end / game over (play screen) ────────────────────────────────────── */

.salon-play-roundend {
  width: 100%;
  background: rgb(var(--c-glass) / 0.04);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  animation: slideUpFade 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.salon-play-roundend .answer {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.salon-play-roundend .cover {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ─── Join screen ────────────────────────────────────────────────────────────── */

.salon-join {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px 16px;
  gap: 20px;
  background: var(--bg);
  position: relative;
}

.salon-join::before {
  content: "";
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 500px;
  background: radial-gradient(
    ellipse,
    rgba(124, 58, 237, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: ambientDrift 10s ease-in-out infinite alternate;
}

.salon-join-logo {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}
.salon-join-logo span {
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.salon-join-card {
  background: rgb(var(--c-glass) / 0.04);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 30px 26px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow:
    0 0 0 1px rgb(var(--c-glass) / 0.04),
    0 40px 80px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}
.salon-join-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
}
.salon-join-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.salon-join-field label {
  font-size: 0.72rem;
  color: var(--mid);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.salon-join-field input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.05rem;
  padding: 13px 16px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
}
.salon-join-field input.normal {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}
.salon-join-field input:focus {
  border-color: var(--accent2);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}
.salon-join-field input::placeholder {
  color: var(--dim);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.btn-salon-join {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  letter-spacing: -0.01em;
}
.btn-salon-join:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.55);
}
.btn-salon-join:active:not(:disabled) {
  transform: scale(0.97);
}
.btn-salon-join:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── Waiting lobby (play screen) ───────────────────────────────────────────── */

.salon-play-lobby {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 0;
}
.salon-play-lobby .waiting-dots {
  display: flex;
  gap: 8px;
}
.salon-play-lobby .waiting-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent2);
  animation: dotPulse 1.4s ease-in-out infinite;
}
.salon-play-lobby .waiting-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.salon-play-lobby .waiting-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes dotPulse {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Scores list (play screen) ──────────────────────────────────────────────── */

.salon-play-scores {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideUpFade 0.4s 0.05s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.salon-play-score-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: background 0.2s;
}
.salon-play-score-row.me {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.08);
}
.salon-play-score-rank {
  color: var(--mid);
  font-size: 0.82rem;
  text-align: center;
}
.salon-play-score-name {
  font-weight: 600;
}
.salon-play-score-pts {
  font-weight: 900;
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── Summary scores header (play screen) ───────────────────────────────────── */

.salon-play-scores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2px;
  margin-bottom: 2px;
}
.salon-play-scores-round {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
}
.salon-play-scores-round-of {
  color: var(--dim);
  font-weight: 500;
}
.salon-play-scores-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
}

/* Delta badge shared by play + host */
.salon-score-delta {
  font-size: 0.68em;
  font-weight: 700;
  color: var(--success);
  margin-left: 3px;
  vertical-align: super;
}

/* ─── Host summary 2-col layout ─────────────────────────────────────────────── */

.salon-host-summary-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  align-items: stretch;
}

/* Left column: track info, scrollable if too tall */
.salon-host-summary-layout .salon-summary {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  border-radius: 0;
  border-top: none;
  border-bottom: none;
  border-left: none;
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  margin: 0;
  animation: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.salon-host-summary-layout .salon-summary-cover {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  margin: 0 0 4px;
}
.salon-host-summary-layout .salon-summary-answer {
  font-size: 1.6rem;
}
.salon-host-summary-layout .salon-summary-reason {
  font-size: 0.85rem;
}
.salon-host-summary-layout .salon-summary-first {
  font-size: 0.95rem;
}

/* Right column: leaderboard fills height, table scrolls */
.salon-host-scores-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 14px 20px 14px 16px;
  gap: 10px;
}
.salon-host-round-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
  flex-shrink: 0;
}
.salon-host-round-of {
  color: var(--dim);
  font-weight: 500;
}
.salon-host-scores-col .salon-scores-table {
  flex: 1;
  overflow-y: auto;
  max-width: none;
  min-height: 0;
  border-radius: 10px;
}

/* ─── Partial badge on host sidebar ─────────────────────────────────────────── */

.salon-player-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.salon-player-badge.ok {
  background: rgba(74, 222, 128, 0.18);
  color: var(--success);
}
.salon-player-badge.ko {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}
.salon-player-badge.wait {
  background: var(--surface2);
  color: var(--mid);
}
.salon-player-badge.partial {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

/* ─── Shared keyframes ───────────────────────────────────────────────────────── */

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

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .salon-host-body {
    grid-template-columns: 1fr;
  }
  .salon-host-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 160px;
    flex-shrink: 0;
  }
  .salon-players-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 8px;
  }
  .salon-player-row {
    min-width: 120px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .salon-lobby-code {
    font-size: 3rem;
  }
  .salon-big-timer {
    font-size: 5rem;
  }
}

@media (max-width: 760px) {
  .salon-setup-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .salon-setup-actions {
    max-width: 520px;
  }
}

@media (max-width: 640px) {
  .salon-host-url-full {
    display: none;
  }
  .salon-code-val {
    font-size: 1.3rem;
  }
  .salon-choices {
    grid-template-columns: 1fr 1fr;
  }
  .salon-choice-btn {
    min-height: 80px;
  }
  /* Sur mobile (écran joueur) : les boutons remplissent l'espace restant */
  .salon-play-body .salon-choices {
    flex: 1;
    align-self: stretch;
    grid-auto-rows: 1fr;
  }
  .salon-play-body .salon-choice-btn {
    min-height: unset;
    height: 100%;
  }
  .salon-lobby-code {
    font-size: 2.5rem;
    letter-spacing: 0.2em;
  }
  .salon-lobby-qr-wrap {
    padding: 10px;
  }
}

@media (max-width: 420px) {
  .salon-choices {
    grid-template-columns: 1fr 1fr;
  }
  .salon-timer-wrap {
    width: 110px;
    height: 110px;
  }
  .salon-feedback-inner {
    padding: 28px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .salon-timer-fill,
  .timer-arc {
    transition: none !important;
  }
}
