/* ═══════════════ EPIC QUIZ — theme of wine-dark seas & stubborn gold ═══════════════ */

:root {
  --sea-deep: #071527;
  --sea: #0b1d33;
  --sea-light: #12294a;
  --gold: #e8b64c;
  --gold-bright: #ffd97a;
  --cream: #f4ead8;
  --coral: #ff6b6b;
  --seafoam: #6fe3c1;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: "Quicksand", sans-serif;
  background:
    radial-gradient(ellipse at 20% 0%, #16335c 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, #0e2f4d 0%, transparent 55%),
    var(--sea-deep);
  color: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

main#app {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

/* ─────────── screens ─────────── */
.screen { display: none; animation: surface 0.5s ease-out; text-align: center; }
.screen.active { display: block; }

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

/* ─────────── typography ─────────── */
.laurel { letter-spacing: 2px; opacity: 0.8; margin-bottom: 0.75rem; }

.title {
  font-family: "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 8vw, 4rem);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(232, 182, 76, 0.35), 0 4px 0 rgba(0, 0, 0, 0.35);
  letter-spacing: 3px;
}

.title.small { font-size: clamp(1.7rem, 6vw, 2.6rem); margin-bottom: 0.5rem; }

.subtitle { font-size: 1.15rem; margin: 0.75rem 0 1.75rem; line-height: 1.6; }

.gold { color: var(--gold-bright); }

/* ─────────── cards ─────────── */
.card {
  background: linear-gradient(160deg, var(--sea-light), var(--sea));
  border: 1px solid rgba(232, 182, 76, 0.35);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.6rem 1.5rem;
  margin: 1.25rem auto;
  text-align: left;
}

.card h2 {
  font-family: "Cinzel", serif;
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.card p, .card li { line-height: 1.7; }

.prophecy .prize {
  margin-top: 1rem;
  text-align: center;
  background: rgba(232, 182, 76, 0.08);
  border: 1px dashed rgba(232, 182, 76, 0.5);
  border-radius: 12px;
  padding: 1rem;
  line-height: 1.9;
}

.rules ul { list-style: none; }
.rules li { padding: 0.35rem 0 0.35rem 1.6rem; position: relative; }
.rules li::before { content: "⚡"; position: absolute; left: 0; }

/* ─────────── buttons ─────────── */
.btn {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1.5px;
  color: var(--sea-deep);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.2rem;
  margin-top: 1.25rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(232, 182, 76, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 26px rgba(232, 182, 76, 0.5); }
.btn:active { transform: translateY(1px); }
.btn.big { font-size: 1.15rem; padding: 1.1rem 2.6rem; }

.hidden { display: none !important; }

/* ─────────── quiz ─────────── */
.quiz-top { margin-bottom: 1rem; }
.progress-label { font-weight: 700; color: var(--gold); margin-bottom: 0.5rem; letter-spacing: 1px; }

.progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--seafoam), var(--gold-bright));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.fleet { margin-top: 0.5rem; font-size: 0.95rem; letter-spacing: 2px; min-height: 1.4em; }

.question-card h2 {
  font-family: "Quicksand", sans-serif;
  color: var(--cream);
  font-size: 1.25rem;
  line-height: 1.55;
  text-align: left;
}

.options { display: grid; gap: 0.7rem; margin-top: 1.2rem; }

.option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  text-align: left;
  font-family: "Quicksand", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(232, 182, 76, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(232, 182, 76, 0.1);
  transform: translateX(4px);
}

.option:disabled { cursor: default; opacity: 0.75; }

.option .letter {
  font-family: "Cinzel", serif;
  font-weight: 700;
  color: var(--gold);
  flex: 0 0 1.6em;
  text-align: center;
  font-size: 1.15rem;
}

.option.correct {
  border-color: var(--seafoam);
  background: rgba(111, 227, 193, 0.15);
  opacity: 1;
}

.option.wrong {
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.14);
  opacity: 1;
  animation: shake 0.35s ease;
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.feedback {
  margin-top: 1.1rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.06);
  border-left: 4px solid var(--gold);
}

.feedback.good { border-left-color: var(--seafoam); }
.feedback.bad { border-left-color: var(--coral); }

/* ─────────── results ─────────── */
.result-emoji { font-size: 4rem; margin-bottom: 0.5rem; animation: bob 2.2s ease-in-out infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.score-circle {
  width: 150px;
  height: 150px;
  margin: 1.4rem auto;
  border-radius: 50%;
  border: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(232, 182, 76, 0.12), transparent 70%);
  box-shadow: 0 0 40px rgba(232, 182, 76, 0.25);
}

.score-circle span { font-family: "Cinzel", serif; font-size: 2rem; font-weight: 900; color: var(--gold-bright); }
.score-circle small { font-size: 1rem; opacity: 0.85; }

.result-message { font-size: 1.1rem; line-height: 1.7; max-width: 34rem; margin: 0.5rem auto; }

/* ─────────── calendar ─────────── */
.calendar-card { max-width: 460px; margin-left: auto; margin-right: auto; }

.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }

.cal-month { font-family: "Cinzel", serif; font-weight: 700; color: var(--gold); font-size: 1.15rem; }

.cal-nav {
  background: rgba(232, 182, 76, 0.12);
  color: var(--gold);
  border: 1px solid rgba(232, 182, 76, 0.4);
  border-radius: 10px;
  width: 2.3rem;
  height: 2.3rem;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.15s;
}

.cal-nav:hover:not(:disabled) { background: rgba(232, 182, 76, 0.3); }
.cal-nav:disabled { opacity: 0.25; cursor: default; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }

.cal-days span { font-size: 0.75rem; font-weight: 700; opacity: 0.6; text-align: center; padding-bottom: 0.4rem; letter-spacing: 1px; }

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  cursor: pointer;
  transition: all 0.12s ease;
}

.cal-cell.empty { background: transparent; cursor: default; }

.cal-cell.disabled {
  opacity: 0.22;
  cursor: not-allowed;
  text-decoration: line-through;
}

.cal-cell:not(.disabled):not(.empty):hover { border-color: var(--gold); background: rgba(232, 182, 76, 0.15); }

.cal-cell.selected {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--sea-deep);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(232, 182, 76, 0.5);
}

.cal-cell.premiere { position: relative; }
.cal-cell.premiere::after { content: "🎬"; position: absolute; font-size: 0.55rem; bottom: 2px; right: 3px; }

.cal-note { margin-top: 0.9rem; font-size: 0.85rem; opacity: 0.8; text-align: center; }

/* ─────────── time picker ─────────── */
.time-card h2 small { font-size: 0.8rem; opacity: 0.7; }

.time-slots { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; }

.time-slot {
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(232, 182, 76, 0.3);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.time-slot:hover { border-color: var(--gold); }

.time-slot.selected {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--sea-deep);
  box-shadow: 0 0 14px rgba(232, 182, 76, 0.45);
}

/* ─────────── ticket ─────────── */
.ticket {
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  border: 2px dashed var(--gold);
  position: relative;
  background:
    radial-gradient(circle at 0% 50%, var(--sea-deep) 12px, transparent 13px),
    radial-gradient(circle at 100% 50%, var(--sea-deep) 12px, transparent 13px),
    linear-gradient(160deg, var(--sea-light), var(--sea));
}

.ticket h2 { letter-spacing: 2px; }

.ticket-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(244, 234, 216, 0.1);
  font-size: 0.98rem;
}

.ticket-line span:first-child { opacity: 0.7; flex-shrink: 0; }
.ticket-line :last-child { text-align: right; }

.ticket-fine { margin-top: 0.9rem; font-size: 0.75rem; opacity: 0.6; text-align: center; }

/* ─────────── footer ─────────── */
footer { text-align: center; padding: 0 0 1.2rem; font-size: 0.85rem; opacity: 0.75; overflow: hidden; }

.waves {
  white-space: nowrap;
  font-size: 1.3rem;
  animation: drift 14s linear infinite;
  margin-bottom: 0.4rem;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-3.2em); }
}

@media (max-width: 480px) {
  main#app { padding: 1.5rem 0.9rem 2rem; }
  .card { padding: 1.2rem 1rem; }
}

/* ─────────── toast ─────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translate(-50%, 200%);
  background: var(--cream);
  color: var(--sea-deep);
  font-weight: 700;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: min(90vw, 30rem);
  text-align: center;
  z-index: 997;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.toast.show { transform: translate(-50%, 0); }

/* ─────────── hermes cameo ─────────── */
.hermes {
  position: fixed;
  top: 16%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 998;
  pointer-events: none;
  transform: translateX(-80vw);
}

.hermes.flying { animation: hermes-fly 7s ease-in-out forwards; }

@keyframes hermes-fly {
  0%   { transform: translateX(-80vw); }
  18%  { transform: translateX(6vw); }
  80%  { transform: translateX(7vw); }
  100% { transform: translateX(130vw); }
}

.hermes-emoji {
  font-size: 2.8rem;
  filter: drop-shadow(0 0 12px rgba(255, 217, 122, 0.7));
  animation: bob 1.4s ease-in-out infinite;
}

.hermes-bubble {
  background: var(--cream);
  color: var(--sea-deep);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 0.7rem 1rem;
  border-radius: 14px 14px 14px 4px;
  max-width: 270px;
  box-shadow: var(--shadow);
}

/* ─────────── easter eggs ─────────── */
.shell { cursor: pointer; display: inline-block; transition: transform 0.15s ease; user-select: none; }
.shell:hover { transform: scale(1.35) rotate(-12deg); }

.waves { cursor: pointer; }

body.pig-mode .option .letter { font-size: 0; }
body.pig-mode .option .letter::before { content: "🐷"; font-size: 1.1rem; }
body.pig-mode .title { color: #ff9ec0; text-shadow: 0 0 30px rgba(255, 158, 192, 0.4), 0 4px 0 rgba(0, 0, 0, 0.35); }

.btn.dodge {
  transform: translateX(110px) rotate(8deg) !important;
  transition: transform 0.25s ease;
}
