:root {
  --bg: #0b0714;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.14);
  --text: #f6f1ff;
  --muted: #a79fbd;
  --teal: #2dd4bf;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.45);
  --carnival-orange: #ff6a3d;
  --carnival-pink: #ff3d6b;
  --carnival-purple: #c026d3;
  --grad: linear-gradient(120deg, #ff6a3d 0%, #ff3d6b 60%, #c026d3 100%);
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px 48px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* Background Atmosphere */
.bg-backdrop {
  position: fixed;
  inset: -20px;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(255, 106, 61, 0.12), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(192, 38, 211, 0.12), transparent 60%),
    url('Diwali-background-image-01.png') center center / cover no-repeat;
  opacity: 0.2;
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.aurora-1, .aurora-2 {
  position: fixed;
  z-index: 0;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.aurora-1 { top: -20vw; left: -10vw; background: #ff6a3d; }
.aurora-2 { bottom: -25vw; right: -15vw; background: #7c3aed; animation-delay: -9s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vw, 4vw, 0) scale(1.15); }
}

.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.brand-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.brand-logo {
  max-width: 250px;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 30px rgba(255, 106, 61, 0.35));
}

.card {
  width: 100%;
  padding: 32px 28px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 500;
  transition: all 0.3s ease;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--carnival-orange);
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow .sparkle {
  color: var(--gold);
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.2;
}

.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

label span.req {
  color: var(--carnival-pink);
}

input[type="text"],
input[type="tel"] {
  width: 100%;
  padding: 15px 18px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="tel"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
}

.input-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}

/* Duplicate / Error Banner */
.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.4;
  animation: shake 0.4s ease-in-out;
}

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

.error-banner svg {
  flex-shrink: 0;
  color: #ef4444;
  margin-top: 2px;
}

/* Submit Button */
button.primary-btn {
  width: 100%;
  padding: 16px 24px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: var(--grad);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 61, 107, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

button.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 61, 107, 0.45);
  filter: brightness(1.08);
}

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

button.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* DIGITAL TICKET BADGE (Success View) */
.ticket-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  margin-bottom: 16px;
}

.ticket-card {
  width: 100%;
  background: linear-gradient(145deg, rgba(26, 18, 48, 0.85) 0%, rgba(15, 10, 30, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 24px 20px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(245, 158, 11, 0.1);
}

.ticket-card::before, .ticket-card::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: var(--bg);
  border-radius: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.ticket-card::before { left: -12px; }
.ticket-card::after { right: -12px; }

.ticket-ribbon {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 8px;
}

.ticket-number-display {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 6px 0 12px;
  font-family: 'Montserrat', system-ui, sans-serif;
  text-shadow: 0 0 24px var(--gold-glow);
}

.ticket-divider {
  border-top: 1px dashed rgba(245, 158, 11, 0.3);
  margin: 16px 0;
  width: 100%;
}

.ticket-details {
  display: flex;
  justify-content: space-around;
  text-align: left;
  width: 100%;
  padding: 0 8px;
}

.ticket-detail-item strong {
  display: block;
  font-size: 15px;
  color: #ffffff;
  font-weight: 700;
}

.ticket-detail-item span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.ticket-instructions {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 12px;
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}
