:root{
  --bg1:#120A12;
  --bg2:#1A0B16;
  --card: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.14);
  --text:#F7F3F6;
  --muted: rgba(247,243,246,.72);
  --accent1:#FF4D7D;
  --accent2:#B56BFF;
  --bad:#FF5A6B;
  --shadow: 0 24px 90px rgba(0,0,0,.50);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 20% 0%, rgba(255,77,125,.20), transparent 55%),
    radial-gradient(900px 600px at 80% 10%, rgba(181,107,255,.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  overflow-x:hidden;
}

/* ================= BACKGROUND ================= */
.bg{position:fixed; inset:0; pointer-events:none;}
.blob{
  position:absolute;
  width:520px; height:520px;
  filter: blur(55px);
  opacity:.35;
  border-radius: 999px;
  mix-blend-mode: screen;
}
.b1{
  left:-140px; top:-180px;
  background: radial-gradient(circle at 30% 30%, rgba(255,77,125,.95), transparent 60%);
  animation: float1 10s ease-in-out infinite;
}
.b2{
  right:-170px; bottom:-240px;
  background: radial-gradient(circle at 30% 30%, rgba(181,107,255,.90), transparent 60%);
  animation: float2 12s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(28px,40px)}}
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-34px,-28px)}}

.grain{
  position:absolute; inset:0;
  opacity:.10;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ================= HEARTS ================= */
.hearts{position:absolute; inset:0; overflow:hidden;}
.heart{
  position:absolute;
  bottom:-40px;
  font-size: 18px;
  opacity:.75;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
  animation: rise linear forwards;
}
@keyframes rise{
  0%{ transform: translateY(0) translateX(0) scale(.9); opacity:0; }
  10%{opacity:.85}
  100%{ transform: translateY(-110vh) translateX(var(--drift)) scale(1.15); opacity:0; }
}

/* ================= LAYOUT ================= */
.wrap{width:min(820px, 100%)}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card.inner{
  margin-top:16px;
  background: rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);
}

/* ================= SCREENS ================= */
.screen{display:none; opacity:0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease;}
.screen.active{display:block; opacity:1; transform: translateY(0);}
.hidden{display:none}

/* ================= TYPO ================= */
.brand{display:flex; gap:12px; align-items:center; margin-bottom:10px}
.mark{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:16px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  font-size:18px;
}
.kicker{
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: rgba(247,243,246,.60);
}
h1{font-size:26px;margin:0 0 8px}
h2{font-size:20px;margin:0 0 8px}
p{margin:0 0 14px}
.muted{color:var(--muted)}
.small{font-size:13px}
.tiny{font-size:12px}

/* ================= FORMS ================= */
label{display:block; margin:14px 0}
label span{display:block; font-size:14px; color:var(--muted); margin-bottom:6px}

input{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.24);
  color:var(--text);
  outline:none;
}
input:focus{
  border-color: rgba(255,77,125,.55);
  box-shadow: 0 0 0 3px rgba(255,77,125,.12);
}

/* ================= BUTTONS ================= */
.btn{
  width:100%;
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:0;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color:white;
  font-weight:900;
  cursor:pointer;
  transition: transform .06s ease, filter .12s ease;
}
.btn:hover{filter: brightness(1.05);}
.btn:active{transform: scale(.99)}
.btn.ghost{
  background: transparent;
  border:1px solid rgba(255,255,255,.18);
}

.row{display:flex; gap:10px; flex-wrap:wrap}
.row .btn{flex:1; min-width:160px}

.toprow{display:flex; align-items:center; justify-content:space-between; gap:12px}
.pill{
  padding:7px 11px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  color: rgba(247,243,246,.78);
  font-size:13px;
}

.hint{color: rgba(255,77,125,.92); margin-top:10px; min-height:1.2em}
.error{color: var(--bad); margin-top:10px; min-height:1.2em}

/* ================= PROGRESS ================= */
.progress{
  margin-top:16px;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
}
.bar{
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: width .25s ease;
}

/* ================= COUNTDOWN (ANSIA) ================= */
.countdownWrap{
  margin-top:10px;
  padding:18px;
  border:1px dashed rgba(255,255,255,.22);
  border-radius:20px;
  text-align:center;
}

.countdownBig{
  font-size:72px;
  font-weight:1000;
  letter-spacing: .06em;
  line-height:1;
}

.pulseLine{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:12px 0 6px;
}

.pulseDot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(255,77,125,.95);
  animation: pulse 0.75s ease-in-out infinite;
}

.pulseDot:nth-child(2){animation-delay: .12s}
.pulseDot:nth-child(3){animation-delay: .24s}

@keyframes pulse{
  0%,100%{transform: scale(.9); opacity:.55}
  50%{transform: scale(1.35); opacity:1}
}

/* ================= CINEMA FULLSCREEN (Netflix) ================= */
.cinema{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.cinemaVideo{
  width: min(1400px, 96vw);
  height: min(90vh, 820px);
  display:block;
  background:#000;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  object-fit: contain;
  box-shadow: 0 30px 120px rgba(0,0,0,.65);
}

/* X sempre sopra a tutto (Safari-proof) */
.cinemaClose{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2147483647;
  pointer-events: auto;

  width: 56px;
  height: 56px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.65);
  color: rgba(255,255,255,.95);

  font-size: 24px;
  font-weight: 1000;
  cursor: pointer;
}

.cinemaHint{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2147483646;

  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.88);
  font-weight: 800;

  max-width: min(980px, 92vw);
  text-align: center;
}

/* ================= VIDEO IN PAGINA (solo per dopo) ================= */
.video{
  width:100%;
  margin-top:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background:#000;
  object-fit: contain;
}

/* ================= BOX & DETTAGLI ================= */
.afterVideoNote{
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}

.ticket{
  margin-top:18px;
  padding:16px;
  border-radius:18px;
  background: rgba(255,77,125,.10);
  border:1px solid rgba(255,77,125,.20);
}
.ticketRow{display:flex; align-items:center; gap:10px}
.tag{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(247,243,246,.80);
}
.ticketSub{margin-top:10px; line-height:1.5; color: rgba(247,243,246,.78);}

.choice{margin-top:16px}
.choiceTitle{font-weight:800; margin-bottom:8px; color: rgba(247,243,246,.92);}

.fineprint{
  margin-top:12px;
  font-size:12px;
  color: rgba(247,243,246,.55);
}

/* ================= TOAST ================= */
.toast{
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(10px);
  color: rgba(247,243,246,.92);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  font-weight: 700;
  max-width: min(720px, 92vw);
  text-align:center;
}