/* ==========================================================================
   L'AVVENTO DEI PINGUINI — PER CHIARA
   Tema: Aurora Viola, Pinguini & Magia Natalizia
   ========================================================================== */

:root {
  --bg-deep: #0b0516;
  --bg-mid: #160a2b;
  --bg-plum: #241042;

  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #6d28d9;
  --orchid: #e879f9;

  --gold-200: #fef08a;
  --gold-300: #fde047;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;

  --ice-white: #f8f5ff;
  --text-main: #f5f0ff;
  --text-muted: #c7b8e6;
  --text-dim: #9583ba;

  --glass-bg: rgba(29, 14, 56, 0.62);
  --glass-bg-strong: rgba(22, 10, 42, 0.84);
  --glass-border: rgba(216, 180, 254, 0.22);
  --glass-border-strong: rgba(216, 180, 254, 0.42);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-soft: 0 14px 40px rgba(5, 2, 14, 0.55);
  --shadow-glow: 0 0 36px rgba(168, 85, 247, 0.35);
  --shadow-gold: 0 0 30px rgba(251, 191, 36, 0.38);

  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hand: 'Caveat', cursive;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: #140926;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: #140926;
  background-image: radial-gradient(circle at 50% -10%, #2e1259 0%, #15082a 48%, #090313 100%);
  background-attachment: fixed;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   SFONDO AURORA BOREALE VIOLA + NEVE
   ========================================================================== */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-ribbon {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: auroraFloat 18s ease-in-out infinite alternate;
}

.aurora-1 {
  width: 70vw;
  height: 48vh;
  top: -15vh;
  left: -10vw;
  background: radial-gradient(ellipse, #9333ea 0%, #6d28d9 45%, transparent 75%);
}

.aurora-2 {
  width: 65vw;
  height: 45vh;
  top: -5vh;
  right: -12vw;
  background: radial-gradient(ellipse, #d946ef 0%, #7c3aed 50%, transparent 75%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.aurora-3 {
  width: 55vw;
  height: 35vh;
  bottom: -10vh;
  left: 22vw;
  opacity: 0.25;
  background: radial-gradient(ellipse, #fbbf24 0%, #a855f7 45%, transparent 75%);
  animation-delay: -11s;
  animation-duration: 25s;
}

.stars-layer {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.2px 1.2px at 28% 8%, rgba(254,240,138,0.85), transparent),
    radial-gradient(1.6px 1.6px at 45% 24%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.2px 1.2px at 67% 12%, rgba(216,180,254,0.9), transparent),
    radial-gradient(1.5px 1.5px at 84% 22%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.3px 1.3px at 92% 40%, rgba(254,240,138,0.7), transparent),
    radial-gradient(1.4px 1.4px at 18% 52%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.2px 1.2px at 74% 62%, rgba(216,180,254,0.7), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes auroraFloat {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(3%, 4%, 0) scale(1.08) rotate(3deg); }
  100% { transform: translate3d(-3%, -2%, 0) scale(0.96) rotate(-3deg); }
}

@keyframes twinkle {
  0%   { opacity: 0.45; }
  100% { opacity: 0.95; }
}

#snow-canvas,
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#snow-canvas { z-index: 1; }
#confetti-canvas { z-index: 90; }

/* ==========================================================================
   SCHERMATA SEGRETA ("L'IGLOO SEGRETO")
   ========================================================================== */
.secret-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.secret-gate.unlocking {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.gate-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 28px 32px;
  text-align: center;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  position: relative;
}

.gate-penguin {
  width: 148px;
  height: 148px;
  margin: -10px auto 8px;
}

.svg-gate-penguin {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 24px rgba(147, 51, 234, 0.35));
}

.penguin-eyes {
  transform-origin: 90px 69px;
  animation: blink 4.8s infinite;
}

.floating-star {
  transform-origin: 90px 126px;
  animation: gentleFloat 3s ease-in-out infinite;
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

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

.gate-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-200);
  margin-bottom: 8px;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 1.95rem;
  line-height: 1.15;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 10%, #e9d5ff 55%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate-subtitle {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 24px;
}

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

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.secret-input {
  width: 100%;
  padding: 14px 46px 14px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--glass-border);
  background: rgba(11, 5, 22, 0.65);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.secret-input:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.22);
}

.secret-input::placeholder {
  color: var(--text-dim);
}

.icon-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 6px;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
}

.icon-btn:hover { opacity: 1; transform: scale(1.08); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #9333ea 0%, #c026d3 55%, #7c3aed 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(192, 38, 211, 0.55);
  filter: brightness(1.06);
}

.btn-primary:active {
  transform: translateY(0);
}

.secret-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 0.86rem;
  color: #fda4af;
}

.secret-hint {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.shake {
  animation: shakeAnim 0.42s ease;
}

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

/* ==========================================================================
   APP PRINCIPALE & HERO
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.7s ease both;
}

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

.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22), rgba(147, 51, 234, 0.35));
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.85rem;
  color: var(--gold-200);
  backdrop-filter: blur(10px);
}

.btn-ghost-sm {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(254, 240, 138, 0.5);
  background: rgba(11, 5, 22, 0.45);
  color: var(--gold-200);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-ghost-sm:hover { background: rgba(251, 191, 36, 0.2); }

.hero {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 18px;
}

.hero-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.greeting-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--purple-300);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.pill-btn:hover {
  transform: translateY(-2px);
  border-color: var(--purple-400);
  background: rgba(147, 51, 234, 0.28);
}

.pill-btn.icon-only {
  padding: 8px 11px;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a0b2e;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-center {
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}

.couple-penguin-stage {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-bottom: 4px;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.couple-penguin-stage:hover {
  transform: scale(1.04);
}

.couple-penguin-stage.hop {
  animation: penguinHop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes penguinHop {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-12px) scale(1.04); }
}

.svg-couple-penguins {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(147, 51, 234, 0.35));
}

.floating-heart {
  transform-origin: 130px 22px;
  animation: heartPulse 2.4s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.14) translateY(-3px); }
}

.penguin-speech {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 9px 15px;
  border-radius: 16px;
  background: rgba(250, 245, 255, 0.96);
  color: #241042;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 15;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.penguin-speech::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(250, 245, 255, 0.96);
}

@keyframes popIn {
  from { opacity: 0; transform: translateX(-50%) scale(0.8); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #e9d5ff 50%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.2vw, 1.06rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  margin-bottom: 14px;
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.status-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.status-value {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--gold-200);
}

.status-divider {
  width: 1px;
  height: 28px;
  background: var(--glass-border);
}

.progress-track {
  max-width: 340px;
  height: 7px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #a855f7, #e879f9, #fbbf24);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   GRIGLIA DELLE 24 CASELLE
   ========================================================================== */
.calendar-container {
  width: 100%;
  max-width: 1120px;
  margin: 12px auto 48px;
  padding: 0 20px;
  flex: 1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 560px) {
  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 840px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1080px) {
  .calendar-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
  }
}

.day-card {
  position: relative;
  min-height: 158px;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: linear-gradient(155deg, rgba(46, 20, 88, 0.72) 0%, rgba(20, 9, 38, 0.82) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              box-shadow 0.28s ease;
}

/* Decorazione angolare */
.day-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(216, 180, 254, 0.16), transparent 60%);
  pointer-events: none;
}

.day-card:hover {
  transform: translateY(-5px);
  border-color: var(--purple-400);
  box-shadow: 0 14px 32px rgba(9, 3, 22, 0.65), 0 0 22px rgba(168, 85, 247, 0.28);
}

.day-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.day-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ice-white);
}

.day-icon {
  font-size: 1.55rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.day-card:hover .day-icon {
  transform: scale(1.16) rotate(-6deg);
}

.day-card-bottom {
  width: 100%;
  z-index: 2;
}

.day-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple-300);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* STATO: BLOCCATA (FUTURO) */
.day-card.is-locked {
  background: linear-gradient(155deg, rgba(24, 12, 46, 0.56) 0%, rgba(14, 7, 28, 0.68) 100%);
  border-color: rgba(196, 181, 253, 0.13);
  opacity: 0.82;
}

.day-card.is-locked:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 181, 253, 0.26);
  box-shadow: 0 8px 20px rgba(9, 3, 22, 0.45);
}

.day-card.is-locked .day-number {
  color: rgba(245, 240, 255, 0.55);
}

.day-card.is-locked .day-icon {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.day-card.is-locked .day-status {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

/* STATO: OGGI (DISPONIBILE E IN EVIDENZA!) */
.day-card.is-today {
  border: 1.5px solid var(--gold-400);
  background: linear-gradient(145deg, rgba(126, 34, 206, 0.85) 0%, rgba(76, 29, 149, 0.9) 55%, rgba(46, 16, 101, 0.95) 100%);
  box-shadow: var(--shadow-soft), var(--shadow-gold);
  animation: todayPulse 2.8s ease-in-out infinite;
}

.day-card.is-today .day-number {
  color: var(--gold-200);
}

.day-card.is-today .day-status {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1d0b36;
}

@keyframes todayPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(9, 3, 22, 0.6), 0 0 22px rgba(251, 191, 36, 0.35); }
  50%      { box-shadow: 0 12px 34px rgba(9, 3, 22, 0.65), 0 0 36px rgba(251, 191, 36, 0.62); }
}

/* STATO: SBLOCCATA MA NON ANCORA APERTA */
.day-card.is-available .day-status {
  background: rgba(192, 132, 252, 0.22);
  color: var(--purple-300);
}

/* STATO: GIÀ APERTA */
.day-card.is-opened {
  border-color: rgba(216, 180, 254, 0.36);
  background: linear-gradient(155deg, rgba(88, 28, 135, 0.56) 0%, rgba(30, 14, 58, 0.82) 100%);
}

.day-card.is-opened .day-status {
  background: rgba(167, 243, 208, 0.16);
  color: #a7f3d0;
}

/* CASELLA 24 — VIGILIA SPECIALE */
.day-card.is-eve {
  border-color: rgba(251, 191, 36, 0.65);
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.86) 0%, rgba(162, 28, 175, 0.72) 55%, rgba(46, 16, 101, 0.94) 100%);
  box-shadow: 0 10px 28px rgba(9, 3, 22, 0.55), 0 0 22px rgba(251, 191, 36, 0.25);
}

.day-card.is-eve .day-number {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #fff, #fde047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   MODALI (SORPRESA DEL GIORNO & PORTAFOGLIO BUONI)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 3, 16, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeOverlay 0.25s ease;
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #210e40 0%, #130726 100%);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  animation: modalPop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card-wide {
  max-width: 620px;
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(90deg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-right: 40px;
}

.modal-day-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(168, 85, 247, 0.24);
  border: 1px solid rgba(216, 180, 254, 0.3);
  color: var(--purple-300);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-type-tag {
  font-size: 0.8rem;
  color: var(--gold-200);
  font-weight: 600;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
}

.modal-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-body {
  font-size: 0.98rem;
  line-height: 1.68;
  color: var(--ice-white);
}

.modal-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 180, 254, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --- MODALITÀ STORIE INSTAGRAM + INVITI + PENSIERI --- */
.story-progress-bars {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.story-bar {
  flex: 1;
  height: 5px;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.2s ease;
}

.story-bar:hover {
  transform: scaleY(1.35);
}

.story-bar.is-done {
  background: rgba(192, 132, 252, 0.72);
}

.story-bar.is-active {
  background: linear-gradient(90deg, #c084fc, #fbbf24);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.story-slide {
  animation: storySlideIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes storySlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.story-nav-btn {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.18s, opacity 0.2s;
}

.story-nav-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.28);
  transform: translateY(-1px);
}

.story-nav-btn.is-primary {
  border-color: rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, #9333ea 0%, #c026d3 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.42);
}

.story-nav-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.story-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* CARD INVITO ("Programma deciso da me") */
.invite-card {
  padding: 24px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, rgba(88, 28, 135, 0.65) 0%, rgba(30, 12, 58, 0.92) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.48);
  text-align: center;
  box-shadow: 0 14px 32px rgba(7, 2, 18, 0.48);
}

.invite-top-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(251, 191, 36, 0.18);
  color: var(--gold-200);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.invite-emoji {
  font-size: 2.3rem;
  margin-bottom: 6px;
}

.invite-title {
  font-family: var(--font-display);
  font-size: 1.42rem;
  color: #fff;
  margin-bottom: 8px;
}

.invite-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.invite-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: rgba(11, 5, 22, 0.45);
  border: 1px solid rgba(216, 180, 254, 0.18);
  text-align: left;
}

.invite-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
}

.invite-detail-label {
  color: var(--text-dim);
  font-weight: 600;
}

.invite-detail-value {
  color: var(--ice-white);
  font-weight: 600;
  text-align: right;
}

.invite-accepted-pill {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #34d399;
  color: #a7f3d0;
  font-size: 0.88rem;
  font-weight: 700;
}

/* CARD DOMANDA INTIMA / PROFONDA */
.deep-q-card {
  padding: 26px 22px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.28), rgba(22, 10, 44, 0.92));
  border: 1.5px solid rgba(216, 180, 254, 0.38);
  text-align: center;
  box-shadow: 0 14px 30px rgba(7, 2, 18, 0.45);
}

.deep-q-card.is-spicy {
  background: radial-gradient(circle at top right, rgba(217, 70, 239, 0.3), rgba(40, 10, 44, 0.94));
  border-color: rgba(244, 114, 182, 0.5);
}

.deep-q-tag {
  display: inline-block;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-200);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.deep-q-text {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 12px;
}

.deep-q-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.deep-q-footer {
  margin-top: 8px;
}

/* CARD OBBLIGO O VERITÀ DINAMICO */
.tod-card {
  padding: 22px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(216, 180, 254, 0.28);
  text-align: center;
}

.tod-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-200);
  margin-bottom: 8px;
}

.tod-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.tod-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tod-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tod-choice-btn:hover {
  transform: translateY(-3px);
}

.tod-choice-btn.is-truth:hover,
.tod-choice-btn.is-truth.is-selected {
  border-color: var(--purple-400);
  background: rgba(147, 51, 234, 0.32);
  box-shadow: 0 8px 22px rgba(147, 51, 234, 0.35);
}

.tod-choice-btn.is-dare:hover,
.tod-choice-btn.is-dare.is-selected {
  border-color: #f472b6;
  background: rgba(192, 38, 211, 0.32);
  box-shadow: 0 8px 22px rgba(217, 70, 239, 0.35);
}

.tod-choice-emoji { font-size: 1.7rem; }
.tod-choice-btn strong { font-size: 1rem; }
.tod-choice-btn small { font-size: 0.76rem; color: var(--text-muted); }

.tod-result {
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.55), rgba(30, 12, 58, 0.85));
  border: 1px solid rgba(251, 191, 36, 0.45);
  animation: fadeInUp 0.35s ease both;
}

.tod-result-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-200);
  margin-bottom: 8px;
}

.tod-result-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.5;
  color: #fff;
}

.tod-result-sub {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* CARD PENSIERO INTIMO ("Un dettaglio di te") */
.thought-card {
  padding: 26px 22px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top, rgba(192, 132, 252, 0.22), rgba(22, 10, 44, 0.85));
  border: 1px solid rgba(216, 180, 254, 0.34);
  text-align: center;
}

.thought-icon {
  font-size: 2.1rem;
  margin-bottom: 8px;
}

.thought-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple-300);
  margin-bottom: 10px;
}

.thought-text {
  font-family: var(--font-display);
  font-size: 1.24rem;
  line-height: 1.55;
  color: #fff;
  margin-bottom: 10px;
}

.thought-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- MULTI-BLOCCHI & BUSTA NATALIZIA SIGILLATA --- */
.modal-blocks-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.modal-block {
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.block-locked-until-open {
  display: none;
}

.block-revealed {
  animation: fadeInUp 0.6s ease both;
}

.block-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-200);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.35), transparent);
}

.envelope-stage {
  perspective: 1000px;
}

.envelope-wrapper {
  position: relative;
  width: 100%;
  min-height: 215px;
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, #4c1d95 0%, #2e1065 65%, #1d093d 100%);
  box-shadow: 0 16px 36px rgba(8, 3, 20, 0.55), 0 0 28px rgba(168, 85, 247, 0.3);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.45s ease;
}

.envelope-wrapper:hover:not(.is-open) {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 42px rgba(8, 3, 20, 0.65), 0 0 34px rgba(251, 191, 36, 0.35);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56%;
  background: linear-gradient(180deg, #6d28d9 0%, #581c87 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(254, 240, 138, 0.3);
}

.envelope-wrapper.is-open .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-wrapper.is-collapsed {
  display: none;
}

.envelope-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}

.envelope-seal {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fde047 0%, #f59e0b 55%, #b45309 100%);
  border: 3px solid rgba(254, 240, 138, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  animation: gentleFloat 2.6s ease-in-out infinite;
}

.envelope-to {
  font-family: var(--font-hand);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ice-white);
}

.envelope-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-200);
  letter-spacing: 0.04em;
}

.letter-unfold {
  animation: letterUnfold 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.letter-christmas {
  background: linear-gradient(160deg, rgba(250, 245, 255, 0.08) 0%, rgba(147, 51, 234, 0.14) 100%);
  border: 1px solid rgba(254, 240, 138, 0.34);
  box-shadow: inset 0 0 30px rgba(192, 132, 252, 0.1);
}

.letter-greeting {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-200);
  margin-bottom: 12px;
}

.quiz-step-pill {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(192, 132, 252, 0.18);
  color: var(--purple-300);
  font-size: 0.76rem;
  font-weight: 700;
}

/* --- FORMATO 1: LETTERA / DEDICA --- */
.letter-box {
  padding: 22px 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(216, 180, 254, 0.2);
  font-size: 1.02rem;
  line-height: 1.75;
  white-space: pre-line;
}

.letter-signature {
  margin-top: 16px;
  text-align: right;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  color: var(--purple-300);
}

/* --- FORMATO 2: BUONO / COUPON --- */
.coupon-ticket {
  position: relative;
  padding: 24px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b176e 0%, #6d28d9 52%, #9333ea 100%);
  border: 2px dashed rgba(254, 240, 138, 0.72);
  text-align: center;
  box-shadow: 0 12px 28px rgba(109, 40, 217, 0.45);
  overflow: hidden;
}

.coupon-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(254, 240, 138, 0.2);
  color: var(--gold-200);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.coupon-headline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 8px;
}

.coupon-desc {
  font-size: 0.94rem;
  color: #f3e8ff;
  margin-bottom: 18px;
}

.coupon-redeem-btn {
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #1b0a33;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.coupon-redeem-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.45);
}

.coupon-stamp {
  display: inline-block;
  padding: 7px 16px;
  border: 2px solid #86efac;
  border-radius: 8px;
  color: #86efac;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transform: rotate(-3deg);
  background: rgba(16, 185, 129, 0.14);
}

/* --- FORMATO 3: GRATTA E VINCI --- */
.scratch-instruction {
  font-size: 0.88rem;
  color: var(--purple-300);
  text-align: center;
  margin-bottom: 12px;
}

.scratch-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, #2e1065, #581c87);
  user-select: none;
  touch-action: none;
}

.scratch-prize {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.scratch-prize-emoji {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.scratch-prize-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold-200);
  margin-bottom: 4px;
}

.scratch-prize-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  transition: opacity 0.6s ease;
}

.scratch-canvas.revealed {
  opacity: 0;
  pointer-events: none;
}

/* --- FORMATO 4: RICORDO POLAROID --- */
.polaroid-frame {
  max-width: 340px;
  margin: 0 auto 16px;
  padding: 12px 12px 24px;
  background: #faf7ff;
  color: #1f1038;
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.5deg);
}

.polaroid-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  background: linear-gradient(135deg, #4c1d95, #9333ea);
}

.polaroid-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  background: linear-gradient(135deg, #3b176e, #7e22ce, #c026d3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #faf5ff;
  padding: 16px;
  text-align: center;
}

.polaroid-placeholder span { font-size: 2.5rem; }
.polaroid-placeholder small { font-size: 0.78rem; opacity: 0.85; }

.polaroid-caption {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 700;
  color: #2e1065;
}

.photo-story {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- FORMATO 5: PLAYER AUDIO PERSONALIZZATO (MP3) --- */
.audio-player-card {
  padding: 20px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(59, 23, 110, 0.62) 0%, rgba(22, 10, 44, 0.88) 100%);
  border: 1px solid rgba(216, 180, 254, 0.28);
  box-shadow: 0 12px 30px rgba(8, 3, 20, 0.45);
}

.audio-player-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.vinyl-disc {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fbbf24 0 9px, #9333ea 10px 19px, #120822 20px 32px, #2d1852 33px 34px, #120822 35px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(216, 180, 254, 0.18);
  animation: spinVinyl 6.5s linear infinite;
  animation-play-state: paused;
}

.vinyl-disc.is-playing {
  animation-play-state: running;
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.45), 0 6px 18px rgba(0, 0, 0, 0.5);
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.audio-meta {
  min-width: 0;
  flex: 1;
}

.audio-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.audio-meta h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-artist {
  font-size: 0.88rem;
  color: var(--purple-300);
}

.audio-pending-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--gold-200);
  font-size: 0.74rem;
  font-weight: 600;
}

.audio-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.25s;
}

.audio-eq.is-playing {
  opacity: 1;
}

.audio-eq span {
  width: 3px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to top, #a855f7, #fde047);
}

.audio-eq.is-playing span {
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}
.audio-eq.is-playing span:nth-child(2) { animation-delay: 0.18s; }
.audio-eq.is-playing span:nth-child(3) { animation-delay: 0.36s; }
.audio-eq.is-playing span:nth-child(4) { animation-delay: 0.12s; }

@keyframes eqBounce {
  0%   { height: 4px; }
  100% { height: 18px; }
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-play-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #a855f7 0%, #c026d3 60%, #fbbf24 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.45);
  transition: transform 0.2s, filter 0.2s;
}

.audio-play-btn:hover:not(:disabled) {
  transform: scale(1.07);
  filter: brightness(1.08);
}

.audio-play-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.audio-timeline {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.audio-seek {
  --seek-progress: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    to right,
    #c084fc 0%,
    #fbbf24 var(--seek-progress),
    rgba(255, 255, 255, 0.14) var(--seek-progress),
    rgba(255, 255, 255, 0.14) 100%
  );
  outline: none;
  cursor: pointer;
}

.audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fde047;
  border: 2px solid #2e1065;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
  cursor: pointer;
}

.audio-seek:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.audio-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.audio-mute-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.audio-mute-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.28);
}

.audio-mute-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.song-note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* --- FORMATO 6: QUIZ DI COPPIA --- */
.quiz-question {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: var(--ice-white);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.quiz-option:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--purple-400);
  transform: translateX(4px);
}

.quiz-option.correct {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #a7f3d0;
}

.quiz-option.wrong {
  background: rgba(244, 63, 94, 0.2);
  border-color: #fb7185;
  color: #fecdd3;
}

.quiz-feedback {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(216, 180, 254, 0.3);
  font-size: 0.92rem;
}

/* --- FORMATO 7: MINI-GIOCO MEMORY DEI PINGUINI --- */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.memory-tile {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--glass-border);
  background: linear-gradient(145deg, #3b176e, #1e0c3a);
  font-size: 1.7rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.memory-tile.flipped,
.memory-tile.matched {
  background: rgba(250, 245, 255, 0.14);
  border-color: var(--gold-400);
  transform: rotateY(180deg);
}

.memory-tile.matched {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
}

.memory-reward {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.32), rgba(251, 191, 36, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.45);
  text-align: center;
}

/* --- FORMATO 8: INDIZIO REGALO DI NATALE --- */
.clue-box {
  position: relative;
  padding: 24px 20px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), rgba(46, 16, 101, 0.65));
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  text-align: center;
}

.clue-number {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(251, 191, 36, 0.2);
  color: var(--gold-200);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.clue-text {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-style: italic;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 12px;
}

.clue-note {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --- PORTAFOGLIO BUONI --- */
.coupons-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-coupon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}

.wallet-coupon h4 {
  font-size: 0.98rem;
  margin-bottom: 2px;
}

.wallet-coupon p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.wallet-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST & FOOTER
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(92vw, 440px);
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  background: rgba(34, 15, 66, 0.96);
  border: 1px solid var(--purple-400);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.site-footer {
  text-align: center;
  padding: 22px 20px 34px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

@media (max-width: 520px) {
  .hero-top-bar {
    flex-wrap: wrap;
    justify-content: center;
  }
  .modal-card {
    padding: 24px 18px 22px;
  }
  .audio-player-top {
    flex-direction: column;
    text-align: center;
  }
  .audio-title-row {
    justify-content: center;
  }
}
