:root {
  --bg-dark: #070604;
  --glass-bg: rgba(20, 16, 11, 0.84);
  --glass-border: rgba(212, 175, 55, 0.35);
  --gold-primary: #d4af37;
  --gold-light: #fcf6ba;
  --gold-deep: #9a7418;
  --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 28%, #b38728 55%, #fbf5b7 80%, #aa771c 100%);
  --text-main: #ffffff;
  --text-muted: #b5a689;
  --danger: #ff5252;
  --success: #56e39f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.18), transparent 60%),
    url('vip_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  padding: 32px 16px 60px;
  display: flex;
  justify-content: center;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.wallet-container {
  width: 100%;
  max-width: 880px;
}

/* Header */
.vip-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2.5px;
  margin-bottom: 12px;
}

.brand-logo {
  max-height: 75px;
  margin: 0 auto 12px;
  display: block;
}

.vip-header h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 6px 24px rgba(212, 175, 55, 0.25);
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Invalid / Demo Box */
.invalid-box {
  padding: 44px 28px;
  text-align: center;
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.invalid-box h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.invalid-box p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 10px;
  line-height: 1.5;
}

.hint-text {
  font-size: 14px;
  opacity: 0.85;
}

.demo-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Member Pass */
.member-pass {
  padding: 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.pass-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.28), transparent 70%);
  pointer-events: none;
}

.pass-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.pass-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.member-id {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.member-subinfo {
  font-size: 14px;
  color: var(--gold-light);
  margin-top: 4px;
}

.token-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 99px;
  font-size: 12px;
  color: var(--gold-light);
}

.balance-box {
  background: linear-gradient(145deg, rgba(35, 27, 15, 0.95), rgba(14, 11, 7, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 14px 22px;
  border-radius: 12px;
  text-align: right;
  min-width: 190px;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.15);
}

.balance-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.balance-amount {
  font-family: 'Cinzel', serif;
  font-size: 36px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin: 4px 0;
}

.balance-sub {
  font-size: 12px;
  color: var(--gold-light);
}

/* 20 E-Stamp Board */
.estamp-strip {
  padding: 22px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.estamp-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.estamp-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.quota-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--gold-primary);
  color: #fff;
}

.estamp-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

.estamp-grid-20 {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.18);
}

@media (max-width: 680px) {
  .estamp-grid-20 {
    grid-template-columns: repeat(5, 1fr);
  }
}

.stamp-slot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px dashed rgba(212, 175, 55, 0.32);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: all 0.35s ease;
}

.stamp-coin {
  width: 84%;
  height: 84%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.28);
  transition: all 0.35s ease;
}

.stamp-slot.stamped {
  border-style: solid;
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.65);
  transform: scale(1.04);
}

.stamp-slot.stamped .stamp-coin {
  background: var(--gold-gradient);
  color: #141008;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(0, 0, 0, 0.6);
}

.coin-dlr {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

.coin-sub {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Rule Banner */
.rule-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.18);
  padding: 12px 14px;
  border-radius: 10px;
}

.rule-icon {
  font-size: 22px;
}

.rule-item strong {
  display: block;
  font-size: 13px;
  color: var(--gold-light);
}

.rule-item span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Voucher Sections */
.voucher-section {
  margin-bottom: 34px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: var(--gold-light);
}

.count-pill {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold-light);
}

.count-pill.muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
}

.vouchers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

@media (max-width: 480px) {
  .vouchers-grid {
    grid-template-columns: 1fr;
  }
}

/* Luxury 3D Gold Cash Voucher Ticket */
.voucher-ticket {
  position: relative;
  display: flex;
  background: linear-gradient(135deg, #241d12 0%, #120e09 60%, #1d160d 100%);
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 18px rgba(212, 175, 55, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.voucher-ticket:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.9), 0 0 28px rgba(212, 175, 55, 0.35);
}

/* Animated Metallic Shimmer */
.voucher-ticket::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(252, 246, 186, 0.16),
    transparent
  );
  transform: skewX(-25deg);
  animation: ticketSweep 4.5s infinite;
  pointer-events: none;
}

@keyframes ticketSweep {
  0% { left: -120%; }
  45%, 100% { left: 160%; }
}

.ticket-left {
  background: var(--gold-gradient);
  color: #141008;
  width: 122px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-right: 2px dashed rgba(20, 16, 8, 0.45);
  position: relative;
  flex-shrink: 0;
}

.ticket-currency {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ticket-value {
  font-family: 'Cinzel', serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
  margin: 4px 0;
}

.ticket-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(20, 16, 8, 0.85);
  color: var(--gold-light);
}

.ticket-right {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ticket-code-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.serial-code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.status-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
}

.ticket-cond {
  font-size: 13px;
  color: #fff;
  margin-bottom: 4px;
}

.ticket-time {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.claim-btn {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: var(--gold-gradient);
  color: #141008;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.claim-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.02);
}

/* Claimed Ticket Styling */
.voucher-ticket.claimed {
  opacity: 0.68;
  border-color: rgba(255, 255, 255, 0.15);
}

.voucher-ticket.claimed::before {
  display: none;
}

.voucher-ticket.claimed .ticket-left {
  background: linear-gradient(135deg, #3a3630, #24211d);
  color: #9e9585;
}

.claimed-stamp {
  position: absolute;
  right: 16px;
  bottom: 14px;
  border: 2px solid var(--danger);
  color: var(--danger);
  padding: 4px 10px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  border-radius: 6px;
  transform: rotate(-12deg);
  background: rgba(20, 0, 0, 0.75);
  box-shadow: 0 0 12px rgba(255, 82, 82, 0.3);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  color: var(--text-muted);
}

/* Buttons */
.gold-btn {
  padding: 12px 20px;
  background: var(--gold-gradient);
  color: #141008;
  border: none;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s;
}

.gold-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.outline-btn {
  padding: 12px 20px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  font-size: 14px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 1000;
}

.modal-card {
  max-width: 440px;
  width: 100%;
  padding: 28px;
  text-align: center;
}

.modal-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.modal-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  color: #fff;
  margin-bottom: 10px;
}

.modal-instruction {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.modal-ticket-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: left;
}

.mini-val {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-light);
}

.mini-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.mini-meta strong {
  color: #fff;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
