/* Pantalla general (host) - pensada para 16:9, calidad minima FullHD */
html, body { background: var(--ql-background); }
.ql-host {
  min-height: 100dvh;
  width: 100vw;
  background: var(--ql-background);
  display: flex;
  flex-direction: column;
  position: relative;
}
.ql-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.6vh, 64px) clamp(28px, 4vw, 90px);
  min-height: 100dvh;
}
.ql-muted { color: var(--ql-text-secondary); }
.ql-eyebrow { text-transform: uppercase; letter-spacing: 0.12em; color: var(--ql-primary); font-weight: 800; font-size: clamp(0.8rem, 1.2vw, 1.1rem); margin: 0 0 6px; }

/* ---- Botones ---- */
.ql-btn {
  border: none; border-radius: 999px; font-weight: 800;
  padding: 0.9em 1.8em; font-size: clamp(1rem, 1.4vw, 1.3rem);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.ql-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ql-btn:active { transform: translateY(0); }
.ql-btn-primary { background: var(--ql-primary); color: #fff; }
.ql-btn-ghost { background: transparent; color: var(--ql-text); border: 2px solid color-mix(in srgb, var(--ql-text) 30%, transparent); }
.ql-btn-xl { padding: 1.1em 2.4em; font-size: clamp(1.1rem, 1.8vw, 1.6rem); }
.ql-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ql-floating-btn { position: fixed; right: clamp(20px, 3vw, 48px); bottom: clamp(20px, 3vh, 48px); }

/* ---- Setup ---- */
.ql-setup { align-items: center; justify-content: center; text-align: center; }
.ql-setup-card { max-width: 720px; width: 100%; }
.ql-setup h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 8px; }
.ql-sub { font-size: clamp(1rem, 1.6vw, 1.3rem); margin: 0 0 28px; color: var(--ql-text-secondary); }
.ql-quiz-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.ql-quiz-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--ql-surface); border-radius: 16px; padding: 16px 22px; text-align: left;
  border: 2px solid transparent; cursor: pointer;
}
.ql-quiz-item:hover { border-color: var(--ql-primary); }
.ql-quiz-item h3 { margin: 0 0 4px; font-size: 1.1rem; }
.ql-quiz-item span { color: var(--ql-text-secondary); font-size: 0.85rem; }
.ql-setup-hint { font-size: 0.9rem; }
.ql-setup-hint a { color: var(--ql-primary); }
.ql-rejoin { display: flex; gap: 10px; margin-top: 28px; justify-content: center; }
.ql-rejoin input {
  width: 9em; text-align: center; letter-spacing: 0.2em; font-weight: 800; text-transform: uppercase;
  border-radius: 999px; border: 2px solid color-mix(in srgb, var(--ql-text) 25%, transparent);
  background: transparent; color: var(--ql-text); padding: 0.7em 1em; font-size: 1rem;
}

/* ---- Lobby ---- */
.ql-lobby-grid { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.ql-lobby-left { text-align: center; }
.ql-lobby-left h1 { font-size: clamp(1.8rem, 3.6vw, 3rem); margin: 0 0 20px; }
.ql-qr-wrap { background: #fff; padding: clamp(10px, 1.6vw, 20px); border-radius: 24px; display: inline-block; }
.ql-qr-wrap img { width: clamp(200px, 22vw, 360px); height: clamp(200px, 22vw, 360px); }
.ql-code-row { margin-top: 18px; font-size: clamp(0.9rem, 1.3vw, 1.15rem); color: var(--ql-text-secondary); }
.ql-join-url { color: var(--ql-text); font-weight: 700; }
.ql-code-big {
  margin-top: 10px; font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 900; letter-spacing: 0.15em;
  color: var(--ql-primary);
}
.ql-lobby-right { display: flex; flex-direction: column; align-items: center; gap: 28px; background: var(--ql-surface); border-radius: 28px; padding: clamp(24px, 4vh, 56px); }
.ql-player-count { text-align: center; }
.ql-player-count-num { display: block; font-size: clamp(3rem, 7vw, 6rem); font-weight: 900; line-height: 1; color: var(--ql-primary); }
.ql-player-count-label { color: var(--ql-text-secondary); font-size: clamp(0.9rem, 1.3vw, 1.2rem); }

/* ---- Pregunta / Resultados ---- */
.ql-q-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: clamp(14px, 2.4vh, 30px); }
.ql-progress, .ql-answered { font-size: clamp(0.9rem, 1.3vw, 1.3rem); font-weight: 700; color: var(--ql-text-secondary); }
.ql-timer {
  width: clamp(56px, 6vw, 90px); height: clamp(56px, 6vw, 90px); border-radius: 50%;
  background: var(--ql-primary); color: #fff; display: grid; place-items: center;
  font-size: clamp(1.3rem, 2.2vw, 2rem); font-weight: 900; flex-shrink: 0;
}
.ql-timer.ql-timer-warn { background: #d03b3b; }
.ql-q-text {
  font-size: clamp(1.8rem, 4.4vw, 3.4rem); font-weight: 800; text-align: center;
  margin: clamp(10px, 2vh, 26px) 0 clamp(20px, 3.6vh, 46px); line-height: 1.15;
}
.ql-options-grid {
  flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 26px);
  align-content: center;
}
.ql-option-card {
  border-radius: 20px; padding: clamp(20px, 3vh, 40px) clamp(18px, 2vw, 32px);
  font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 16px; min-height: clamp(70px, 12vh, 130px);
}
.ql-option-shape {
  width: clamp(28px, 2.6vw, 40px); height: clamp(28px, 2.6vw, 40px); flex-shrink: 0;
  border-radius: 8px; background: rgba(255,255,255,0.35);
}
.ql-chart-container {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--ql-surface); border-radius: 28px; padding: clamp(20px, 3.6vh, 50px) clamp(20px, 3vw, 60px);
}

/* ---- Fin ---- */
.ql-ended { align-items: center; justify-content: center; text-align: center; }
.ql-ended h1 { font-size: clamp(2.2rem, 5vw, 4rem); margin: 0 0 10px; }
.ql-ended-actions { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 900px) {
  .ql-lobby-grid { grid-template-columns: 1fr; }
  .ql-options-grid { grid-template-columns: 1fr; }
}
