/* Cápsula 2016→2026 — estilos */

:root {
  --bg-1: #ff5fa2;
  --bg-2: #7b2ff7;
  --bg-3: #00d4ff;
  --accent-yellow: #ffe14d;
  --accent-lime: #baff29;
  --ink: #1a1033;
  --paper: #fff7fb;
  --card-radius: 28px;
  --tap-min: 52px;
  --shadow-hard: 6px 6px 0 rgba(26, 16, 51, 0.9);
  --shadow-soft: 0 10px 30px rgba(26, 16, 51, 0.25);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Baloo 2", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 12px;
}

/* ---------- decorative floaters ---------- */
.floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floaters span {
  position: absolute;
  font-size: 2rem;
  opacity: 0.5;
  animation: float 9s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.floaters span:nth-child(1) { top: 6%;  left: 8%;  animation-delay: 0s; }
.floaters span:nth-child(2) { top: 18%; left: 78%; animation-delay: 1.2s; font-size: 2.6rem; }
.floaters span:nth-child(3) { top: 45%; left: 4%;  animation-delay: 2.1s; }
.floaters span:nth-child(4) { top: 70%; left: 84%; animation-delay: 0.6s; font-size: 2.3rem; }
.floaters span:nth-child(5) { top: 85%; left: 12%; animation-delay: 1.7s; }
.floaters span:nth-child(6) { top: 32%; left: 46%; animation-delay: 2.6s; font-size: 1.6rem; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* ---------- screens ---------- */
.screen {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: screenIn 0.35s ease both;
}

.screen[hidden] {
  display: none !important;
}

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

/* ---------- intro ---------- */
.intro {
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 4px 40px;
}

.badge-2016 {
  display: inline-block;
  background: var(--accent-yellow);
  color: var(--ink);
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard);
  transform: rotate(-4deg);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.title-main {
  font-size: 2.6rem;
  line-height: 1.05;
  font-weight: 800;
  color: var(--paper);
  text-shadow: 3px 3px 0 rgba(26, 16, 51, 0.9);
  margin: 6px 0 0;
}

.title-main .arrow {
  color: var(--accent-lime);
}

.subtitle {
  font-size: 1.08rem;
  color: var(--paper);
  font-weight: 600;
  max-width: 36ch;
  margin: 0;
  opacity: 0.95;
}

.intro-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 6px 0 4px;
}

.intro-facts span {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: var(--paper);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ---------- buttons ---------- */
.btn {
  appearance: none;
  border: 3px solid var(--ink);
  border-radius: 18px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  min-height: var(--tap-min);
  padding: 14px 20px;
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 rgba(26, 16, 51, 0.9);
}

.btn-primary {
  background: var(--accent-lime);
  color: var(--ink);
  width: 100%;
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
  width: 100%;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.btn-emoji {
  margin-right: 6px;
}

/* ---------- quiz ---------- */
.quiz {
  gap: 20px;
  padding-top: 6px;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-lime), var(--accent-yellow));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.progress-label {
  align-self: flex-end;
  color: var(--paper);
  font-weight: 700;
  font-size: 0.85rem;
}

.question-card {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hard);
  padding: 22px 18px;
}

.question-eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7b2ff7;
  margin: 0 0 6px;
}

.question-text {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.option-btn {
  appearance: none;
  text-align: left;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  padding: 14px 16px;
  min-height: var(--tap-min);
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(26, 16, 51, 0.9);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
}

.option-btn:active,
.option-btn.is-selected {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 rgba(26, 16, 51, 0.9);
  background: var(--accent-yellow);
}

/* ---------- result ---------- */
.result {
  gap: 18px;
  padding-top: 4px;
  align-items: center;
}

.result-heading {
  text-align: center;
  color: var(--paper);
}

.result-heading .eyebrow {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.result-heading h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 4px 0 0;
  text-shadow: 2px 2px 0 rgba(26, 16, 51, 0.9);
}

.canvas-frame {
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: #000;
  line-height: 0;
}

#resultCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.result-desc {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hard);
  padding: 18px;
  width: 100%;
}

.result-desc p {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.45;
}

.result-desc p:last-child {
  margin-bottom: 0;
}

.facts-title {
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b2ff7;
  margin: 0 0 8px;
}

.facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.facts-list li {
  display: flex;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.facts-list li::before {
  content: "✦";
  color: #ff5fa2;
  flex-shrink: 0;
}

.share-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
  max-width: 90vw;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 18px 0 6px;
  color: var(--paper);
  opacity: 0.75;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (min-width: 480px) {
  .title-main { font-size: 3rem; }
}

@media (max-width: 340px) {
  .title-main { font-size: 2.2rem; }
  .question-text { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .floaters span,
  .screen,
  .progress-fill,
  .btn,
  .option-btn {
    animation: none !important;
    transition: none !important;
  }
}
