/* ============================================================
   OMEGA-3 | Catppuccin Mocha Mystery Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&family=Share+Tech+Mono&display=swap');

/* ── CSS Variables ── */
:root {
  --base:      #1e1e2e;
  --mantle:    #181825;
  --crust:     #11111b;
  --surface0:  #313244;
  --surface1:  #45475a;
  --surface2:  #585b70;
  --overlay0:  #6c7086;
  --overlay1:  #7f849c;
  --overlay2:  #9399b2;
  --subtext0:  #a6adc8;
  --subtext1:  #bac2de;
  --text:      #cdd6f4;
  --lavender:  #b4befe;
  --blue:      #89b4fa;
  --sapphire:  #74c7ec;
  --sky:       #89dceb;
  --teal:      #94e2d5;
  --green:     #a6e3a1;
  --yellow:    #f9e2af;
  --peach:     #fab387;
  --maroon:    #eba0ac;
  --red:       #f38ba8;
  --mauve:     #cba6f7;
  --pink:      #f5c2e7;
  --flamingo:  #f2cdcd;
  --rosewater: #f5e0dc;

  --font-display: 'Cinzel Decorative', serif;
  --font-body:    'Crimson Text', serif;
  --font-mono:    'Share Tech Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--base);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
audio { width: 100%; border-radius: 8px; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }

/* ── Particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: floatUp linear infinite;
  opacity: 0;
}

@keyframes floatUp {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* ── Phase Header ── */
.phase-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  backdrop-filter: blur(12px);
  background: rgba(17,17,27,0.6);
  border-bottom: 1px solid var(--surface0);
}

.phase-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--mauve);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--surface1);
  border-radius: 4px;
  background: rgba(49,50,68,0.5);
}

/* ── PIN Pad ── */
.pin-section {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.pin-display {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  color: var(--lavender);
  letter-spacing: 1rem;
  padding: 1rem 2rem;
  background: var(--crust);
  border: 1px solid var(--surface1);
  border-radius: 8px;
  min-width: 200px;
  text-align: center;
  text-shadow: 0 0 12px rgba(180,190,254,0.4);
  transition: color 0.2s, border-color 0.2s;
}

.pin-display.shake {
  animation: shake 0.4s ease;
  color: var(--red);
  border-color: var(--red);
}

.pin-display.success-glow {
  color: var(--green);
  border-color: var(--green);
  text-shadow: 0 0 16px rgba(166,227,161,0.5);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  max-width: 260px;
  width: 100%;
}

.pin-btn {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--text);
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 8px;
  padding: 0.9rem;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pin-btn:hover {
  background: var(--surface1);
  border-color: var(--overlay0);
}

.pin-btn:active {
  transform: scale(0.92);
  background: var(--surface2);
}

.pin-btn.pin-clear {
  color: var(--peach);
  border-color: rgba(250,179,135,0.3);
}

.pin-btn.pin-clear:hover {
  background: rgba(250,179,135,0.1);
}

.pin-btn.pin-confirm {
  color: var(--green);
  border-color: rgba(166,227,161,0.3);
}

.pin-btn.pin-confirm:hover {
  background: rgba(166,227,161,0.1);
}

.pin-error {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(243,139,168,0.1);
  border: 1px solid rgba(243,139,168,0.3);
  border-radius: 6px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Success Overlay ── */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17,17,27,0.92);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.5s ease;
}

.success-card {
  background: var(--mantle);
  border: 1px solid var(--teal);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 0 60px rgba(148,226,213,0.15);
  position: relative;
}

.success-card.large-success {
  max-width: 600px;
  padding: 3rem;
}

.success-icon {
  font-size: 3rem;
  color: var(--teal);
  margin-bottom: 0.5rem;
  animation: pulseGlow 2s ease infinite;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 12px rgba(148,226,213,0.4); }
  50%       { text-shadow: 0 0 28px rgba(148,226,213,0.8); }
}

.success-text {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--text);
  font-style: italic;
}

.success-sub {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--teal);
}

.villain-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--maroon);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ── Next Button ── */
.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--mauve), var(--blue));
  color: var(--crust);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(203,166,247,0.3);
}

.next-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(203,166,247,0.4);
}

.next-btn.finale-btn {
  background: linear-gradient(135deg, var(--pink), var(--mauve));
  box-shadow: 0 4px 20px rgba(245,194,231,0.3);
}

/* ── Audio Player ── */
.audio-player {
  width: 100%;
  margin-top: 1rem;
}

.audio-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--overlay1);
  margin-bottom: 0.5rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ============================================================
   PHASE 0 – INTRO
   ============================================================ */

.phase-0 {
  background: radial-gradient(ellipse at 30% 20%, rgba(203,166,247,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(137,180,250,0.05) 0%, transparent 60%),
              var(--crust);
}

.intro-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.signal-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: blinkRed 1.5s ease infinite;
}

@keyframes blinkRed {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.signal-icon {
  font-size: 1.2rem;
}

.morse-display {
  max-width: 680px;
  width: 100%;
  background: rgba(17,17,27,0.8);
  border: 1px solid var(--surface1);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.morse-display::before {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mauve), transparent);
}

.morse-raw {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--overlay1);
  word-break: break-all;
  line-height: 2;
  letter-spacing: 0.05em;
}

.morse-decode-hint {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--mauve);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.morse-decode-hint:hover { color: var(--lavender); }

.decoded-message {
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--lavender);
  font-style: italic;
  border-left: 3px solid var(--mauve);
  padding-left: 1rem;
  animation: fadeIn 0.8s ease;
}

.enter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.enter-hint {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--subtext0);
  font-style: italic;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1px solid var(--mauve);
  color: var(--mauve);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  border-radius: 8px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.enter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--mauve);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.enter-btn:hover {
  color: var(--crust);
}

.enter-btn:hover::before {
  transform: translateX(0);
}

.static-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ============================================================
   PHASE 1 – FIRST WARDEN
   ============================================================ */

.phase-1 {
  background: var(--crust);
}

.flicker-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: rgba(30,30,46,0.15);
  animation: flicker 8s linear infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0; }
  90%       { opacity: 0; }
  91%       { opacity: 0.4; }
  92%       { opacity: 0; }
  93%       { opacity: 0; }
  94%       { opacity: 0.3; }
  95%       { opacity: 0; }
  97%       { opacity: 0.6; }
  98%       { opacity: 0; }
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.05) 2px,
    rgba(0,0,0,0.05) 4px
  );
}

.phase-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  position: relative;
  z-index: 10;
}

.riddle-card {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.6),
              inset 0 0 40px rgba(0,0,0,0.3);
}

.glitch-card::before,
.glitch-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(45deg, var(--red), var(--mauve), var(--blue));
  z-index: -1;
  opacity: 0.4;
  animation: glitchBorder 6s linear infinite;
}

.glitch-card::after {
  animation-delay: 3s;
  opacity: 0.2;
}

@keyframes glitchBorder {
  0%, 100% { clip-path: inset(0 0 98% 0); }
  25%       { clip-path: inset(0 98% 0 0); }
  50%       { clip-path: inset(98% 0 0 0); }
  75%       { clip-path: inset(0 0 0 98%); }
}

.riddle-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--mauve);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface0);
}

.riddle-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--subtext1);
  line-height: 1.9;
}

.riddle-clue {
  color: var(--text);
  font-style: italic;
  position: relative;
  padding-left: 1rem;
}

.riddle-clue::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--mauve);
  font-style: normal;
}

.riddle-clue em {
  color: var(--yellow);
  font-style: normal;
  font-weight: 600;
}

/* ============================================================
   PHASE 2 – DARKNESS
   ============================================================ */

.phase-2 {
  background: var(--crust);
  cursor: none;
}

.darkness-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(circle 1px at 50% 50%, transparent 0%, var(--crust) 1%);
  transition: background 0.05s linear;
}

.cursor-light {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(249,226,175,0.9);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 100;
  box-shadow: 0 0 6px rgba(249,226,175,0.6);
  transition: left 0.02s, top 0.02s;
}

.phase2-scene {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 5rem 1.5rem;
  z-index: 10;
}

.hidden-wall-text {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--overlay0);
  white-space: nowrap;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0.7;
}

.room-elements {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.safe-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.safe {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, var(--surface0), var(--mantle));
  border: 2px solid var(--surface1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.3s;
  position: relative;
  box-shadow: 4px 4px 0 var(--crust), 0 0 40px rgba(0,0,0,0.8);
}

.safe:hover {
  border-color: var(--blue);
  transform: scale(1.04);
}

.safe-icon {
  font-size: 3.5rem;
  color: var(--overlay0);
  transition: color 0.3s;
}

.safe:hover .safe-icon {
  color: var(--blue);
}

.safe-dial {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid var(--surface1);
  position: relative;
  background: var(--crust);
}

.safe-dial::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 3px;
  background: var(--overlay0);
  transform: translate(-50%, -50%) rotate(45deg);
  transform-origin: center;
}

/* PIN Overlay (Phase 2) */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(17,17,27,0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.pin-modal {
  background: var(--mantle);
  border: 1px solid var(--blue);
  border-radius: 14px;
  padding: 2.5rem;
  max-width: 340px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 0 50px rgba(137,180,250,0.15);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.close-modal {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  color: var(--overlay0);
  font-size: 1.1rem;
  padding: 0.3rem;
  transition: color 0.2s;
}

.close-modal:hover { color: var(--text); }

/* ============================================================
   PHASE 3 – FINAL RIDDLE
   ============================================================ */

.phase-3 {
  background: radial-gradient(ellipse at 50% 0%, rgba(245,194,231,0.05) 0%, transparent 50%),
              var(--crust);
}

.phase3-container {
  min-height: 100vh;
  padding: 6rem 1.5rem 3rem;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* Unicorn Section */
.unicorn-section {}

.unicorn-card {
  background: var(--mantle);
  border: 1px solid var(--pink);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 0 40px rgba(245,194,231,0.08);
}

.unicorn-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 8px rgba(245,194,231,0.4));
}

.unicorn-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--subtext1);
  line-height: 1.9;
}

.unicorn-text p { margin-bottom: 0; }

.warning-text {
  color: var(--maroon) !important;
  font-weight: 600 !important;
}

.unicorn-audio {
  width: 100%;
  margin-top: 0.5rem;
}

/* Poem Section */
.poem-section {}

.poem-card {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.poem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mauve), var(--blue), var(--teal));
}

.poem-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--mauve);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.poem-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.poem-stanza {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--subtext1);
  line-height: 2;
  padding-left: 1.5rem;
  border-left: 2px solid var(--surface1);
  transition: border-color 0.3s;
}

.poem-stanza[data-section="1"] { border-color: rgba(203,166,247,0.4); }
.poem-stanza[data-section="2"] { border-color: rgba(137,180,250,0.4); }
.poem-stanza[data-section="3"] { border-color: rgba(148,226,213,0.4); }

.poem-stanza.active-section {
  color: var(--text);
  background: rgba(49,50,68,0.5);
  border-radius: 0 8px 8px 0;
}

.poem-stanza[data-section="1"].active-section { border-color: var(--mauve); }
.poem-stanza[data-section="2"].active-section { border-color: var(--blue); }
.poem-stanza[data-section="3"].active-section { border-color: var(--teal); }

.poem-clue {
  color: var(--yellow) !important;
  font-style: italic;
}

.poem-final {
  border-color: rgba(245,194,231,0.4) !important;
  color: var(--text) !important;
  font-style: italic;
}

/* Audio Section Buttons */
.audio-sections {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface0);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.audio-section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--overlay1);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audio-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.audio-section-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: 6px;
  transition: all 0.2s;
  border: 1px solid var(--surface1);
  color: var(--subtext1);
  background: var(--surface0);
  -webkit-tap-highlight-color: transparent;
}

.audio-section-btn:nth-child(1) {
  color: var(--mauve);
  border-color: rgba(203,166,247,0.4);
}
.audio-section-btn:nth-child(2) {
  color: var(--blue);
  border-color: rgba(137,180,250,0.4);
}
.audio-section-btn:nth-child(3) {
  color: var(--teal);
  border-color: rgba(148,226,213,0.4);
}

.audio-section-btn:hover,
.audio-section-btn.playing {
  background: var(--surface1);
}

.audio-section-btn.playing i::before {
  content: '\f04c'; /* fa-pause */
}

/* ============================================================
   FINALE
   ============================================================ */

.finale {
  background: radial-gradient(ellipse at 50% 40%, rgba(245,194,231,0.08) 0%, rgba(203,166,247,0.04) 40%, var(--crust) 70%);
  min-height: 100vh;
}

.finale-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.finale-card {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 20px;
  padding: 3.5rem 3rem;
  max-width: 540px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  position: relative;
  box-shadow: 0 0 80px rgba(245,194,231,0.12),
              0 0 160px rgba(203,166,247,0.06);
}

.finale-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg, var(--pink), var(--mauve), var(--blue), var(--teal));
  z-index: -1;
  opacity: 0.4;
}

.finale-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.finale-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

@media (max-width: 500px) {
  .finale-title { font-size: 1.2rem; }
}

.name-highlight {
  color: var(--pink);
  text-shadow: 0 0 20px rgba(245,194,231,0.4);
}

.finale-separator {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mauve), transparent);
  border-radius: 2px;
}

.finale-message {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--subtext1);
  font-style: italic;
}

.finale-signatories {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--lavender);
  letter-spacing: 0.1em;
}

.finale-hearts {
  display: flex;
  gap: 0.8rem;
  font-size: 1.3rem;
  margin-top: 0.5rem;
}

.finale-hearts .fa-heart:nth-child(1) { color: var(--red); animation: heartbeat 1.2s ease infinite; }
.finale-hearts .fa-heart:nth-child(2) { color: var(--pink); animation: heartbeat 1.2s ease 0.4s infinite; }
.finale-hearts .fa-heart:nth-child(3) { color: var(--mauve); animation: heartbeat 1.2s ease 0.8s infinite; }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.25); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  70%       { transform: scale(1); }
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .morse-display { padding: 1.5rem; }
  .morse-raw { font-size: 0.85rem; }
  .riddle-card { padding: 1.5rem; }
  .poem-card { padding: 1.5rem; }
  .unicorn-card { padding: 1.5rem; }
  .poem-stanza { padding-left: 1rem; }
  .finale-card { padding: 2rem 1.5rem; }
  .hidden-wall-text { font-size: 1rem; white-space: normal; text-align: center; }
  .audio-btns { flex-direction: column; }
  .audio-section-btn { justify-content: center; }
  .phase3-container { gap: 2rem; }
}

@media (max-width: 400px) {
  .pin-pad { max-width: 220px; }
  .pin-btn { padding: 0.75rem; font-size: 1.1rem; }
  .pin-display { font-size: 2rem; }
}

/* ── Utility ── */
.hidden { display: none !important; }
