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

:root {
  --red: #e21b3c;
  --blue: #1368ce;
  --yellow: #d89e00;
  --green: #26890c;
  --bg: #1e3a8a;
  --bg2: #1e40af;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.bg-blue {
  background: radial-gradient(circle at top left, #2563eb, #1e3a8a 60%, #0f1e5c);
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

/* Shapes no fundo que ficam flutuando */
.bg-shapes {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.shape-bg {
  position: absolute; font-size: 80px; opacity: 0.08; color: #fff;
  animation: drift 20s ease-in-out infinite;
}
.shape-bg.sq-1 { top: 10%; left: 8%;  color: #e21b3c; animation-delay: 0s; }
.shape-bg.sq-2 { top: 70%; left: 85%; color: #1368ce; animation-delay: -5s; }
.shape-bg.sq-3 { top: 80%; left: 10%; color: #d89e00; animation-delay: -10s; }
.shape-bg.sq-4 { top: 15%; left: 80%; color: #26890c; animation-delay: -15s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(30px, -20px) rotate(20deg); }
  50%      { transform: translate(-20px, 40px) rotate(-15deg); }
  75%      { transform: translate(40px, 20px) rotate(10deg); }
}

main { min-height: 100dvh; padding: 16px; position: relative; z-index: 1; }

.center {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.card h1 { font-size: 28px; margin-bottom: 16px; }
.card h2 { font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--muted); margin: 8px 0; }

.stack { display: flex; flex-direction: column; gap: 12px; }

/* Anima entrada de qualquer tela */
.pop-in { animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Staggered children */
.stagger-1 { animation: slideIn 0.4s ease 0.05s both; }
.stagger-2 { animation: slideIn 0.4s ease 0.15s both; }
.stagger-3 { animation: slideIn 0.4s ease 0.25s both; }
.stagger-4 { animation: slideIn 0.4s ease 0.35s both; }
.stagger-5 { animation: slideIn 0.4s ease 0.45s both; }
.stagger-6 { animation: slideIn 0.4s ease 0.55s both; }
.stagger-7 { animation: slideIn 0.4s ease 0.65s both; }
@keyframes slideIn {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

input[type=text], input[type=password] {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
input[type=text]:focus, input[type=password]:focus {
  border-color: var(--blue);
  transform: scale(1.02);
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn.big { padding: 18px; font-size: 20px; }

hr { border: 0; border-top: 1px solid #e2e8f0; margin: 16px 0; }

.err { color: var(--red); margin-top: 12px; font-size: 14px; min-height: 20px; }

.spinner {
  width: 40px; height: 40px; margin: 20px auto;
  border: 4px solid #e2e8f0; border-top-color: var(--blue);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* HOST LOBBY */
.host-lobby {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; color: #fff; padding: 20px;
}
.pin-box { text-align: center; }
.pin-label { font-size: 18px; opacity: 0.9; margin-bottom: 8px; }
.pin {
  font-size: clamp(60px, 15vw, 140px);
  font-weight: 900; letter-spacing: 8px;
  background: #fff; color: var(--bg);
  padding: 16px 32px; border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: pinBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pinBounce {
  0%   { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  60%  { transform: scale(1.1) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.host-lobby h2 { font-size: 28px; }
.players-count { font-size: 20px; opacity: 0.9; }
.players-count span {
  display: inline-block;
  font-weight: 900;
  color: #fff;
  transition: transform 0.3s;
}
.players {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  max-width: 900px;
}
.chip {
  background: rgba(255,255,255,0.15); color: #fff;
  padding: 8px 14px; border-radius: 20px;
  font-weight: 600; backdrop-filter: blur(4px);
}
.chip-new { animation: chipIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes chipIn {
  0%   { opacity: 0; transform: scale(0) rotate(-20deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.host-lobby .btn { max-width: 300px; }

/* HOST QUESTION */
.host-q {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: 16px; gap: 16px; color: #fff;
}
.q-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 18px; font-weight: 700;
  background: rgba(0,0,0,0.25); padding: 12px 16px; border-radius: 10px;
}
.timer-chip {
  background: #fff; color: var(--bg);
  min-width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 22px; font-weight: 900;
  transition: background 0.3s, transform 0.2s;
}
.timer-chip.urgent {
  background: var(--red); color: #fff;
  animation: shake 0.5s infinite;
}
@keyframes shake {
  0%, 100% { transform: translateX(0) scale(1); }
  25%      { transform: translateX(-3px) scale(1.05); }
  75%      { transform: translateX(3px) scale(1.05); }
}

#answered.pulse { animation: pulseScale 0.4s; }
@keyframes pulseScale {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.q-text {
  background: #fff; color: var(--text);
  border-radius: 12px; padding: 24px;
  font-size: clamp(18px, 2.5vw, 28px);
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.q-text pre {
  white-space: pre-wrap;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: clamp(14px, 1.8vw, 20px);
  text-align: left;
}

.big-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px; flex: 1; min-height: 300px;
}
.answer {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-radius: 12px;
  color: #fff; font-weight: 700; font-size: clamp(16px, 2vw, 24px);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  transition: transform 0.15s;
}
.answer:hover { transform: translateY(-2px); }
.answer .shape { font-size: 28px; }
.answer.red { background: var(--red); }
.answer.blue { background: var(--blue); }
.answer.yellow { background: var(--yellow); }
.answer.green { background: var(--green); }

/* HOST REVIEW */
.host-review {
  min-height: 100dvh; padding: 20px;
  display: flex; flex-direction: column; align-items: center;
  color: #fff; gap: 20px;
}
.host-review h2, .host-review h3 { margin-top: 8px; }
.bars {
  display: flex; gap: 16px; align-items: flex-end;
  height: 240px; width: 100%; max-width: 600px;
  background: rgba(0,0,0,0.2); padding: 12px; border-radius: 12px;
}
.bar {
  flex: 1; border-radius: 8px; position: relative;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
  padding: 8px; height: 100%;
  background: rgba(255,255,255,0.1);
  opacity: 0.4; transition: opacity 0.5s;
}
.bar.correct {
  opacity: 1;
  box-shadow: 0 0 40px rgba(38,137,12,0.8);
  animation: correctGlow 1.2s ease-in-out infinite alternate;
}
@keyframes correctGlow {
  from { box-shadow: 0 0 20px rgba(38,137,12,0.6); }
  to   { box-shadow: 0 0 50px rgba(38,137,12,1); }
}
.bar .fill {
  width: 100%;
  border-radius: 6px;
  transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar.red .fill { background: var(--red); }
.bar.blue .fill { background: var(--blue); }
.bar.yellow .fill { background: var(--yellow); }
.bar.green .fill { background: var(--green); }
.bar span {
  position: absolute; top: 8px;
  font-size: 24px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ranking {
  list-style: none; width: 100%; max-width: 500px;
  background: rgba(255,255,255,0.1); border-radius: 12px;
  padding: 12px; counter-reset: rank;
}
.ranking li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  counter-increment: rank;
}
.ranking li:last-child { border-bottom: none; }
.ranking li::before {
  content: counter(rank);
  font-weight: 900; margin-right: 12px;
  width: 28px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.2); border-radius: 50%;
}
.ranking b { font-size: 18px; }

/* HOST END — pódio */
.host-end {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  color: #fff; padding: 20px;
}
.host-end h1 {
  font-size: clamp(36px, 6vw, 64px);
  animation: trophyPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes trophyPop {
  0%   { opacity: 0; transform: scale(0) rotate(-180deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.podium-stage {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 12px; width: 100%; max-width: 600px; min-height: 280px;
}
.podium-col {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; color: #fff;
}
.medal { font-size: 48px; margin-bottom: 4px; }
.podium-name { font-weight: 700; font-size: 18px; margin-bottom: 2px; text-align: center; }
.podium-score { font-weight: 900; font-size: 22px; margin-bottom: 6px; }
.podium-block {
  width: 100%; min-height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 900; color: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transform-origin: bottom;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.b1 { background: linear-gradient(180deg, #ffd700, #d4a500); height: 220px; animation-delay: 0.6s; }
.b2 { background: linear-gradient(180deg, #c0c0c0, #8a8a8a); height: 160px; animation-delay: 0.3s; }
.b3 { background: linear-gradient(180deg, #cd7f32, #8b5a20); height: 110px; animation-delay: 0.9s; }
@keyframes rise {
  0%   { transform: scaleY(0); opacity: 0; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* PLAYER */
.player-q {
  min-height: 100dvh; padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
  color: #fff;
}
.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px; flex: 1; min-height: 400px;
}
.answer-btn {
  border: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.15s, opacity 0.3s, box-shadow 0.2s;
  color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,0.3);
  animation: slideIn 0.4s ease both;
}
.answer-btn:nth-child(1) { animation-delay: 0.05s; }
.answer-btn:nth-child(2) { animation-delay: 0.1s;  }
.answer-btn:nth-child(3) { animation-delay: 0.15s; }
.answer-btn:nth-child(4) { animation-delay: 0.2s;  }
.answer-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.answer-btn.red { background: var(--red); }
.answer-btn.blue { background: var(--blue); }
.answer-btn.yellow { background: var(--yellow); }
.answer-btn.green { background: var(--green); }
.answer-btn .shape { font-size: 48px; font-weight: 900; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.answer-btn.dim { opacity: 0.3; }
.answer-btn.chosen {
  box-shadow: 0 0 30px rgba(255,255,255,0.8) inset;
  animation: chosenPulse 0.5s ease-in-out 2;
}
@keyframes chosenPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

.result.ok   { border-top: 8px solid var(--green); }
.result.fail { border-top: 8px solid var(--red); }
.result.timeout { border-top: 8px solid var(--muted); }
.result h1 { animation: resultPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes resultPop {
  0%   { opacity: 0; transform: scale(0.3); }
  100% { opacity: 1; transform: scale(1); }
}
.score-big {
  font-size: 60px; font-weight: 900; color: var(--blue); margin: 16px 0 0;
  animation: scoreCount 0.8s ease;
}
@keyframes scoreCount {
  0%   { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.rank { font-size: 20px; font-weight: 700; color: var(--text); margin-top: 12px; }

@media (min-width: 768px) {
  .answer-btn .shape { font-size: 80px; }
  .big-grid { min-height: 400px; }
}

/* LANDING / tema escuro moderno compartilhado */
.landing-page, .themed {
  min-height: 100dvh;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #fff;
  background: #0a0b2e;
  overflow-x: hidden;
  position: relative;
}
.landing-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(ellipse at top, #1e2876 0%, #0a0b2e 55%, #05061a 100%);
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 520px; height: 520px; top: -120px; left: -120px;
  background: radial-gradient(circle, #e21b3c, transparent 70%); }
.blob-2 { width: 620px; height: 620px; bottom: -180px; right: -160px;
  background: radial-gradient(circle, #1368ce, transparent 70%);
  animation-delay: -6s; }
.blob-3 { width: 440px; height: 440px; top: 40%; left: 55%;
  background: radial-gradient(circle, #d89e00, transparent 70%);
  animation-delay: -12s; opacity: 0.4; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, -40px) scale(1.1); }
  66%      { transform: translate(-40px, 50px) scale(0.95); }
}
.grid-overlay {
  position: absolute; inset: 0; opacity: 0.08; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.8) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}

.landing-shapes { position: absolute; inset: 0; pointer-events: none; }
.lsh {
  position: absolute; font-size: 48px; opacity: 0.18; color: #fff;
  animation: shapeFloat 14s ease-in-out infinite;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.lsh-1 { top: 12%; left: 8%;  color: #e21b3c; animation-delay: 0s; }
.lsh-2 { top: 22%; right: 10%; color: #1368ce; animation-delay: -3s; font-size: 56px; }
.lsh-3 { bottom: 18%; left: 12%; color: #d89e00; animation-delay: -6s; font-size: 40px; }
.lsh-4 { bottom: 28%; right: 15%; color: #26890c; animation-delay: -9s; }
.lsh-5 { top: 55%; left: 4%;  color: #e21b3c; animation-delay: -2s; font-size: 32px; opacity: 0.12; }
.lsh-6 { top: 70%; right: 6%; color: #d89e00; animation-delay: -5s; font-size: 36px; opacity: 0.14; }
@keyframes shapeFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(20px, -30px) rotate(15deg); }
}

.landing-main {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px 16px;
}

.landing-hero {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: 32px 28px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.12);
  animation: heroIn 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.brand {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-bottom: 4px;
}
.brand-mark {
  display: flex; gap: 8px; padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}
.bm-shape {
  font-size: 22px; line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  animation: bmBounce 1.8s ease-in-out infinite;
}
.bm-red    { color: #ff4060; animation-delay: 0s; }
.bm-blue   { color: #3a9aff; animation-delay: 0.15s; }
.bm-yellow { color: #ffc235; animation-delay: 0.3s; }
.bm-green  { color: #3fc918; animation-delay: 0.45s; }
@keyframes bmBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.brand-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: clamp(40px, 10vw, 56px);
  line-height: 1; letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #b8d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-title span {
  background: linear-gradient(135deg, #ff4060 0%, #ffc235 50%, #3fc918 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  text-align: center;
  font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin: 4px 0 26px;
}

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

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  padding-left: 4px;
}
.field input {
  width: 100%;
  padding: 16px 18px;
  font-size: 18px; font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: rgba(0,0,0,0.25);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  outline: none;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.field input::placeholder { color: rgba(255,255,255,0.3); font-weight: 500; }
.field input:focus {
  border-color: #3a9aff;
  background: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 4px rgba(58,154,255,0.15);
}
#pin {
  text-align: center; letter-spacing: 0.4em;
  font-size: 28px; font-weight: 900;
}

.btn-cta {
  margin-top: 6px;
  width: 100%;
  padding: 16px 20px;
  border: none; border-radius: 14px;
  font-family: inherit; font-size: 17px; font-weight: 800;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #ff4060 0%, #e21b3c 100%);
  box-shadow:
    0 8px 0 #9d0f28,
    0 14px 24px rgba(226,27,60,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #9d0f28, 0 18px 28px rgba(226,27,60,0.5);
}
.btn-cta:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #9d0f28, 0 6px 12px rgba(226,27,60,0.3);
}
.btn-cta svg { transition: transform 0.2s; }
.btn-cta:hover svg { transform: translateX(3px); }

.host-link {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.host-link a {
  display: inline-block; margin-top: 8px;
  color: #3a9aff; font-weight: 700; text-decoration: none;
  padding: 10px 20px;
  border: 1px solid rgba(58,154,255,0.35);
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.host-link a:hover {
  background: rgba(58,154,255,0.12);
  border-color: rgba(58,154,255,0.6);
}

.landing-foot {
  margin-top: 32px;
  color: rgba(255,255,255,0.35);
  font-size: 12px; letter-spacing: 0.05em;
}

.landing-page .err {
  color: #ff8a9c; text-align: center; margin: 4px 0 0;
  font-weight: 600; min-height: 18px; font-size: 13px;
}

/* ADMIN */
.admin {
  max-width: 960px; margin: 0 auto; padding: 32px 20px 60px;
  color: #fff; position: relative; z-index: 1;
}
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px 20px; border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.admin-header h1 {
  font-size: 26px; font-weight: 900;
  background: linear-gradient(135deg, #fff, #b8d4ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions .btn { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 10px; font-weight: 800; }
.btn.ghost-white {
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn.ghost-white:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(135deg, #3a9aff 0%, #1368ce 100%);
  color: #fff; border: none;
  box-shadow: 0 4px 0 #0b4a9c, 0 6px 14px rgba(19,104,206,0.4);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #0b4a9c, 0 10px 20px rgba(19,104,206,0.5); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #0b4a9c; }
.btn.success {
  background: linear-gradient(135deg, #3fc918 0%, #26890c 100%);
  color: #fff; border: none;
  box-shadow: 0 4px 0 #155a04, 0 6px 14px rgba(38,137,12,0.4);
}
.btn.success:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #155a04, 0 10px 20px rgba(38,137,12,0.5); }
.btn.success:active { transform: translateY(2px); box-shadow: 0 2px 0 #155a04; }
.admin-status { min-height: 24px; padding: 8px 0; font-weight: 600; }
.admin-status.ok  { color: #9df28a; }
.admin-status.err { color: #ff8a9c; }

.admin-list { display: flex; flex-direction: column; gap: 14px; }
.q-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 16px; padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: slideIn 0.3s ease;
}
.q-card-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.q-num {
  font-weight: 900; font-size: 20px;
  background: linear-gradient(135deg, #3a9aff, #ff4060);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.inline input {
  width: 70px; padding: 8px 10px; font-size: 14px; text-align: center;
  background: rgba(0,0,0,0.3); color: #fff;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
}
.inline input:focus { outline: none; border-color: #3a9aff; }
.q-card-actions { margin-left: auto; display: flex; gap: 6px; }
.btn-icon {
  width: 34px; height: 34px; border: none; border-radius: 10px;
  background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
  font-size: 16px; transition: background 0.15s, transform 0.1s;
}
.btn-icon:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
.btn-icon.del:hover { background: rgba(226,27,60,0.25); color: #ff8a9c; }

.q-text-input {
  width: 100%; padding: 12px 14px;
  background: rgba(0,0,0,0.3); color: #fff;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
  font-family: inherit; font-size: 15px; resize: vertical;
  margin-bottom: 14px;
}
.q-text-input::placeholder { color: rgba(255,255,255,0.3); }
.q-text-input:focus { border-color: #3a9aff; outline: none; box-shadow: 0 0 0 3px rgba(58,154,255,0.2); }

.q-answers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.q-answer {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: #fff; cursor: pointer;
  opacity: 0.6; transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  position: relative;
}
.q-answer.red    { background: var(--red); }
.q-answer.blue   { background: var(--blue); }
.q-answer.yellow { background: var(--yellow); }
.q-answer.green  { background: var(--green); }
.q-answer.is-correct {
  opacity: 1;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #26890c, 0 6px 16px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.q-answer input[type=radio] { accent-color: #fff; cursor: pointer; }
.q-answer .shape { font-size: 18px; }
.q-answer-text {
  flex: 1; border: none; background: rgba(255,255,255,0.95);
  padding: 8px 10px; border-radius: 8px; font-size: 14px;
  color: var(--text); font-weight: 600;
}
.q-answer-text:focus { outline: 2px solid #fff; }
.q-hint { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 10px; }

/* Botão Prêmios */
.btn-prize {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 14px; font-weight: 800;
  color: #1a1a1a; background: linear-gradient(135deg, #ffd700, #f4b000);
  border: none; border-radius: 10px; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 0 #a17800, 0 6px 14px rgba(244,176,0,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-prize:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #a17800, 0 10px 20px rgba(244,176,0,0.5); }
.btn-prize:active { transform: translateY(2px); box-shadow: 0 2px 0 #a17800; }
.btn-prize .prize-icon { font-size: 18px; animation: trophySwing 2s ease-in-out infinite; }
@keyframes trophySwing {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.modal.open { display: flex; animation: modalFade 0.25s ease; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 6, 26, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 780px; max-height: 90dvh; overflow-y: auto;
  background: #fff; color: var(--text);
  border-radius: 20px; padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: #f1f5f9; cursor: pointer;
  font-size: 16px; color: var(--muted);
  transition: background 0.15s;
}
.modal-close:hover { background: #fee2e2; color: var(--red); }
.modal-box h2 {
  font-size: 28px; margin-bottom: 6px;
  background: linear-gradient(135deg, #ff4060, #ffc235);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.prize-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.prize-card {
  background: #f8fafc; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-top: 4px solid transparent;
  transition: transform 0.2s;
}
.prize-card:hover { transform: translateY(-4px); }
.prize-card.p-gold   { border-top-color: #ffd700; background: linear-gradient(180deg, #fffbe6 0%, #f8fafc 40%); }
.prize-card.p-silver { border-top-color: #c0c0c0; background: linear-gradient(180deg, #f5f5f5 0%, #f8fafc 40%); }
.prize-card.p-bronze { border-top-color: #cd7f32; background: linear-gradient(180deg, #faf0e1 0%, #f8fafc 40%); }
.prize-place {
  font-size: 13px; font-weight: 800;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 6px;
}
.prize-place span { font-size: 22px; }
.prize-img {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 10px; padding: 10px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
.prize-img svg,
.prize-img img { width: 100%; height: 100%; max-height: 160px; object-fit: contain; }
.prize-name { font-weight: 700; font-size: 15px; text-align: center; }
.prize-value {
  font-weight: 900; font-size: 20px; color: #26890c;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .prize-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 20px; }
}

/* PÁGINA /premios (standalone) */
.premios-page {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: 48px 24px 40px;
  color: #fff;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
.premios-head {
  text-align: center; margin-bottom: 32px;
  animation: heroIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.premios-head h1 {
  font-size: clamp(40px, 7vw, 64px); font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffd700 0%, #ff4060 50%, #3a9aff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.premios-head p {
  font-size: 18px; color: rgba(255,255,255,0.7); font-weight: 500;
}

.premios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.premio {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 22px; padding: 28px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  position: relative; overflow: hidden;
  animation: premioIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.premio::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
}
.premio.p-gold::before   { background: linear-gradient(90deg, #ffd700, #ffa500); }
.premio.p-silver::before { background: linear-gradient(90deg, #e6e6e6, #a8a8a8); }
.premio.p-bronze::before { background: linear-gradient(90deg, #d68e4f, #8b5a20); }
.premio.p-gold   { animation-delay: 0.15s; }
.premio.p-silver { animation-delay: 0.05s; }
.premio.p-bronze { animation-delay: 0.25s; }
.premio.p-gold {
  box-shadow: 0 20px 40px rgba(0,0,0,0.35), 0 0 60px rgba(255,215,0,0.15);
  order: 2;
  transform: scale(1.05);
}
.premio.p-silver { order: 1; }
.premio.p-bronze { order: 3; }
@keyframes premioIn {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.premio.p-gold { animation-name: premioInGold; }
@keyframes premioInGold {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1.05); }
}

.premio-medal {
  font-size: 56px; line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
  animation: medalWiggle 3s ease-in-out infinite;
}
@keyframes medalWiggle {
  0%, 100% { transform: rotate(-6deg); }
  50%      { transform: rotate(6deg); }
}
.premio-place {
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.premio-img {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.5);
  margin: 4px 0;
}
.premio-img img {
  width: 100%; height: 100%; max-height: 220px;
  object-fit: contain;
}
.premio-name {
  font-size: 18px; font-weight: 800; text-align: center;
  margin-top: 4px;
}
.premio-value {
  font-size: 28px; font-weight: 900;
  background: linear-gradient(135deg, #3fc918, #26890c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.premios-foot {
  margin-top: auto; text-align: center;
  font-size: 16px; color: rgba(255,255,255,0.5);
  padding-top: 20px;
}

@media (max-width: 860px) {
  .premios-grid { grid-template-columns: 1fr; gap: 16px; }
  .premio.p-gold, .premio.p-silver, .premio.p-bronze { order: initial; transform: none; }
  .premio.p-gold { animation-name: premioIn; }
  .premio-img img { max-height: 180px; }
}
@media (max-width: 600px) {
  .q-answers { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .shape-bg { display: none; }
}
