/* ============================================================
   Agora Live Arena — game.css
   Dark real-time classroom mode.
   Palette: deep olive · rich brown · dark charcoal · gold #c9a44a
   Fonts: Raleway (UI chrome) · Cormorant Garamond (content)
   ============================================================ */

/* ── Scoped custom properties ──────────────────────────── */
#la-overlay {
  --la-base:      #0d0b08;
  --la-panel:     #151009;
  --la-panel-2:   #1c140d;
  --la-border:    rgba(201,164,74,0.18);
  --la-gold:      #c9a44a;
  --la-gold-dim:  rgba(201,164,74,0.38);
  --la-olive:     #3a5c25;
  --la-olive-dk:  #243a17;
  --la-text:      #e8dfc8;
  --la-muted:     #8a7a60;
  --la-correct:   #4a9e5c;
  --la-wrong:     #c0392b;
}

/* ── Overlay shell ──────────────────────────────────────── */
#la-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: stretch;
  background: var(--la-base);
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.la-close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  background: transparent;
  border: 1px solid var(--la-border);
  color: var(--la-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Raleway', sans-serif;
}
.la-close-btn:hover {
  color: var(--la-text);
  border-color: var(--la-gold-dim);
}

/* ── Screen management ──────────────────────────────────── */
#la-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.la-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.la-screen.la-active {
  display: flex;
  animation: la-screen-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes la-screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   HOST — LOBBY
════════════════════════════════════════════════════════════ */

#la-host-lobby {
  background:
    radial-gradient(ellipse at 65% 25%, rgba(58,92,37,0.13) 0%, transparent 55%),
    radial-gradient(ellipse at 30% 80%, rgba(61,36,16,0.2)  0%, transparent 50%),
    var(--la-base);
  align-items: center;
}

.la-lobby-topbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem 3rem 0;
  flex-shrink: 0;
}

.la-lobby-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--la-gold);
  opacity: 0.65;
  margin-bottom: 6px;
}

.la-lobby-gamename {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 300;
  color: var(--la-text);
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.la-lobby-q-count {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  color: var(--la-muted);
  letter-spacing: 1.5px;
  padding-top: 4px;
}

/* PIN block */
.la-pin-block {
  margin: 2rem 0 0;
  text-align: center;
  padding: 2.25rem 5rem;
  border: 1px solid var(--la-border);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  min-width: 340px;
  position: relative;
}
.la-pin-block::before,
.la-pin-block::after {
  content: '';
  position: absolute;
  left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--la-gold) 50%, transparent 100%);
  opacity: 0.45;
}
.la-pin-block::before { top: -1px; }
.la-pin-block::after  { bottom: -1px; }

.la-pin-label {
  font-family: 'Raleway', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--la-muted);
  margin-bottom: 1rem;
}

.la-pin-display {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(52px, 9vw, 86px);
  font-weight: 300;
  color: var(--la-gold);
  letter-spacing: 12px;
  line-height: 1;
  text-shadow: 0 0 50px rgba(201, 164, 74, 0.35);
}

.la-pin-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  color: var(--la-muted);
  letter-spacing: 0.5px;
  margin-top: 1rem;
  opacity: 0.55;
}

/* Players grid */
.la-players-section {
  width: 100%;
  max-width: 860px;
  margin: 1.75rem auto 0;
  padding: 0 3rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.la-players-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--la-muted);
  flex-shrink: 0;
}

.la-player-badge {
  background: var(--la-olive-dk);
  border: 1px solid rgba(106,135,82,0.4);
  color: #8eba72;
  font-size: 13px;
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 999px;
  letter-spacing: 0;
  min-width: 28px;
  text-align: center;
  font-family: 'Raleway', sans-serif;
}

.la-player-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-y: auto;
  padding: 2px 0 8px;
  flex: 1;
  min-height: 60px;
  align-content: flex-start;
}
.la-player-grid::-webkit-scrollbar { width: 4px; }
.la-player-grid::-webkit-scrollbar-track { background: transparent; }
.la-player-grid::-webkit-scrollbar-thumb { background: var(--la-border); border-radius: 2px; }

.la-player-chip {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--la-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--la-border);
  padding: 5px 14px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.82) translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.la-player-chip.la-chip-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.la-start-btn {
  margin: 1.5rem auto 2.5rem;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--la-base);
  background: var(--la-gold);
  border: none;
  padding: 16px 52px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
  clip-path: polygon(8px 0%, calc(100% - 8px) 0%, 100% 8px,
             100% calc(100% - 8px), calc(100% - 8px) 100%,
             8px 100%, 0% calc(100% - 8px), 0% 8px);
}
.la-start-btn:hover:not(:disabled) {
  background: #dbb55e;
  transform: translateY(-2px);
}
.la-start-btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

/* ════════════════════════════════════════════════════════════
   HOST — QUESTION
════════════════════════════════════════════════════════════ */

#la-host-question {
  background: var(--la-base);
}

.la-hq-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2.5rem;
  border-bottom: 1px solid var(--la-border);
  flex-shrink: 0;
}

.la-hq-game-tag {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--la-gold);
  opacity: 0.7;
}

.la-hq-qnum {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  color: var(--la-text);
  letter-spacing: 0.5px;
}

.la-hq-ans-badge {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  color: var(--la-muted);
  letter-spacing: 0.5px;
}
.la-hq-ans-badge strong {
  color: var(--la-text);
  font-weight: 700;
}

.la-hq-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 2.5rem 3rem;
  min-height: 0;
  overflow: hidden;
}

/* Timer ring */
.la-timer-wrap {
  flex-shrink: 0;
  position: relative;
  width: 128px;
  height: 128px;
}
.la-timer-svg {
  width: 128px;
  height: 128px;
  transform: rotate(-90deg);
}
.la-timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 5;
}
.la-timer-arc {
  fill: none;
  stroke: #4a9e5c;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s linear, stroke 0.4s;
}
.la-hq-timer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Raleway', sans-serif;
  font-size: 42px;
  font-weight: 200;
  color: var(--la-text);
  letter-spacing: -1px;
}

.la-hq-question-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 660px;
  min-width: 0;
}

.la-hq-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 400;
  color: var(--la-text);
  line-height: 1.45;
}

.la-hq-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.la-hq-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--la-border);
  border-radius: 2px;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  color: var(--la-text);
  min-height: 44px;
}

.la-opt-ltr {
  font-weight: 700;
  color: var(--la-gold);
  opacity: 0.75;
  min-width: 16px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   HOST — RESULTS
════════════════════════════════════════════════════════════ */

#la-host-results {
  background: var(--la-base);
  padding: 2.25rem 3rem 2rem;
  gap: 1.5rem;
  overflow-y: auto;
}

.la-hr-qtext {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(17px, 2.2vw, 24px);
  font-weight: 400;
  color: var(--la-text);
  opacity: 0.8;
  line-height: 1.45;
  border-left: 3px solid var(--la-gold);
  padding-left: 1rem;
  flex-shrink: 0;
}

.la-hr-body {
  display: flex;
  gap: 3rem;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
}

/* Bar chart */
.la-hr-chart {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.la-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.la-bar-ltr {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--la-muted);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.la-bar-correct .la-bar-ltr { color: var(--la-gold); }

.la-bar-track {
  flex: 1;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--la-border);
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}

.la-bar-fill {
  height: 100%;
  width: 0;
  background: rgba(255, 255, 255, 0.12);
  transition: width 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 1px;
}

.la-bar-correct .la-bar-fill {
  background: linear-gradient(90deg,
    rgba(201, 164, 74, 0.6) 0%,
    rgba(201, 164, 74, 0.3) 100%);
}

.la-bar-cnt {
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--la-text);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* Leaderboard */
.la-hr-lb {
  min-width: 240px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.la-lb-title {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--la-gold);
  opacity: 0.65;
  margin-bottom: 2px;
}

.la-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--la-border);
  border-radius: 2px;
}

.la-lb-medal {
  font-size: 15px;
  min-width: 22px;
  flex-shrink: 0;
}

.la-lb-name {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  color: var(--la-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.la-lb-score {
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--la-gold);
  flex-shrink: 0;
}

.la-hr-footer {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
  flex-shrink: 0;
}

.la-next-btn {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--la-base);
  background: var(--la-gold);
  border: none;
  padding: 13px 44px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px,
             100% calc(100% - 6px), calc(100% - 6px) 100%,
             6px 100%, 0% calc(100% - 6px), 0% 6px);
}
.la-next-btn:hover { background: #dbb55e; transform: translateY(-1px); }

/* ════════════════════════════════════════════════════════════
   STUDENT — JOIN
════════════════════════════════════════════════════════════ */

#la-join {
  background:
    radial-gradient(ellipse at 40% 55%, rgba(58, 92, 37, 0.1) 0%, transparent 55%),
    var(--la-base);
  align-items: center;
  justify-content: center;
}

.la-join-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  max-width: 360px;
  padding: 0 1.5rem;
}

.la-join-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  font-weight: 300;
  color: var(--la-text);
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.15;
}
.la-join-logo em {
  font-style: italic;
  color: var(--la-gold);
  font-size: 26px;
  letter-spacing: 0.3px;
}

.la-join-divider {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--la-gold-dim), transparent);
  margin: 0.25rem 0;
}

.la-join-prompt {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--la-muted);
}

.la-pin-input {
  width: 100%;
  font-family: 'Raleway', sans-serif;
  font-size: 44px;
  font-weight: 300;
  letter-spacing: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--la-border);
  border-radius: 2px;
  color: var(--la-gold);
  padding: 16px 8px;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
  caret-color: var(--la-gold);
  appearance: textfield;
  -moz-appearance: textfield;
}
.la-pin-input:focus {
  border-color: var(--la-gold-dim);
  background: rgba(201, 164, 74, 0.05);
}
.la-pin-input::placeholder {
  color: rgba(201, 164, 74, 0.18);
  letter-spacing: 10px;
}

.la-join-error {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  color: #e87575;
  text-align: center;
  min-height: 17px;
  letter-spacing: 0.3px;
}

.la-join-btn {
  width: 100%;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--la-base);
  background: var(--la-gold);
  border: none;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s;
  clip-path: polygon(6px 0%, calc(100% - 6px) 0%, 100% 6px,
             100% calc(100% - 6px), calc(100% - 6px) 100%,
             6px 100%, 0% calc(100% - 6px), 0% 6px);
}
.la-join-btn:hover:not(:disabled) { background: #dbb55e; }
.la-join-btn:disabled { opacity: 0.45; cursor: default; }

.la-join-cancel {
  background: transparent;
  border: none;
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--la-muted);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}
.la-join-cancel:hover { color: var(--la-text); }

/* ════════════════════════════════════════════════════════════
   STUDENT — LOBBY WAIT
════════════════════════════════════════════════════════════ */

#la-student-lobby {
  background: var(--la-base);
  align-items: center;
  justify-content: center;
}

.la-sl-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem;
}

/* Repeating Greek key meander band */
.la-greek-key {
  width: 100%;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16'%3E%3Cpath d='M0,8 H4 V2 H28 V14 H8 V8 H20 V12 H12 V8 H32' stroke='%23c9a44a' stroke-width='1.2' fill='none' opacity='0.32'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 center;
  background-size: 32px 16px;
  flex-shrink: 0;
}

.la-sl-pulse-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
}

.la-sl-icon {
  font-size: 3.75rem;
  color: var(--la-gold);
  line-height: 1;
  animation: la-pulse-icon 2.4s ease-in-out infinite;
  user-select: none;
}

@keyframes la-pulse-icon {
  0%, 100% { opacity: 0.2; transform: scale(0.87); }
  50%       { opacity: 0.95; transform: scale(1.1); }
}

.la-sl-game {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--la-text);
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.la-sl-status {
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--la-muted);
  text-align: center;
  animation: la-pulse-text 2.4s ease-in-out infinite;
}

@keyframes la-pulse-text {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.8; }
}

/* ════════════════════════════════════════════════════════════
   STUDENT — QUESTION
════════════════════════════════════════════════════════════ */

#la-student-question {
  background: #09070404;
  background: var(--la-base);
  gap: 0;
}

.la-sq-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 1.5rem;
  border-bottom: 1px solid var(--la-border);
  flex-shrink: 0;
}

.la-sq-timer {
  font-family: 'Raleway', sans-serif;
  font-size: 30px;
  font-weight: 300;
  color: var(--la-text);
  min-width: 52px;
  text-align: center;
  transition: color 0.3s;
  line-height: 1;
}

.la-sq-timer.la-timer-urgent {
  color: #e86050;
  animation: la-timer-throb 0.5s ease-in-out infinite alternate;
}

@keyframes la-timer-throb {
  from { transform: scale(1); }
  to   { transform: scale(1.14); }
}

.la-sq-question {
  padding: 12px 1.5rem 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.la-sq-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(17px, 4.5vw, 26px);
  font-weight: 400;
  color: var(--la-text);
  text-align: center;
  line-height: 1.45;
}

/* 2×2 touch grid */
.la-sq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  flex: 1;
  min-height: 0;
}

.la-sq-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 16px;
  background: var(--la-btn-bg, #1e3a28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  transition: filter 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 0;
}
.la-sq-btn:hover:not(:disabled) { filter: brightness(1.3); }
.la-sq-btn:active:not(:disabled) { transform: scale(0.975); }
.la-sq-btn:disabled { cursor: default; }
.la-sq-btn.la-ans-chosen { filter: brightness(1.5); border-color: rgba(255,255,255,0.25); }

.la-sq-ltr {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
  flex-shrink: 0;
}

.la-sq-opt {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 3.5vw, 22px);
  font-weight: 400;
  color: #e8dfc8;
  line-height: 1.35;
  word-break: break-word;
}

/* ════════════════════════════════════════════════════════════
   STUDENT — WAITING
════════════════════════════════════════════════════════════ */

#la-student-waiting {
  background: var(--la-base);
  align-items: center;
  justify-content: center;
}

.la-sw-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding: 2rem;
}

.la-sw-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.la-sw-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--la-gold);
  opacity: 0.25;
  animation: la-dot-wave 1.5s ease-in-out infinite;
}
.la-sw-dot:nth-child(2) { animation-delay: 0.18s; }
.la-sw-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes la-dot-wave {
  0%, 80%, 100% { opacity: 0.18; transform: scale(0.85); }
  40%            { opacity: 0.95; transform: scale(1.15); }
}

.la-sw-msg {
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--la-muted);
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   STUDENT — RESULT FLASH
════════════════════════════════════════════════════════════ */

#la-student-result {
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--la-base);
}

.la-result-correct {
  animation: la-flash-correct 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.la-result-wrong {
  animation: la-flash-wrong 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes la-flash-correct {
  0%   { background: #c9a44a; }
  25%  { background: #2a4e1a; }
  100% { background: #0c1a08; }
}
@keyframes la-flash-wrong {
  0%   { background: #c0392b; }
  25%  { background: #3a0c08; }
  100% { background: #120505; }
}

.la-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.la-sr-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem;
}

.la-sr-icon {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(72px, 18vw, 116px);
  font-weight: 200;
  line-height: 1;
  color: #fff;
}
.la-result-correct .la-sr-icon {
  color: var(--la-gold);
  animation: la-bounce-in 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}
.la-result-wrong .la-sr-icon {
  color: #ff8585;
  animation: la-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.08s both;
}

@keyframes la-bounce-in {
  from { transform: scale(0);   opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes la-shake {
  0%, 100% { transform: translateX(0); }
  16%  { transform: translateX(-10px); }
  33%  { transform: translateX(10px); }
  50%  { transform: translateX(-8px); }
  66%  { transform: translateX(8px); }
  83%  { transform: translateX(-4px); }
}

.la-sr-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 7vw, 50px);
  font-weight: 400;
  color: var(--la-text);
  animation: la-fade-rise 0.5s ease 0.22s both;
}

.la-sr-pts {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(16px, 4.5vw, 28px);
  font-weight: 600;
  color: var(--la-gold);
  letter-spacing: 2px;
  animation: la-fade-rise 0.5s ease 0.34s both;
}

@keyframes la-fade-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   NAV ENTRY BUTTON
════════════════════════════════════════════════════════════ */

.la-nav-live-btn {
  font-family: 'Raleway', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #c9a44a !important;
  border-color: rgba(201, 164, 74, 0.32) !important;
  background: rgba(201, 164, 74, 0.06) !important;
  transition: background 0.2s, border-color 0.2s !important;
}
.la-nav-live-btn:hover {
  background: rgba(201, 164, 74, 0.14) !important;
  border-color: rgba(201, 164, 74, 0.58) !important;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — narrow screens (phone portrait)
════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .la-lobby-topbar  { padding: 1.25rem 1.5rem 0; }
  .la-pin-block     { padding: 1.75rem 2rem; min-width: 0; width: calc(100% - 3rem); }
  .la-players-section { padding: 0 1.5rem; }
  .la-start-btn     { padding: 14px 36px; }

  .la-hq-body       { flex-direction: column; gap: 1.5rem; padding: 1.5rem; }
  .la-timer-wrap    { width: 96px; height: 96px; }
  .la-timer-svg     { width: 96px; height: 96px; }
  .la-hq-timer      { font-size: 32px; }
  .la-hq-opts       { grid-template-columns: 1fr; }

  .la-hr-body       { flex-direction: column; gap: 1.5rem; }
  .la-hr-lb         { min-width: 0; max-width: 100%; }
  #la-host-results  { padding: 1.5rem; }

  .la-sl-inner      { padding: 2rem 1.5rem; }
  .la-sq-grid       { gap: 4px; padding: 4px; }

  /* Picker & dataset screens on mobile */
  .la-picker-cards  { flex-direction: column; gap: 1rem; align-items: center; }
  .la-picker-card   { width: 100%; max-width: 340px; }
  .la-ds-item       { padding: 1rem 1.25rem; }
  .la-ds-icon       { font-size: 1.6rem; }
}

/* ════════════════════════════════════════════════════════════
   PICKER SCREEN  (#la-picker)
   Teacher chooses: Host a Session | Join a Session
════════════════════════════════════════════════════════════ */

#la-picker {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 3rem 2rem;
  min-height: 100%;
}

.la-picker-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--la-gold);
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0;
}

.la-picker-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 0.88rem;
  color: var(--la-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  margin: -1.8rem 0 0;
}

.la-picker-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 680px;
}

.la-picker-card {
  flex: 1 1 240px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.5rem 1.75rem 2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--la-border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, transform 0.18s;
  font-family: 'Raleway', sans-serif;
  color: var(--la-text);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.la-picker-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,164,74,0.07) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
}

.la-picker-card:hover {
  background: rgba(201,164,74,0.07);
  border-color: rgba(201,164,74,0.45);
  transform: translateY(-3px);
}

.la-picker-card:hover::before { opacity: 1; }

.la-picker-card:active { transform: translateY(0); }

.la-picker-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(201,164,74,0.35));
}

.la-picker-label {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--la-gold);
}

.la-picker-desc {
  font-size: 0.82rem;
  color: var(--la-muted);
  line-height: 1.55;
  letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════════════════
   HOST DATASET SCREEN  (#la-host-dataset)
   Teacher picks which question set to launch
════════════════════════════════════════════════════════════ */

#la-host-dataset {
  flex-direction: column;
  gap: 0;
  min-height: 100%;
  overflow-y: auto;
}

.la-hd-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2.5rem 1.25rem;
  border-bottom: 1px solid var(--la-border);
  flex-shrink: 0;
}

.la-hd-back {
  background: none;
  border: 1px solid rgba(201,164,74,0.3);
  border-radius: 3px;
  color: var(--la-gold);
  font-family: 'Raleway', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
}

.la-hd-back:hover {
  background: rgba(201,164,74,0.1);
  border-color: rgba(201,164,74,0.55);
}

.la-hd-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--la-gold);
  letter-spacing: 0.03em;
  margin: 0;
}

.la-hd-body {
  flex: 1;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Individual dataset row */
.la-ds-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 1.5rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--la-border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  font-family: 'Raleway', sans-serif;
  color: var(--la-text);
  text-align: left;
  width: 100%;
}

.la-ds-item:hover {
  background: rgba(201,164,74,0.08);
  border-color: rgba(201,164,74,0.42);
  transform: translateX(4px);
}

.la-ds-item:active { transform: translateX(0); }

.la-ds-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 1px 6px rgba(201,164,74,0.3));
}

.la-ds-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.la-ds-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--la-text);
}

.la-ds-count {
  font-size: 0.78rem;
  color: var(--la-muted);
  letter-spacing: 0.05em;
}

.la-ds-arrow {
  font-size: 1.2rem;
  color: var(--la-gold);
  opacity: 0.55;
  transition: opacity 0.18s, transform 0.18s;
  flex-shrink: 0;
}

.la-ds-item:hover .la-ds-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.la-ds-empty {
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  color: var(--la-muted);
  text-align: center;
  padding: 3rem 0;
  margin: 0;
  letter-spacing: 0.04em;
}

/* ── Host lobby back button ─────────────────────────────── */
.la-back-btn {
  background: transparent;
  border: 1px solid var(--la-border);
  color: var(--la-muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.la-back-btn:hover { color: var(--la-text); border-color: var(--la-gold-dim); }

/* ── Redesigned picker screen ────────────────────────────── */
#la-picker {
  flex-direction: column;
  background: var(--la-base);
  background-image:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(201,164,74,0.06), transparent 60%);
}
.la-picker-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--la-border);
}
.la-picker-brand { display: flex; align-items: center; gap: 14px; }
.la-picker-logo  { width: 36px; height: 36px; color: var(--la-gold); }
.la-picker-brand-name {
  font-family: 'Cinzel', 'Raleway', serif;
  font-size: 16px; font-weight: 600; color: var(--la-text); letter-spacing: 0.5px;
}
.la-picker-brand-name span { color: var(--la-gold); }
.la-picker-brand-sub {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--la-muted); margin-top: 1px;
}
.la-picker-close-btn {
  background: transparent; border: 1px solid var(--la-border);
  color: var(--la-muted); width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}
.la-picker-close-btn:hover { color: var(--la-text); border-color: var(--la-gold-dim); }

.la-picker-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px;
}
.la-picker-tagline {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--la-gold); opacity: 0.7; margin-bottom: 32px;
}
.la-picker-cards {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  width: 100%; max-width: 520px;
}
.la-picker-card {
  flex: 1; min-width: 180px; max-width: 220px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 32px 20px 28px;
  background: var(--la-panel);
  border: 1px solid var(--la-border);
  border-top: 2px solid var(--la-gold-dim);
  cursor: pointer; text-align: center;
  transition: background 0.22s, border-color 0.22s, transform 0.22s;
}
.la-picker-card:hover {
  background: var(--la-panel-2);
  border-top-color: var(--la-gold);
  transform: translateY(-3px);
}
.la-picker-card-icon { font-size: 34px; margin-bottom: 4px; }
.la-picker-card-label {
  font-family: 'Cinzel', 'Raleway', serif;
  font-size: 14px; font-weight: 600; letter-spacing: 1px;
  color: var(--la-text);
}
.la-picker-card-desc {
  font-size: 11px; color: var(--la-muted); line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   CUSTOM QUIZ BUILDER  (#la-custom-quiz)
   ══════════════════════════════════════════════════════════════ */

#la-custom-quiz {
  flex-direction: column;
  background: var(--la-base);
}

.la-cq-wrap {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding: 20px 28px 0; gap: 14px; overflow: hidden;
}

/* ── Header row (title input + action buttons) ── */
.la-cq-header-row {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.la-cq-name-input {
  flex: 1; background: var(--la-panel-2); border: 1px solid var(--la-border);
  color: var(--la-text); font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 600; padding: 10px 16px; border-radius: 6px;
  outline: none; transition: border-color .2s;
}
.la-cq-name-input:focus { border-color: var(--la-gold-dim); }
.la-cq-name-input::placeholder { color: var(--la-muted); opacity: .7; }
.la-cq-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.la-cq-upload-btn, .la-cq-template-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Raleway', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase;
  background: var(--la-panel-2); border: 1px solid var(--la-border);
  color: var(--la-muted); padding: 8px 14px; border-radius: 6px; cursor: pointer;
  transition: color .2s, border-color .2s;
}
.la-cq-upload-btn svg, .la-cq-template-btn svg { width: 14px; height: 14px; }
.la-cq-upload-btn:hover  { color: var(--la-text); border-color: var(--la-gold-dim); }
.la-cq-template-btn:hover{ color: var(--la-muted); border-color: var(--la-border); }

/* ── Scrollable question list ── */
.la-cq-list {
  flex: 1; min-height: 0; overflow-y: auto; display: flex;
  flex-direction: column; gap: 12px; padding-bottom: 8px;
}
.la-cq-list::-webkit-scrollbar { width: 4px; }
.la-cq-list::-webkit-scrollbar-thumb { background: var(--la-border); border-radius: 2px; }

/* ── Empty state ── */
.la-cq-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: var(--la-muted); text-align: center; padding: 40px 20px;
}
.la-cq-empty-icon { font-size: 36px; opacity: .5; margin-bottom: 6px; }
.la-cq-empty p { font-family: 'Raleway', sans-serif; font-size: 13px; margin: 0; }

/* ── Question card ── */
.la-cq-card {
  background: var(--la-panel); border: 1px solid var(--la-border); border-radius: 8px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
  transition: border-color .18s;
}
.la-cq-card:focus-within { border-color: var(--la-gold-dim); }
.la-cq-card-hd {
  display: flex; align-items: center; justify-content: space-between;
}
.la-cq-card-num {
  font-family: 'Raleway', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--la-gold); opacity: .75;
}
.la-cq-remove-btn {
  background: transparent; border: none; color: var(--la-muted); cursor: pointer;
  font-size: 13px; padding: 2px 6px; border-radius: 4px; transition: color .15s, background .15s;
}
.la-cq-remove-btn:hover { color: var(--la-wrong); background: rgba(192,57,43,.12); }
.la-cq-q-input {
  width: 100%; background: var(--la-panel-2); border: 1px solid var(--la-border);
  color: var(--la-text); font-family: 'Cormorant Garamond', serif;
  font-size: 16px; padding: 8px 12px; border-radius: 5px; resize: vertical;
  outline: none; transition: border-color .18s; box-sizing: border-box;
}
.la-cq-q-input:focus { border-color: var(--la-gold-dim); }
.la-cq-q-input::placeholder { color: var(--la-muted); opacity: .6; }

/* ── 4 option rows ── */
.la-cq-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.la-cq-opt-row {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 10px; border-radius: 5px; border: 1px solid var(--la-border);
  background: var(--la-panel-2); transition: border-color .15s, background .15s;
}
.la-cq-opt-row input[type="radio"] { accent-color: var(--la-gold); flex-shrink: 0; }
.la-cq-opt-row.la-cq-opt-correct {
  border-color: var(--la-correct); background: rgba(74,158,92,.08);
}
.la-cq-opt-input {
  flex: 1; background: transparent; border: none; color: var(--la-text);
  font-family: 'Raleway', sans-serif; font-size: 13px; outline: none; min-width: 0;
}
.la-cq-opt-input::placeholder { color: var(--la-muted); opacity: .55; }

/* ── Footer ── */
.la-cq-footer {
  display: flex; align-items: center; gap: 14px; padding: 14px 0 18px;
  border-top: 1px solid var(--la-border); flex-shrink: 0; margin-top: auto;
}
.la-cq-add-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Raleway', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  background: var(--la-panel-2); border: 1px solid var(--la-border);
  color: var(--la-text); padding: 9px 16px; border-radius: 6px; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.la-cq-add-btn svg { width: 14px; height: 14px; stroke: var(--la-gold); }
.la-cq-add-btn:hover { border-color: var(--la-gold-dim); background: rgba(201,164,74,.06); }
.la-cq-count {
  flex: 1; text-align: center; font-family: 'Raleway', sans-serif;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--la-muted);
}
.la-cq-start-btn {
  font-family: 'Raleway', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: .5px; background: var(--la-olive); border: 1px solid rgba(74,158,92,.3);
  color: #fff; padding: 10px 28px; border-radius: 7px; cursor: pointer;
  transition: filter .2s; white-space: nowrap;
}
.la-cq-start-btn:disabled {
  opacity: .4; cursor: not-allowed; filter: none;
}
.la-cq-start-btn:not(:disabled):hover { filter: brightness(1.15); }

/* ── Dataset list: custom quiz entry ── */
.la-ds-custom { border-style: dashed; }
.la-ds-locked { opacity: .55; cursor: default; }
.la-ds-locked .la-ds-arrow { display: none; }

/* ── Admin panel: feature flags ── */
.subs-features-grid {
  display: flex; flex-direction: column; gap: 10px; margin-top: 6px;
}
.subs-feature-item {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 10px 14px; border-radius: 6px; border: 1px solid rgba(201,164,74,.14);
  background: rgba(201,164,74,.04); transition: border-color .18s;
}
.subs-feature-item:hover { border-color: rgba(201,164,74,.3); }
.subs-feature-item input[type="checkbox"] { margin-top: 3px; accent-color: var(--la-gold, #c9a44a); flex-shrink: 0; }
.subs-feature-body { display: flex; flex-direction: column; gap: 2px; }
.subs-feature-name { font-weight: 700; font-size: 13px; color: var(--la-text, #e8dfc8); }
.subs-feature-desc { font-size: 11px; color: var(--la-muted, #8a7a60); line-height: 1.4; }
