:root {
  --bg-dark: #ffffff;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-red: #e11d48;
  --accent-red-hover: #be123c;
  --accent-glow: rgba(225, 29, 72, 0.18);
  --success-green: #10b981;
  --gold: #d97706;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #ffffff;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 12px 40px;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.04) 0%, transparent 50%);
}

.app-container {
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
}

/* Header */
.brand-header {
  text-align: center;
  padding: 12px 8px 18px;
}

.brand-logo-img {
  max-height: 54px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.event-badge {
  display: inline-block;
  margin-top: 8px;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: var(--accent-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
}

/* Cards & Containers */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  transition: transform 0.2s ease;
}

.card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label .req {
  color: var(--accent-red);
}

.form-input, .form-select {
  width: 100%;
  padding: 13px 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: #ffffff;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

/* Autocomplete Dropdown */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  display: none;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 11px 14px;
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}

.autocomplete-item:hover, .autocomplete-item.active {
  background: #fdf2f4;
  color: var(--accent-red);
  font-weight: 600;
}

.autocomplete-item .cat-badge {
  font-size: 10px;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Dual Reward Clubbed Banner & Cards */
.reward-club-banner {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fef2f2 100%);
  border: 2px solid #fecdd3;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.reward-club-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.reward-club-phrase {
  font-size: 18px;
  font-weight: 900;
  color: #881337;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.reward-club-desc {
  font-size: 12.5px;
  color: #4c0519;
  line-height: 1.5;
}

.dual-reward-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.dual-reward-pill {
  background: #ffffff;
  border: 1px solid #fda4af;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dual-reward-pill .pill-step {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dual-reward-pill .pill-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.dual-reward-pill .pill-loc {
  font-size: 11px;
  color: #64748b;
}

/* Radio Cards (Goodie Mode) */
.radio-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.radio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-card input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  margin-right: 12px;
  outline: none;
  cursor: pointer;
  display: grid;
  place-content: center;
  background: #ffffff;
}

.radio-card input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  background-color: #fff;
}

.radio-card input[type="radio"]:checked {
  border-color: var(--accent-red);
  background-color: var(--accent-red);
}

.radio-card input[type="radio"]:checked::before {
  transform: scale(1);
}

.radio-card.active {
  border-color: var(--accent-red);
  background: #fff1f2;
}

.radio-card-content {
  flex: 1;
}

.radio-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.radio-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Info Box / Dealer Box */
.info-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 15px;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.info-box.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.info-box.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  width: 100%;
  padding: 12px 18px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  place-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: grid;
}

.modal-content {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0,0,0,0.18);
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
}

.otp-digit {
  width: 52px;
  height: 58px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  outline: none;
  font-family: monospace;
}

.otp-digit:focus {
  border-color: var(--accent-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Digital Scratch Card */
.scratch-container {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 280px;
  margin: 0 auto 20px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
  border: 2px solid #e2e8f0;
  user-select: none;
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.scratch-prize-reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

.prize-icon {
  font-size: 44px;
  margin-bottom: 8px;
}

.prize-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-red);
  font-weight: 800;
}

.prize-name {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin: 4px 0 6px;
}

.prize-spec {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

/* Voucher Ticket Result Screen */
.voucher-ticket {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  margin-top: 15px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.voucher-code-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.voucher-code {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent-red);
  letter-spacing: 3px;
  font-family: monospace;
  margin: 6px 0 14px;
}

.qr-frame {
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  display: inline-block;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.qr-frame img {
  display: block;
  width: 160px;
  height: 160px;
}

.voucher-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  text-align: left;
}

.voucher-dual-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.voucher-dual-box.highlight {
  border-color: #fca5a5;
  background: #fff1f2;
}

.voucher-dual-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-red);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.voucher-dual-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.voucher-dual-loc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.voucher-notice {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 14px;
  line-height: 1.5;
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}
