:root {
  --hz-red: #e21b23;
  --hz-gold: #b8935e;
  --gold: #ffcf4a;
  --gold-deep: #e8a317;
  --saffron: #ff7a00;
  --marigold: #ffb300;
  --maroon: #2a0a18;
  --maroon-2: #4a0d2a;
  --purple: #3b0f4f;
  --cream: #fff7e6;
  --ink: #2b1a10;
  --muted: #7a5b44;
  --card: rgba(255, 248, 235, 0.97);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(1200px 700px at 50% -10%, #6b1238 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #3b0f4f 0%, transparent 60%),
    linear-gradient(180deg, var(--maroon) 0%, #1a0612 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------- background ---------- */
#fireworks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.glow { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .45; z-index: 0; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.glow-1 { width: 380px; height: 380px; background: var(--saffron); top: 20%; left: -120px; }
.glow-2 { width: 420px; height: 420px; background: #c2185b; bottom: -120px; right: -140px; animation-delay: -6s; }
@keyframes drift { to { transform: translate(60px, -40px) scale(1.15); } }

#lanterns { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.lantern {
  position: absolute; bottom: -80px; width: 26px; height: 34px;
  background: radial-gradient(circle at 50% 60%, #fff3b0 0%, #ffb300 35%, #ff6a00 75%);
  border-radius: 40% 40% 30% 30%;
  box-shadow: 0 0 22px 6px rgba(255, 160, 0, .55);
  animation: rise linear forwards;
}
.lantern::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 4px; transform: translateX(-50%); background: #7a2a00; border-radius: 2px; }
@keyframes rise {
  0%   { transform: translate(0, 0) rotate(-4deg); opacity: 0; }
  10%  { opacity: .95; }
  50%  { transform: translate(30px, -55vh) rotate(4deg); }
  90%  { opacity: .8; }
  100% { transform: translate(-20px, -115vh) rotate(-3deg); opacity: 0; }
}

/* marigold toran garland */
.toran { position: fixed; top: 0; left: 0; right: 0; height: 64px; display: flex; justify-content: space-between; z-index: 5; pointer-events: none; }
.toran .strand { display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: sway 3.2s ease-in-out infinite alternate; }
.toran .bead { width: 14px; height: 14px; border-radius: 50%; margin-top: -3px;
  background: radial-gradient(circle at 35% 35%, #ffe082, var(--marigold) 45%, #ef6c00 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.toran .bead.o { background: radial-gradient(circle at 35% 35%, #ffcc80, var(--saffron) 50%, #bf360c 100%); }
.toran .leaf { width: 12px; height: 20px; margin-top: -2px; background: linear-gradient(160deg, #66bb6a, #1b5e20); border-radius: 0 100% 0 100%; transform: rotate(45deg); }
.toran::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, #ef6c00, var(--marigold), #ef6c00); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; padding: 84px 16px 32px; }

.brand { display: flex; align-items: center; gap: 12px; justify-content: center; animation: fadeDown .8s ease both; }
.logo-badge { width: 64px; height: 64px; border-radius: 18px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--gold), 0 0 30px rgba(255, 207, 74, .55); animation: pulseGlow 2.6s ease-in-out infinite; }
.logo-badge img { width: 54px; height: 54px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .14em; color: #fff; }
.brand-tag { font-size: 12px; letter-spacing: .06em; color: var(--hz-gold); filter: brightness(1.35); }
@keyframes pulseGlow { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 46px rgba(255, 207, 74, .85); } }

.hero { text-align: center; margin: 22px 0 18px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); animation: fadeDown .8s .1s ease both; }
.title {
  font-family: "Yatra One", serif; font-weight: 400; margin: 6px 0 4px;
  font-size: clamp(48px, 14vw, 76px); line-height: 1;
  background: linear-gradient(90deg, #fff1a8, var(--gold), var(--saffron), var(--gold), #fff1a8);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 140, 0, .45));
  animation: shimmer 4s linear infinite, popIn .9s .15s cubic-bezier(.2, 1.4, .4, 1) both;
}
.title span { display: block; font-size: .5em; }
@keyframes shimmer { to { background-position: -250% 0; } }
.subtitle { margin: 8px auto 0; max-width: 400px; color: #ffe9d1; line-height: 1.5; animation: fadeDown .8s .25s ease both; }
.subtitle strong { color: var(--gold); }

/* diyas */
.diyas { display: flex; justify-content: center; gap: 36px; margin-top: 18px; }
.diya { position: relative; width: 54px; height: 22px; background: linear-gradient(180deg, #e65100, #8d2b00); border-radius: 0 0 50px 50px; box-shadow: inset 0 4px 0 #ffb74d, 0 6px 14px rgba(0,0,0,.4); }
.diya::before { content: ""; position: absolute; left: 50%; top: -3px; width: 6px; height: 8px; transform: translateX(-50%); background: #3e2723; border-radius: 2px; }
.flame { position: absolute; left: 50%; bottom: 24px; width: 14px; height: 26px; transform: translateX(-50%); transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 75%, #fff 0%, #fff59d 25%, #ffb300 55%, rgba(255, 87, 34, 0) 75%);
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  filter: drop-shadow(0 0 10px #ffb300) drop-shadow(0 0 22px #ff6d00);
  animation: flicker 1.3s ease-in-out infinite alternate; }
.diya:nth-child(2) .flame { animation-delay: -.4s; }
.diya:nth-child(3) .flame { animation-delay: -.8s; }
@keyframes flicker {
  0% { transform: translateX(-50%) scale(1, 1) rotate(-2deg); }
  40% { transform: translateX(-50%) scale(.92, 1.08) rotate(3deg); }
  70% { transform: translateX(-50%) scale(1.05, .95) rotate(-3deg); }
  100% { transform: translateX(-50%) scale(.97, 1.1) rotate(2deg); }
}

/* ---------- cards ---------- */
.card {
  position: relative; display: none; overflow: hidden;
  background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 26px 20px 22px;
  box-shadow: 0 0 0 2px rgba(255, 207, 74, .7), 0 20px 50px rgba(0, 0, 0, .5), 0 0 60px rgba(255, 140, 0, .25);
}
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(90deg, var(--hz-red) 0 12px, var(--gold-deep) 12px 24px, #8e24aa 24px 36px) top / 100% 6px no-repeat; }
.card.active { display: block; animation: cardIn .7s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
.card h2 { font-family: "Space Grotesk", sans-serif; margin: 4px 0 4px; font-size: 22px; text-align: center; color: var(--maroon-2); }
.hint { text-align: center; margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.rangoli-corner { position: absolute; width: 120px; height: 120px; opacity: .18; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--hz-red) 0 15deg, var(--gold-deep) 15deg 30deg, #8e24aa 30deg 45deg);
  -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 31% 38%, #000 39% 60%, transparent 61%);
          mask: radial-gradient(circle, #000 0 30%, transparent 31% 38%, #000 39% 60%, transparent 61%);
  animation: spin 30s linear infinite; }
.rangoli-corner.tl { top: -50px; left: -50px; }
.rangoli-corner.br { bottom: -50px; right: -50px; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- form ---------- */
form { position: relative; display: grid; gap: 14px; }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--maroon-2); letter-spacing: .02em; }
.field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 14px; border-radius: 12px; border: 1.5px solid #e6d3b3; background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.field input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(232, 163, 23, .22); transform: translateY(-1px); }
.field.invalid input { border-color: var(--hz-red); animation: shake .35s; }
.err { display: block; min-height: 0; color: var(--hz-red); font-size: 12px; margin-top: 4px; }
.err:empty { display: none; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.phone-wrap { display: flex; }
.phone-wrap .cc { display: grid; place-items: center; padding: 0 12px; font-weight: 700; color: var(--maroon-2); background: #fbecd0; border: 1.5px solid #e6d3b3; border-right: 0; border-radius: 12px 0 0 12px; }
.phone-wrap input { border-radius: 0 12px 12px 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 2px; accent-color: var(--hz-red); width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  padding: 15px 20px; border-radius: 14px; border: 0; width: 100%;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--hz-red), #ff5722 55%, var(--gold-deep));
  box-shadow: 0 8px 22px rgba(226, 27, 35, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
  animation: sheen 2.8s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(226, 27, 35, .6); }
.btn-primary .spark { display: inline-block; animation: twinkle 1.2s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.35) rotate(20deg); } }
.btn-ghost { margin-top: 14px; color: var(--maroon-2); background: transparent; border: 1.5px solid var(--hz-gold); }
.btn-ghost:hover { background: #fbecd0; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- scratch card ---------- */
.scratch-area {
  position: relative; width: 100%; max-width: 360px; aspect-ratio: 4 / 3; margin: 0 auto;
  border-radius: 18px; overflow: hidden; touch-action: none; user-select: none;
  box-shadow: 0 12px 30px rgba(74, 13, 42, .35), 0 0 0 3px var(--gold-deep);
  animation: floaty 3s ease-in-out infinite;
}
.scratch-area.done { animation: none; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.coupon { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px;
  background: radial-gradient(circle at 50% 50%, #fffaf0 0%, #ffe9b8 100%); }
.coupon::before { content: ""; position: absolute; inset: 8px; border: 2px dashed var(--hz-gold); border-radius: 12px; pointer-events: none; }
.coupon-inner { position: relative; }
.coupon-logo { width: 38px; height: 38px; }
.coupon-label { margin: 2px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.coupon-prize { margin: 4px 0; font-family: "Yatra One", serif; font-size: clamp(22px, 7vw, 30px); line-height: 1.1; color: var(--hz-red); }
.coupon-desc { margin: 0 0 8px; font-size: clamp(14px, 4.2vw, 17px); font-weight: 800; color: var(--maroon-2); line-height: 1.25; }
.coupon-code { display: inline-block; font-family: "Space Grotesk", monospace; font-weight: 700; letter-spacing: .12em; font-size: 14px; padding: 5px 12px; border-radius: 8px; background: var(--maroon-2); color: var(--gold); }
#scratch { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: opacity .8s ease; }
#scratch:active { cursor: grabbing; }
#scratch.gone { opacity: 0; pointer-events: none; }
.scratch-sparkles { position: absolute; inset: 0; pointer-events: none; }
.scratch-sparkles i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold);
  animation: sparkFly .7s ease-out forwards; }
@keyframes sparkFly { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }

/* ---------- result ---------- */
.burst { text-align: center; font-size: 46px; animation: popIn .8s cubic-bezier(.2, 1.6, .4, 1) both, glowPulse 2s ease-in-out infinite; }
@keyframes glowPulse { 50% { filter: drop-shadow(0 0 16px #ffb300); } }
@keyframes popIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.ticket { display: flex; margin: 14px 0 16px; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 26px rgba(74, 13, 42, .3); animation: popIn .7s .2s cubic-bezier(.2, 1.3, .4, 1) both; }
.ticket-left { flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px;
  background: linear-gradient(160deg, var(--hz-red), #9c0d2f); color: var(--gold); font-family: "Space Grotesk"; font-weight: 700; font-size: 13px; text-align: center; letter-spacing: .08em;
  border-right: 3px dashed rgba(255, 255, 255, .5); }
.ticket-left img { width: 44px; height: 44px; background: #fff; border-radius: 10px; padding: 3px; }
.ticket-right { flex: 1; padding: 14px; background: linear-gradient(135deg, #fff6df, #ffe6a8); text-align: center; }
.t-prize { margin: 0; font-family: "Yatra One", serif; font-size: 24px; line-height: 1.15; color: var(--hz-red); }
.t-desc { margin: 4px 0 10px; font-size: 15px; font-weight: 800; color: var(--maroon-2); line-height: 1.25; }
.t-code { font-family: "Space Grotesk", monospace; font-weight: 700; font-size: 17px; letter-spacing: .14em; padding: 8px 14px; border-radius: 10px; border: 2px dashed var(--hz-red); background: #fff; color: var(--maroon-2); cursor: pointer; }
.t-copy { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.details { list-style: none; padding: 12px 14px; margin: 0 0 14px; background: #fbf0dc; border-radius: 12px; font-size: 14px; display: grid; gap: 6px; }
.details li { display: flex; justify-content: space-between; gap: 10px; }
.details b { color: var(--maroon-2); }
.details span { text-align: right; word-break: break-all; }
.actions { display: grid; gap: 0; }
.actions .btn-save { margin-bottom: 12px; color: var(--maroon-2); background: linear-gradient(135deg, #fff1a8, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 8px 22px rgba(232, 163, 23, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
.actions .btn-save:hover { filter: brightness(1.05); }
.actions .btn-primary { background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 8px 22px rgba(18, 140, 126, .4); }
/* staff login + session bar */
.login-wrap { padding-top: 40px; }
.login-wrap .title { font-size: clamp(38px, 10vw, 58px); }
.pw-show { border: 1.5px solid #e6d3b3; border-left: 0; border-radius: 0 12px 12px 0; cursor: pointer; font: inherit; font-size: 13px; }
.login-msg { margin: 0; min-height: 18px; text-align: center; color: var(--hz-red); font-weight: 700; font-size: 13px; }
.shake-card { animation: shake .35s !important; }
.session-bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin: 0 auto 4px; font-size: 12px; color: #ffe9d1; }
.session-bar b { color: var(--gold); }
.session-bar button { background: rgba(255, 255, 255, .1); color: #ffe9d1; border: 1px solid rgba(255, 207, 74, .4); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.session-bar button:hover { background: rgba(255, 255, 255, .2); }

.link-btn { margin-top: 12px; background: none; border: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.tc { font-size: 11px; color: var(--muted); text-align: center; margin: 14px 0 0; }

.foot { text-align: center; font-size: 12px; color: rgba(255, 233, 209, .65); margin-top: 22px; }

.mute-btn { position: fixed; right: 14px; bottom: 14px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; cursor: pointer;
  background: rgba(74, 13, 42, .85); border: 1.5px solid var(--gold-deep); box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 16px rgba(255, 179, 0, .35);
  transition: transform .15s; }
.mute-btn:hover { transform: scale(1.08); }
.mute-btn:active { transform: scale(.92); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); z-index: 50; background: var(--maroon-2); color: var(--gold);
  padding: 12px 18px; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 1px var(--gold-deep); transition: transform .35s cubic-bezier(.2, 1.3, .4, 1); max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
