/* ════════════════════════════════════════
   Quiz Liqi — Estilos compartilhados
   ════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --azul:        #0247fe;
  --azul-claro:  #398aff;
  --azul-escuro: #0038b5;
  --rosa:        #f556e9;
  --rosa-claro:  #ff85fc;
  --glass:       rgba(2,71,254,.12);
  --glass-rosa:  rgba(245,86,233,.12);
  --fundo:       #060810;
  --fundo2:      #0d1117;
  --fundo-card:  rgba(255,255,255,.04);
  --borda:       rgba(255,255,255,.08);
  --texto:       #e8eaed;
  --texto-dim:   #6b7a8d;
  --verde:       #10b981;
  --vermelho:    #ef4444;
  --ouro:        #efa143;
  --prata:       #94a3b8;
  --bronze:      #d97706;
  --grad:        linear-gradient(45deg, #0247fe, #f556e9);
  --grad-hover:  linear-gradient(45deg, #0038b5, #cc29c8);
  --glow-azul:   0 0 30px rgba(2,71,254,.45);
  --glow-rosa:   0 0 30px rgba(245,86,233,.4);
  --glow-mix:    0 0 40px rgba(2,71,254,.35), 0 0 80px rgba(245,86,233,.15);

  /* aliases */
  --roxo: #0247fe; --roxo-claro: #398aff; --roxo-escuro: #0038b5;
  --roxo-glass: rgba(2,71,254,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at 15% 40%, rgba(2,71,254,.22) 0%, transparent 55%),
    radial-gradient(ellipse at 88% 12%, rgba(245,86,233,.16) 0%, transparent 48%),
    radial-gradient(ellipse at 55% 90%, rgba(2,71,254,.12) 0%, transparent 42%),
    #060810;
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
}

/* nebula animado */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(2,71,254,.28) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(245,86,233,.2) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 10%, rgba(2,71,254,.14) 0%, transparent 40%);
  background-size: 200% 200%;
  animation: nebulaShift 20s ease-in-out infinite alternate;
  z-index: 0;
}

/* grade sutil */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

h1, h2, h3, .titulo { font-family: 'Poppins', sans-serif; }

/* ── Telas ── */
.tela { display: none; width: 100%; min-height: 100vh; position: relative; z-index: 1; }
.tela.ativa { display: flex; flex-direction: column; }

/* ── Botão primário ── */
.btn-primario {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 15px 32px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all .25s;
  letter-spacing: .03em;
  box-shadow: 0 4px 20px rgba(2,71,254,.3), inset 0 1px 0 rgba(255,255,255,.15);
  position: relative; overflow: hidden;
  text-shadow: 0 1px 8px rgba(2,71,254,.5);
}
.btn-primario::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 55%);
  pointer-events: none;
}
.btn-primario::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg);
  transition: left .4s ease;
  pointer-events: none;
}
.btn-primario:hover::after { left: 160%; }
.btn-primario:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(2,71,254,.55), 0 4px 16px rgba(245,86,233,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-primario:active  { transform: translateY(0); }
.btn-primario:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }

/* ── Botão secundário ── */
.btn-sec {
  background: transparent;
  color: var(--azul-claro);
  border: 1px solid rgba(2,71,254,.45);
  border-radius: 14px;
  padding: 12px 28px;
  font-size: .95rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all .2s;
}
.btn-sec:hover {
  background: var(--glass);
  border-color: var(--azul);
  box-shadow: 0 4px 20px rgba(2,71,254,.2);
  transform: translateY(-1px);
}

/* ── Card game ── */
.card-game {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 24px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  position: relative; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
}
.card-game::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(2,71,254,.6), rgba(245,86,233,.5), transparent);
  pointer-events: none;
}

/* ── Logo ── */
.logo-liqi { display: block; }

/* ── Barra de progresso ── */
.barra-container {
  background: rgba(255,255,255,.07);
  border-radius: 100px;
  overflow: hidden;
  height: 6px;
}
.barra-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 100px;
  transition: width .6s ease;
  box-shadow: 0 0 12px rgba(2,71,254,.6);
}

/* ── Spinner ── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,.07);
  border-top-color: var(--azul);
  border-right-color: var(--rosa);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

/* ── Texto gradiente ── */
.texto-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.badge-azul {
  background: rgba(2,71,254,.14); border: 1px solid rgba(2,71,254,.3);
  color: var(--azul-claro);
}
.badge-rosa {
  background: rgba(245,86,233,.12); border: 1px solid rgba(245,86,233,.25);
  color: var(--rosa-claro);
}

/* ── Botões de opção — game show style ── */
.btn-opcao.op-0, .btn-opcao.op-1, .btn-opcao.op-2, .btn-opcao.op-3 {
  border-color: rgba(2,71,254,.3);
  background: rgba(2,71,254,.07);
  min-height: 76px;
}
.btn-opcao.op-0:hover:not(:disabled),
.btn-opcao.op-1:hover:not(:disabled),
.btn-opcao.op-2:hover:not(:disabled),
.btn-opcao.op-3:hover:not(:disabled) {
  border-color: rgba(2,71,254,.7);
  background: rgba(2,71,254,.15);
  box-shadow: 0 0 24px rgba(2,71,254,.25), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateY(-2px);
}

/* ── Letra-opcao variantes — todas com gradiente Liqi ── */
.letra-opcao.lop-0,
.letra-opcao.lop-1,
.letra-opcao.lop-2,
.letra-opcao.lop-3 { background: var(--grad); color: #fff; }

/* ── Timer bar ── */
.timer-bar-wrap { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; margin-top: 16px; }
.timer-bar { height: 100%; background: var(--grad); border-radius: 3px; box-shadow: 0 0 12px rgba(2,71,254,.7); transition: none; }
.timer-bar.urgente {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  box-shadow: 0 0 14px rgba(239,68,68,.8);
  animation: urgente-pulse .6s ease-in-out infinite alternate;
}

/* ── Score float ── */
.score-float {
  position: fixed; pointer-events: none; z-index: 9999;
  font-size: 2rem; font-weight: 900; font-family: 'Poppins', sans-serif;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  animation: scoreFloat 1s ease-out forwards;
  text-shadow: 0 0 20px rgba(2,71,254,.4);
}

/* ── Feedback pill aprimorado ── */
.feedback-pill {
  font-size: 2.6rem; font-weight: 900; padding: 28px 56px; border-radius: 28px;
  letter-spacing: .02em; font-family: 'Poppins', sans-serif;
  animation: feedbackAnim 1.1s ease forwards; opacity: 0;
  box-shadow: 0 8px 60px rgba(0,0,0,.6), 0 0 80px rgba(2,71,254,.2);
}

/* ── Animações ── */
@keyframes nebulaShift {
  0%   { background-position: 0% 0%; opacity: .7; }
  100% { background-position: 100% 100%; opacity: 1; }
}
@keyframes timerShrink {
  from { width: 100%; }
  to   { width: 0%; }
}
@keyframes scoreFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(1.5); }
}
@keyframes correctFlash {
  0%, 100% { background: transparent; }
  50% { background: rgba(16,185,129,.15); }
}
@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
@keyframes countdownPulse {
  0%, 100% { transform: scale(1); color: var(--texto); }
  50% { transform: scale(1.05); color: var(--rosa-claro); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}
@keyframes brilho {
  0%, 100% { box-shadow: var(--glow-azul); }
  50%       { box-shadow: var(--glow-rosa); }
}
@keyframes gradAnim {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes scoreIn {
  0%   { opacity: 0; transform: scale(.5) translateY(10px); }
  70%  { transform: scale(1.12) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes glowPulse {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}
@keyframes floatScore {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-50px) scale(1.4); }
}
@keyframes feedbackAnim {
  0%   { opacity:0; transform: scale(.6) translateY(20px); }
  30%  { opacity:1; transform: scale(1.1) translateY(-4px); }
  60%  { opacity:1; transform: scale(1) translateY(0); }
  100% { opacity:0; transform: scale(.9) translateY(-10px); }
}

@keyframes urgente-pulse {
  from { box-shadow: 0 0 10px rgba(239,68,68,.7); }
  to   { box-shadow: 0 0 28px rgba(239,68,68,1), 0 0 50px rgba(245,158,11,.4); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.anim-entrada { animation: fadeInUp .5s cubic-bezier(.22,1,.36,1) both; }
.anim-score   { animation: scoreIn .45s cubic-bezier(.34,1.56,.64,1) both; }

/* Bordas brilhantes em cards importantes */
.card-glow-azul {
  box-shadow: 0 0 0 1px rgba(2,71,254,.4), 0 8px 40px rgba(2,71,254,.2);
}
.card-glow-rosa {
  box-shadow: 0 0 0 1px rgba(245,86,233,.4), 0 8px 40px rgba(245,86,233,.2);
}
