/* ==========================================================================
   1. DESIGN TOKENS & RESET
   ========================================================================== */
:root {
  /* Color System */
  --bg-primary: #070913;
  --bg-secondary: #0D1224;
  --bg-card: #131A33;
  --bg-card-highlight: #182245;
  --bg-glass: rgba(16, 23, 48, 0.75);
  
  --accent-neon: #00F59B;
  --accent-neon-glow: rgba(0, 245, 155, 0.35);
  --accent-yellow: #FFD027;
  --accent-yellow-glow: rgba(255, 208, 39, 0.35);
  --accent-cyan: #00D2FF;

  --text-main: #FFFFFF;
  --text-secondary: #A3B1CC;
  --text-muted: #627293;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 245, 155, 0.3);

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Dimensions & Spacing */
  --app-max-width: 430px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  
  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-family);
  background-color: #030408;
  color: var(--text-main);
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  background-color: var(--bg-primary);
}

/* ==========================================================================
   2. LAYOUT & DESKTOP CENTERING SHELL
   ========================================================================== */
.app-wrapper {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

/* Atmospheric Ambient Lights */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: 0.35;
}
.glow-top {
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--accent-neon), transparent 70%);
}
.glow-middle {
  top: 45%;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--accent-yellow), transparent 70%);
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 9, 19, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-neon), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070913;
  font-size: 18px;
  font-weight: 800;
}

.brand-name {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.3px;
}

.brand-flag {
  color: var(--accent-neon);
  font-weight: 900;
}

.campaign-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-neon);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-neon);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   4. HERO SECTION & RM500 DISPLAY
   ========================================================================== */
.hero-section {
  padding: 20px 18px 24px;
  position: relative;
  z-index: 1;
}

.hero-headline {
  text-align: center;
  margin-bottom: 18px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0, 245, 155, 0.1);
  border: 1px solid rgba(0, 245, 155, 0.25);
  color: var(--accent-neon);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(90deg, #FFFFFF 0%, var(--accent-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* RM500 Massive Card */
.reward-hero-card {
  position: relative;
  background: radial-gradient(100% 120% at 50% 0%, #19244A 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 0 30px var(--accent-neon-glow);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  overflow: hidden;
  margin-bottom: 18px;
}

.reward-glow-ring {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--accent-neon-glow) 0%, transparent 70%);
  pointer-events: none;
}

.reward-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-yellow);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.reward-trophy-icon {
  font-size: 1rem;
}

.reward-amount-box {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 4px 0 12px;
}

.reward-amount-box .currency {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-neon);
  text-shadow: 0 0 20px var(--accent-neon-glow);
}

.reward-amount-box .amount {
  font-size: 4.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  background: linear-gradient(180deg, #FFFFFF 25%, var(--accent-neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 245, 155, 0.4));
  animation: rewardPulse 3s infinite ease-in-out;
}

@keyframes rewardPulse {
  0%, 100% { filter: drop-shadow(0 6px 18px rgba(0, 245, 155, 0.4)); }
  50% { filter: drop-shadow(0 8px 26px rgba(0, 245, 155, 0.7)); }
}

.reward-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
  font-weight: 500;
}

.reward-terms {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Hero CTA Button */
.hero-action-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #00F59B 0%, #00C875 100%);
  color: #050B14;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 245, 155, 0.4);
  overflow: hidden;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}

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

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  animation: shineSweep 3.2s infinite ease-in-out;
}

@keyframes shineSweep {
  0% { left: -100%; }
  30%, 100% { left: 180%; }
}

.age-restriction-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-align: center;
}

.age-restriction-note strong {
  color: var(--accent-yellow);
}

/* ==========================================================================
   5. SLOTS MODULE (SLOT HARI INI)
   ========================================================================== */
.slots-section {
  padding: 0 18px 24px;
}

.slots-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

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

.slots-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.slots-title-wrap i {
  color: var(--accent-yellow);
  font-size: 1.2rem;
}

.slots-title-wrap h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.slot-mode-tag {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 208, 39, 0.15);
  border: 1px solid rgba(255, 208, 39, 0.35);
  color: var(--accent-yellow);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.slots-display {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.slots-counter-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.slots-number {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.slots-unit {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.slot-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--accent-neon);
}

.status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-neon);
  box-shadow: 0 0 6px var(--accent-neon);
}

.slots-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 10px;
}

.slots-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-neon));
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slots-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   6. 3-STEP PROCESS
   ========================================================================== */
.steps-section {
  padding: 8px 18px 28px;
}

.section-title-wrap {
  margin-bottom: 18px;
}

.section-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-neon);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.section-intro {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.steps-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-line {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 17px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-neon) 0%, rgba(255, 255, 255, 0.08) 100%);
  z-index: 0;
}

.step-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  z-index: 1;
}

.step-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-highlight);
  border: 2px solid var(--accent-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-neon);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 245, 155, 0.25);
}

.step-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.step-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-yellow);
  flex-shrink: 0;
}

.step-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.step-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   8. SPECIFICATIONS SECTION (MAKLUMAT KEMPEN)
   ========================================================================== */
.specs-section {
  padding: 0 18px 28px;
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.spec-card.highlight {
  border-color: rgba(0, 245, 155, 0.25);
  background: linear-gradient(90deg, var(--bg-card) 0%, rgba(0, 245, 155, 0.04) 100%);
}

.spec-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-neon);
  flex-shrink: 0;
}

.spec-card.highlight .spec-icon-box {
  color: var(--accent-yellow);
}

.spec-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.spec-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ==========================================================================
   9. TRUST & FOOTER
   ========================================================================== */
.trust-notice-section {
  padding: 0 18px 24px;
}

.trust-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px;
}

.trust-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-yellow);
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.trust-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.app-footer {
  text-align: center;
  padding: 16px 18px 24px;
  border-top: 1px solid var(--border-subtle);
  background: #04060C;
}

.copyright {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer-legal {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.bottom-safe-spacer {
  height: 90px; /* Safe space to prevent sticky overlap */
}

/* ==========================================================================
   10. STICKY BOTTOM CTA BAR (SAFE AREA COMPATIBLE)
   ========================================================================== */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.sticky-cta-content {
  pointer-events: auto;
  width: 100%;
  max-width: var(--app-max-width);
  background: rgba(11, 15, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 18px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sticky-reward-preview {
  display: flex;
  flex-direction: column;
}

.sticky-amount {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent-neon);
  letter-spacing: -0.5px;
}

.sticky-desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sticky-btn {
  position: relative;
  flex: 1;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-neon) 0%, #00C875 100%);
  color: #060D17;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--accent-neon-glow);
  overflow: hidden;
}

.sticky-btn:active {
  transform: scale(0.97);
}

/* Age confirmation dialog */
.btn-primary,
.sticky-btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

body.age-gate-open {
  overflow: hidden;
}

.age-gate-dialog {
  width: min(390px, calc(100% - 36px));
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 32px 24px 24px;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-main);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.age-gate-dialog::backdrop {
  background: rgba(3, 4, 8, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.age-gate-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 1.8rem;
  cursor: pointer;
}

.age-gate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  background: rgba(0, 245, 155, 0.1);
  color: var(--accent-neon);
  font-size: 1.4rem;
  font-weight: 800;
}

.age-gate-dialog h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.age-gate-description {
  margin: 10px 0 22px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.age-gate-error {
  margin: -6px 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  color: #FF9A9A;
  font-size: 0.82rem;
}

.age-gate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.age-gate-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.age-gate-yes {
  border: 1px solid var(--accent-neon);
  background: linear-gradient(135deg, var(--accent-neon), #00C875);
  color: #050B14;
}

.age-gate-no {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.js-age-gate-trigger:focus-visible,
.age-gate-option:focus-visible,
.age-gate-close:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 4px;
}

/* ==========================================================================
   11. ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
