/* ALPAGENATOR — midnight item-shop aesthetic.
   Deep violet base, candy neons, sticker-italic display type. */

:root {
  --bg: #12082a;
  --bg2: #1d0f45;
  --panel: #241356;
  --ink: #f4eeff;
  --ink-dim: #b9a8e8;
  --pink: #ff3da5;
  --aqua: #2be8d9;
  --yellow: #ffd52b;
  --purple: #8b5cf6;
  --display: 900 2.6rem/1.02 system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  font: 500 1rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, #3b1a7a 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 110%, #451566 0%, transparent 55%),
    var(--bg);
  padding: 1rem;
}

.phone { width: min(430px, 100%); }

/* ------------------------------------------------ language switch */

.lang-switch { display: flex; justify-content: flex-end; margin-bottom: 0.4rem; }
.lang-btn {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  background: var(--panel);
  border: 1.5px solid var(--purple);
  padding: 0.22rem 0.6rem;
  cursor: pointer;
}
.lang-btn:first-child { border-radius: 999px 0 0 999px; border-right: none; }
.lang-btn:last-child { border-radius: 0 999px 999px 0; }
.lang-btn.active { color: #1a0b2e; background: var(--aqua); border-color: var(--aqua); }
.lang-btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

.screen { display: none; text-align: center; }
.screen.active { display: block; animation: screen-in 0.35s ease-out; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------ display type */

.title {
  font: var(--display);
  font-style: italic;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 rgba(0, 0, 0, 0.45);
  margin: 0.5rem 0 0.4rem;
}
.title span { color: var(--aqua); }
.title-sm { font-size: 2rem; margin-top: 0.6rem; }

.tagline { color: var(--ink-dim); margin-bottom: 1.4rem; }
.eyebrow {
  color: var(--aqua);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 1.2rem 0 0.4rem;
}

/* ------------------------------------------------ the oracle */

.oracle { position: relative; display: inline-grid; place-items: center; margin: 0.6rem auto 0.8rem; }
.oracle-big  { width: 170px; height: 170px; }
.oracle-small { width: 110px; height: 110px; margin-bottom: 0.2rem; }

.aura-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--pink), var(--yellow), var(--aqua), var(--purple), var(--pink));
  animation: spin 7s linear infinite;
  filter: blur(1px) saturate(1.3);
}
.aura-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--bg2);
}
@keyframes spin { to { transform: rotate(360deg); } }

.oracle-face {
  position: relative;
  font-size: 4.2rem;
  animation: bob 3.2s ease-in-out infinite;
}
.oracle-small .oracle-face { font-size: 2.8rem; }
@keyframes bob { 50% { transform: translateY(-7px); } }

.taunt { min-height: 1.5em; color: var(--ink-dim); font-style: italic; margin-bottom: 0.8rem; }

/* ------------------------------------------------ chips + roster */

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.chips li {
  border: 1.5px solid var(--purple);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-dim);
  background: rgba(139, 92, 246, 0.12);
}

.roster { margin-top: 1.6rem; text-align: left; }
.roster summary {
  cursor: pointer;
  color: var(--ink-dim);
  text-align: center;
  font-size: 0.9rem;
}
.roster h3 {
  color: var(--aqua);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0.9rem 0 0.3rem;
}
.roster-grid { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.roster-grid span {
  background: var(--panel);
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
}

/* ------------------------------------------------ HUD */

.hud {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.4rem;
}
.hud-q {
  font-weight: 900;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--yellow);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.aura-meter { flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.aura-label {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.aura-track {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid var(--panel);
  overflow: hidden;
}
.aura-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua), var(--yellow), var(--pink));
  transition: width 0.5s ease;
}

/* ------------------------------------------------ question card */

.q-card {
  background: var(--panel);
  border: 2px solid var(--purple);
  border-radius: 18px;
  padding: 1.3rem 1.1rem;
  margin: 0.4rem 0 1.1rem;
  transform: rotate(-1.2deg);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.35);
}
.q-card p { font-size: 1.25rem; font-weight: 800; }
.q-card.swap { animation: card-pop 0.3s ease-out; }
@keyframes card-pop {
  from { opacity: 0; transform: rotate(-1.2deg) scale(0.92); }
  to   { opacity: 1; transform: rotate(-1.2deg) scale(1); }
}

/* ------------------------------------------------ buttons */

.btn {
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  border: none;
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.95); }
.btn:hover { filter: brightness(1.12); }
.btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

.btn-primary {
  display: block;
  width: 100%;
  font-size: 1.25rem;
  font-style: italic;
  color: #1a0b2e;
  background: linear-gradient(100deg, var(--yellow), var(--pink) 130%);
  box-shadow: 0 6px 0 #a3287a, 0 10px 24px rgba(255, 61, 165, 0.35);
}
.btn-primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #a3287a; }

.btn-secondary {
  display: block;
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--purple);
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.btn-ans { background: var(--panel); border: 2px solid var(--purple); font-size: 1rem; }
.btn-ans:hover { border-color: var(--aqua); }
.btn-idk { grid-column: 1 / -1; background: rgba(139, 92, 246, 0.25); }

.link {
  background: none;
  border: none;
  color: var(--ink-dim);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  margin-top: 1.1rem;
}
.link:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

/* ------------------------------------------------ guess / win / lose */

.guess-emoji { font-size: 5.5rem; margin-top: 0.5rem; animation: bob 3.2s ease-in-out infinite; }
.guess-name {
  font: var(--display);
  font-size: 2.2rem;
  font-style: italic;
  text-transform: uppercase;
  color: var(--aqua);
  text-shadow: 3px 3px 0 var(--pink);
  transform: rotate(-1.5deg);
  margin: 0.4rem 0 0.2rem;
}
.guess-franchise { color: var(--ink-dim); margin-bottom: 1.5rem; }
.verdict { display: grid; gap: 0.7rem; }

.result-line { font-size: 1.05rem; font-weight: 700; margin: 0.7rem 0 0.2rem; }
.result-sub { color: var(--ink-dim); margin-bottom: 1.2rem; }

.suspects { list-style: none; margin-bottom: 1.4rem; }
.suspects li {
  background: var(--panel);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  margin: 0.35rem auto;
  width: fit-content;
}

/* win confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute;
  top: -8%;
  font-size: 1.6rem;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(115vh) rotate(360deg); opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  .aura-ring, .oracle-face, .guess-emoji { animation: none; }
  .confetti { display: none; }
  .screen.active, .q-card.swap { animation: none; }
}
