@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  --bg: #17131d;
  --card: rgba(35, 29, 43, .92);
  --text: #fff9f5;
  --muted: #c5bbc8;
  --accent: #f0b5c5;
  --accent2: #f6d6a7;
  --line: rgba(255,255,255,.11);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 20% 10%, rgba(196,116,146,.24), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(223,172,110,.16), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

body::before, body::after {
  content: "";
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .25;
  pointer-events: none;
}
body::before { background: #b15b83; top: -100px; right: -100px; }
body::after { background: #d59b5a; bottom: -140px; left: -100px; }

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

.app {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
}

.card {
  width: min(100%, 480px);
  min-height: min(720px, calc(100svh - 70px));
  display: flex;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 30px 90px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}

.screen {
  width: 100%;
  padding: 42px 28px 34px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  animation: in .65s cubic-bezier(.2,.8,.2,1);
}
.screen.active { display: flex; }

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

.eyebrow {
  margin: 18px 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}

h1, h2 {
  margin: 0;
  font-size: clamp(39px, 10vw, 54px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
}
h2 { font-size: clamp(34px, 9vw, 46px); }
h1 em, h2 em {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  letter-spacing: -.025em;
}

.intro, .message {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 360px;
  margin: 24px auto 30px;
}
.message { margin: 20px auto 25px; }

.gift-icon, .lock, .heart {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(240,181,197,.18), rgba(246,214,167,.08));
  border: 1px solid rgba(240,181,197,.2);
  font-size: 37px;
  box-shadow: 0 15px 45px rgba(191,111,140,.15);
}
.lock { font-size: 31px; }
.heart {
  color: #f0b5c5;
  font-size: 42px;
  animation: pulse 1.8s infinite ease-in-out;
}
@keyframes pulse { 50% { transform: scale(1.08); } }

.primary {
  width: 100%;
  max-width: 340px;
  min-height: 58px;
  padding: 0 21px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #f1b7c7, #f2cfaa);
  color: #30232a;
  font: 700 15px "DM Sans", sans-serif;
  box-shadow: 0 12px 30px rgba(227,166,178,.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform .2s, filter .2s;
}
.primary:active { transform: scale(.98); }
.primary:hover { filter: brightness(1.05); }
.primary:disabled { opacity: .6; }

.arrow { font-size: 23px; font-weight: 400; }

form { width: 100%; max-width: 340px; }
input {
  width: 100%;
  height: 58px;
  margin: 4px 0 10px;
  padding: 0 18px;
  border-radius: 17px;
  border: 1px solid var(--line);
  outline: 0;
  background: rgba(255,255,255,.055);
  color: var(--text);
  text-align: center;
  font: 600 18px "DM Sans", sans-serif;
  letter-spacing: .08em;
  transition: border .2s, box-shadow .2s;
}
input::placeholder { color: #928897; letter-spacing: 0; font-weight: 400; }
input:focus {
  border-color: rgba(240,181,197,.65);
  box-shadow: 0 0 0 4px rgba(240,181,197,.08);
}
.error {
  height: 0;
  overflow: hidden;
  margin: 0;
  color: #f3a7b8;
  font-size: 13px;
  transition: height .2s, margin .2s;
}
.error.show { height: 24px; margin: 2px 0 8px; }
.shake { animation: shake .35s ease; }
@keyframes shake {
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.tickets {
  width: 100%;
  max-width: 390px;
  display: grid;
  gap: 11px;
}
.ticket {
  min-height: 72px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 40px 1fr 20px;
  align-items: center;
  gap: 10px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.055);
  transition: transform .2s, background .2s;
}
.ticket:active { transform: scale(.98); }
.ticket:hover { background: rgba(255,255,255,.085); }
.ticket-symbol {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(240,181,197,.1);
  font-size: 20px;
}
.ticket strong { display: block; font-size: 14px; margin-bottom: 4px; }
.ticket small { color: #a99fab; font-size: 11px; }
.ticket b { font-size: 21px; color: var(--accent); font-weight: 400; }

.confetti {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.piece {
  position: absolute;
  width: 7px; height: 12px;
  background: var(--accent);
  border-radius: 2px;
  animation: fall var(--d) var(--delay) cubic-bezier(.2,.8,.2,1) forwards;
}
.piece:nth-child(3n) { background: var(--accent2); }
.piece:nth-child(4n) { background: #fff0c8; width: 5px; height: 8px; }
@keyframes fall {
  0% { transform: translate(-50%, 0) rotate(0); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), 650px) rotate(var(--r)); opacity: 0; }
}

.footer {
  margin: 14px 0 0;
  color: #887d8c;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-height: 700px) {
  .card { min-height: calc(100svh - 45px); }
  .screen { padding-top: 25px; padding-bottom: 22px; }
  .gift-icon, .lock, .heart { width: 68px; height: 68px; font-size: 30px; }
  .eyebrow { margin-top: 12px; margin-bottom: 10px; }
  .intro { margin: 18px auto 22px; }
}

@media (min-width: 700px) {
  .app { padding: 40px; }
  .card { min-height: 700px; }
}
