/* ===== Design Tokens ===== */
:root {
  /* Brand Colors */
  --red: #E63946;
  --red-dark: #C1121F;
  --red-light: #FF6B7A;
  --yellow: #FFD603;
  --yellow-light: #FFF3E0;
  --yellow-bg: #FFF8E1;
  --white: #FFFFFF;

  /* Tinted Neutrals — warm red undertone to match brand */
  --bg: #FAF8F7;
  --bg-card: #FFFFFF;
  --text: #1A1614;
  --text-secondary: #5C5450;
  --text-muted: #9A908C;
  --text-light: #7A706C;
  --border: #F0EBE8;
  --border-strong: #E2DAD5;
  --divider: #F5F0ED;

  /* Semantic Colors */
  --green: #2E7D32;
  --green-bg: #E8F5E9;
  --blue: #1565C0;
  --blue-bg: #E3F2FD;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  /* Radius Scale */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 50px;

  /* Shadow Scale */
  --shadow-sm: 0 1px 3px rgba(26,22,20,0.06);
  --shadow: 0 2px 8px rgba(26,22,20,0.08);
  --shadow-md: 0 4px 16px rgba(26,22,20,0.10);
  --shadow-lg: 0 8px 28px rgba(26,22,20,0.14);
  --shadow-red: 0 4px 14px rgba(230,57,70,0.30);
  --shadow-yellow: 0 3px 10px rgba(255,214,3,0.40);

  /* Layout */
  --nav-height: 60px;
  --max-width: 480px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.2s var(--ease-out);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: #FFF3D6;
}

body {
  font-family: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  width: 100%;
  position: relative;
  padding-bottom: var(--nav-height);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }

/* Focus-visible for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) { outline: none; }

/* ===== Navigation Bar ===== */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--nav-height);
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(193,18,31,0.18);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s var(--ease-out),
              transform 0.15s var(--ease-out),
              border-top-color 0.4s var(--ease-out),
              font-weight 0.35s var(--ease-out);
  border-top: 3px solid transparent;
  padding-top: 2px;
  position: relative;
}

.nav-item.active {
  color: var(--white);
  border-top-color: var(--yellow);
  font-weight: 600;
}

.nav-item:active {
  color: var(--white);
  transform: scale(0.92);
  transition: transform 0.1s;
}

.nav-icon { font-size: 20px; line-height: 1; }
.nav-label { font-size: 11px; letter-spacing: 0.2px; }

/* Icon pop when tab becomes active */
.nav-item.active .nav-icon {
  animation: navIconPop 0.35s var(--ease-out);
}

@keyframes navIconPop {
  0%   { transform: scale(0.7); opacity: 0.5; }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== Pages ===== */
.page {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  padding-bottom: var(--space-xl);
}

.page.active {
  display: block;
  animation: pageEnter 0.3s var(--ease-out);
}

/* Suppress pageEnter when arriving via swipe (swipe IS the transition) */
.page.active.swipe-enter { animation: none; }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.992); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Lock spin page — no scroll */
#page-spin {
  overflow: hidden;
  touch-action: manipulation;
  height: calc(100dvh - var(--nav-height));
  position: relative;
  background: linear-gradient(180deg, #FFF8E7 0%, #FFF3D6 40%, #FFF9F0 100%);
}

#page-spin.active {
  height: calc(100dvh - var(--nav-height));
  flex-direction: column;
  justify-content: flex-start;
  padding-bottom: 0;
  position: relative;
  background: linear-gradient(180deg, #FFF8E7 0%, #FFF3D6 40%, #FFF9F0 100%);
}

/* Floating food emojis */
.bg-float {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  animation: floatEmoji 5s ease-in-out infinite;
  display: inline-block;
}
.bg-float-1 { top: 5% !important; left: 6% !important; font-size: 26px !important; animation-delay: 0s !important; }
.bg-float-2 { top: 8% !important; right: 7% !important; font-size: 24px !important; animation-delay: 0.7s !important; }
.bg-float-3 { top: 35% !important; left: 3% !important; font-size: 22px !important; animation-delay: 1.4s !important; }
.bg-float-4 { top: 30% !important; right: 4% !important; font-size: 25px !important; animation-delay: 2.1s !important; }
.bg-float-5 { bottom: 35% !important; left: 5% !important; font-size: 24px !important; animation-delay: 2.8s !important; }
.bg-float-6 { bottom: 30% !important; right: 6% !important; font-size: 22px !important; animation-delay: 3.5s !important; }
.bg-float-7 { bottom: 8% !important; left: 8% !important; font-size: 25px !important; animation-delay: 4.2s !important; }
.bg-float-8 { bottom: 5% !important; right: 9% !important; font-size: 23px !important; animation-delay: 4.9s !important; }
@keyframes floatEmoji {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-22px) scale(1.15); }
}

/* Spin container */
.spin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 20px 8px;
  flex: 1;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Brand header */
.brand-header {
  text-align: center;
  margin-bottom: 0;
}

/* Circular logo with glowing ring */
.brand-logo-ring {
  width: 80px;
  height: 80px;
  margin: 0 auto 3px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--yellow) 0%, #FF9800 50%, var(--red) 100%);
  box-shadow: 0 0 14px rgba(255,214,3,0.6), 0 3px 10px rgba(230,57,70,0.25);
  animation: logoGlow 2.8s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(255,214,3,0.55), 0 3px 10px rgba(230,57,70,0.25); }
  50% { box-shadow: 0 0 24px rgba(255,214,3,0.85), 0 3px 14px rgba(230,57,70,0.4); }
}

.brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
  display: block;
  background: var(--white);
}

.brand-name {
  font-family: "Fredoka", sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 1px;
  line-height: 1.05;
  text-shadow: 0 2px 0 rgba(255,214,3,0.45), 0 3px 6px rgba(230,57,70,0.18);
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.spin-wheel-wrapper {
  position: relative;
  width: 310px;
  height: 310px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer golden ring with rotating shimmer */
.wheel-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #FFD603, #FF9800, #FFD603, #FFB300, #FFD603, #FF9800, #FFD603, #FFB300, #FFD603);
  padding: 7px;
  z-index: 1;
  box-shadow:
    0 8px 28px rgba(230,57,70,0.3),
    0 0 0 3px rgba(255,255,255,0.5),
    inset 0 0 0 2px rgba(255,214,3,0.4);
  animation: ringShimmer 3s linear infinite;
}

.wheel-ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--white);
}

/* Light bulb dots around the ring */
.wheel-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background-image:
    radial-gradient(circle 3px at 135px 4px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 240px 40px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 266px 135px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 240px 230px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 135px 266px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 40px 230px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 4px 135px, #FFF8E1, transparent),
    radial-gradient(circle 3px at 40px 40px, #FFF8E1, transparent);
  z-index: 3;
  pointer-events: none;
  animation: bulbBlink 0.6s ease-in-out infinite alternate;
}

@keyframes ringShimmer {
  0% { filter: hue-rotate(0deg) brightness(1); }
  50% { filter: hue-rotate(-8deg) brightness(1.1); }
  100% { filter: hue-rotate(0deg) brightness(1); }
}

@keyframes bulbBlink {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Glow behind wheel */
.spin-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,3,0.30) 0%, rgba(230,57,70,0.12) 50%, transparent 70%);
  animation: glowPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.55; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* Floating emojis around wheel */
.wheel-hype {
  position: absolute;
  font-size: 22px;
  animation: floatBob 1.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 6;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.wheel-hype-tl { top: -10px; left: -6px; animation-delay: 0s; }
.wheel-hype-tr { top: -10px; right: -6px; animation-delay: 0.35s; }
.wheel-hype-bl { bottom: -10px; left: -6px; animation-delay: 0.7s; }
.wheel-hype-br { bottom: -10px; right: -6px; animation-delay: 1.05s; }

@keyframes floatBob {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  50% { transform: translateY(-8px) scale(1.18) rotate(8deg); }
}

/* Hype text rows */
.spin-hype-top, .spin-hype-bottom {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 0;
}
.spin-hype-top { margin-top: -4px; }
.spin-hype-bottom { margin-bottom: -4px; }

.hype-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 6px rgba(255,214,3,0.8);
  animation: dotBlink 1.2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hype-text {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  animation: hypePop 1.8s ease-in-out infinite;
}

.hype-1 { color: var(--red); animation-delay: 0s; }
.hype-2 { color: #FF9800; animation-delay: 0.4s; }
.hype-3 { color: var(--red); animation-delay: 0.8s; }
.hype-4 { color: #FF9800; animation-delay: 1.2s; }

@keyframes hypePop {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.75; }
  50% { transform: scale(1.14) translateY(-2px); opacity: 1; }
}

/* Pointer — smaller */
.spin-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 22px solid var(--red);
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Cap — golden knob with red center */
.spin-pointer-cap {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE45E, #FFD603 50%, #FF9800 100%);
  border: 2px solid var(--red);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 -1px 2px rgba(0,0,0,0.15);
  z-index: 11;
}

.spin-pointer-cap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

#spinCanvas {
  width: 310px;
  height: 310px;
  border-radius: 50%;
  box-shadow:
    0 4px 20px rgba(230,57,70,0.3),
    inset 0 0 0 2px rgba(255,214,3,0.5);
  position: relative;
  z-index: 2;
  background: var(--white);
}

/* ===== SPIN button centered row ===== */
.spin-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.btn-tasks-float {
  position: absolute;
  left: -56px;
  top: calc(50% - 110px);
  transform: translateY(-50%);
  width: auto;
  height: 32px;
  padding: 5px 10px;
  border-radius: 16px;
  border: 1.5px solid var(--yellow);
  background: linear-gradient(135deg, #FFF9C4, var(--yellow));
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255,214,3,0.4);
  z-index: 50;
  transition: transform 0.15s;
  white-space: nowrap;
}
.btn-tasks-float:active { transform: translateY(-50%) scale(0.92); }
.btn-tasks-float .tasks-icon { font-size: 15px; line-height: 1; }
.btn-tasks-float .tasks-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

/* Free Food! — move left 10px */
.hype-1 { margin-left: 20px; }
.hype-2 { margin-left: 40px; }

/* ===== Winner Ticker — wider, young vibrant ===== */
.winner-ticker {
  margin-top: 14px;
  width: 100%;
  max-width: 100%;
  height: 80px;
  background: linear-gradient(180deg, #FFF8E1, #FFF3CD);
  border-radius: 12px;
  border: 2px solid #E63946;
  border-left: 5px solid #E63946;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 16px rgba(230,57,70,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
}
.ticker-track {
  display: flex;
  flex-direction: column;
  padding: 28px 12px 0;
  animation: tickerScrollUp 10s linear infinite;
  will-change: transform;
}
@keyframes tickerScrollUp {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #5C3D2E;
  line-height: 24px;
  min-height: 24px;
  white-space: nowrap;
  overflow: hidden;
}
.ticker-item .ticker-prize { color: #C1121F; font-weight: 700; }

/* ===== Task Popover (fixed-position dropdown) ===== */
.task-popover {
  position: fixed;
  width: 260px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
}
.task-popover.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.task-popover-arrow {
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0,0,0,0.06);
}
.task-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.task-popover-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #F5F5F5;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-popover-list { padding: 0 8px 8px; }
.task-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.task-popover-item:active { background: var(--bg-subtle); }
.task-popover-item .task-icon-bg {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--yellow), #FFE45E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.task-popover-item .task-info { flex: 1; }
.task-popover-item .task-name { font-size: 12px; font-weight: 600; color: var(--text); }
.task-popover-item .task-reward { font-size: 10px; color: var(--text-muted); }
.task-go-btn {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.task-go-btn:active { transform: scale(0.93); }

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 48px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s;
  box-shadow: var(--shadow-red);
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(230,57,70,0.25);
}

.btn-primary:disabled {
  background: var(--border-strong);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* SPIN button — pulsing + gradient + shine */
.btn-spin {
  font-family: "Fredoka", sans-serif;
  font-size: 24px;
  padding: 14px 58px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #FF4B5C 0%, var(--red) 45%, var(--red-dark) 100%);
  border: 2px solid rgba(255,255,255,0.25);
  animation: btnPulse 1.5s ease-in-out infinite;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  text-transform: uppercase;
}

.btn-spin:disabled {
  animation: none;
  background: #E0E0E0;
  border-color: transparent;
  text-shadow: none;
}

.btn-spin-text {
  position: relative;
  z-index: 2;
}

/* Shine sweep */
.btn-spin-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shineSweep 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

@keyframes btnPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(230,57,70,0.35), 0 0 0 0 rgba(230,57,70,0.4);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 8px 26px rgba(230,57,70,0.55), 0 0 0 6px rgba(230,57,70,0.08);
  }
}

@keyframes shineSweep {
  0% { left: -100%; }
  45% { left: 100%; }
  100% { left: 100%; }
}

.btn-directions {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  margin-top: 16px;
}/* ===== Menu Page — Left Sidebar Layout ===== */
.menu-header {
  text-align: center;
  padding: 0;
  position: relative;
}

.menu-banner {
  position: relative;
  width: 100%;
  height: 72px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(230,57,70,0.75) 0%, rgba(193,18,31,0.85) 100%);
}

.menu-banner h2 {
  position: relative;
  z-index: 2;
  color: var(--white) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 2px;
}

.menu-banner .menu-subtitle {
  position: relative;
  z-index: 2;
  color: rgba(255,255,255,0.9) !important;
}

.menu-header h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.menu-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.menu-layout {
  display: flex;
  height: calc(100vh - var(--nav-height) - 72px);
  overflow: hidden;
}

/* Left sidebar — categories */
.menu-sidebar {
  width: 92px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-sm) 0;
}

.menu-sidebar::-webkit-scrollbar { display: none; }

.cat-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-right-color 0.35s ease;
  border-right: 3px solid transparent;
  text-align: center;
  line-height: 1.3;
  position: relative;
}

.cat-tab.active {
  background: var(--yellow-bg);
  color: var(--red);
  font-weight: 600;
  border-right-color: var(--red);
}

.cat-tab.active::after {
  content: none;
}

.cat-tab:active {
  background: var(--divider);
}

.cat-tab-icon {
  font-size: 22px;
  line-height: 1;
}

.cat-tab-label {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  /* Prevent text shift when active — always bold-weight layout */
  width: 100%;
  text-align: center;
}

/* Right content — menu items */
.menu-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  padding-bottom: 40px;
}

.menu-list {
  padding: 8px 12px;
}

.menu-note {
  background: var(--yellow-light);
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

.menu-note strong { color: var(--red); }

.menu-item {
  display: flex;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: box-shadow var(--transition), transform 0.15s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.menu-item:active {
  box-shadow: var(--shadow-md);
  transform: scale(0.98);
}

.menu-item-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--yellow-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.menu-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.menu-item-code {
  display: inline-block;
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  font-family: "Fredoka", sans-serif;
}

.menu-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.menu-item-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
  margin-top: 4px;
}

.menu-item-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Category banner inside menu content */
.menu-cat-banner {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
}

.menu-cat-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Product Detail Modal ===== */
.product-modal.modal-overlay {
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.product-modal.modal-overlay.active {
  display: flex;
}

.product-modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  background: var(--white);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  position: relative;
  transform: translateY(100%);
  animation: productModalEnter 0.35s var(--ease-out) forwards;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.25);
}

@keyframes productModalEnter {
  from { opacity: 0; transform: translateY(60px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.product-modal.active .product-modal-card {
  animation: productModalEnter 0.35s var(--ease-out) forwards;
}

.product-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s, background 0.15s;
}

.product-modal-close:active { transform: scale(0.92); }

.product-modal-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #FFF5D1 0%, #FFE082 100%);
  position: relative;
  overflow: hidden;
}

.product-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-modal-image.hidden,
.product-modal-placeholder.hidden,
.product-modal-tag.hidden { display: none; }

.product-modal-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.product-modal-body {
  padding: 22px 20px 28px;
}

.product-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.product-modal-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-modal-code {
  font-size: 12px;
  color: var(--text-muted);
}

.product-modal-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 8px;
}

.product-modal-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 14px;
}

.product-modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (min-width: 480px) {
  .product-modal {
    align-items: center !important;
  }
  .product-modal-card {
    border-radius: var(--radius-lg);
    max-height: 90vh;
  }
}

.map-embed {
  width: 100%;
  height: 320px;
  background: #E8F0FE;
  border-radius: 0;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-info-card {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
}

.map-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.map-info-icon { font-size: 24px; }

.map-info-label {
  font-size: 11px;
  color: var(--text-muted);
}

.map-info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-top: 2px;
}

/* ===== Visit Page ===== */
.visit-header {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl) var(--space-md);
}

.visit-header h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
}

.visit-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.hours-card {
  text-align: center;
  background: linear-gradient(135deg, var(--yellow-bg) 0%, #FFFDF5 100%);
  border: 1px solid rgba(255,214,3,0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.hours-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.open { background: #4CAF50; }
.status-dot.closed { background: #e53935; }

.status-text {
  font-size: 12px;
  color: #4CAF50;
  font-weight: 600;
}

.hours-time {
  font-family: "Fredoka", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.5px;
}

.hours-days {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 4px;
}

.hours-table {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin: var(--space-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px var(--space-lg);
  border-bottom: 1px solid var(--divider);
  transition: background var(--transition);
}

.hours-row:last-child { border-bottom: none; }

.hours-row.today {
  background: var(--yellow-bg);
}

.hours-day { font-size: 16px; color: var(--text-secondary); font-weight: 500; }

.hours-time-cell { font-size: 16px; color: var(--text); font-weight: 600; }

/* ===== Contact Section ===== */
.contact-section {
  padding: var(--space-xl) var(--space-lg);
}

.contact-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  transition: box-shadow var(--transition), transform 0.15s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.contact-item:active {
  box-shadow: var(--shadow-md);
  transform: scale(0.98);
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.contact-icon.fb-bg { background: #1877F2; color: white; font-weight: 700; }
.contact-icon.wa-bg { background: #25D366; }

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
}

.contact-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

/* ===== Coupon Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
}

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

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 340px;
  width: 100%;
  overflow: hidden;
  animation: modalIn 0.3s ease;
  opacity: 1;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  background: var(--red);
  padding: 20px;
  text-align: center;
}

.modal-celebrate {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
}

.modal-body {
  padding: 24px 20px 20px;
  text-align: center;
}

.coupon-prize {
  font-family: "Fredoka", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.coupon-validity {
  display: inline-block;
  background: var(--yellow);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.qr-code-box {
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-code-box img, .qr-code-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.coupon-code {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.coupon-instructions {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.coupon-account-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #5D4037;
  line-height: 1.5;
}

.coupon-account-hint .hint-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.coupon-account-hint strong {
  color: var(--red);
}

.modal-close-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border-radius: var(--radius);
}

/* ===== Hidden Staff Portal Link ===== */
.staff-portal-hidden {
  text-align: center;
  padding: 20px 0 40px;
}

.staff-portal-hidden a {
  font-size: 18px;
  color: var(--border);
  opacity: 0.3;
  transition: opacity 0.3s;
  text-decoration: none;
}

.staff-portal-hidden a:active {
  opacity: 1;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (min-width: 481px) {
  body {
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
  }
}

/* ===== No Spin Animation ===== */
.spin-wheel-wrapper.spinning #spinCanvas {
  pointer-events: none;
}

.spin-wheel-wrapper.spinning .spin-pointer {
  animation: pointerWiggle 0.1s ease infinite alternate;
}

@keyframes pointerWiggle {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(5deg); }
}

/* Wheel idle wobble — subtle life when not spinning (delayed after spin stops) */
.spin-wheel-wrapper:not(.spinning):not(.no-wobble) #spinCanvas {
  animation: wheelIdleWobble 4s ease-in-out infinite;
}

@keyframes wheelIdleWobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(1.5deg); }
  75% { transform: rotate(-1.5deg); }
}

/* Ring pulse on win */
.spin-wheel-wrapper.win-pulse {
  animation: winPulse 0.6s ease-out;
}

@keyframes winPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.08); }
  60% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* ===== Fireworks Canvas ===== */
.fireworks-canvas {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 180;
  pointer-events: none;
}

.fireworks-canvas.active {
  display: block;
}

/* ===== Win Overlay (Red Envelope → Prize Reveal) ===== */
.win-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 190;
  align-items: center;
  justify-content: center;
}

/* Starry background as pseudo-element — fades independently, content stays solid */
.win-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 200px 90px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 250px 50px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 300px 20px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 350px 100px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 50px 150px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 120px 180px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 200px 200px, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 280px 160px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 340px 220px, rgba(255,255,255,0.7), transparent),
    radial-gradient(circle at 50% 50%, rgba(20,10,30,0.6) 0%, rgba(10,5,20,0.7) 100%);
  background-repeat: repeat;
  background-size: 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 380px 280px, 100% 100%;
  z-index: 0;
  opacity: 0;
}

.win-overlay.active {
  display: flex;
}

.win-overlay.active::before {
  animation: starryFadeOut 8s ease-out forwards;
}

/* Starry sky bg: quick fade in, then slowly fade out — content unaffected */
@keyframes starryFadeOut {
  0% { opacity: 0; }
  6% { opacity: 1; }
  100% { opacity: 0.15; }
}

/* --- Red Envelope --- */
.red-envelope {
  position: relative;
  width: 200px;
  cursor: pointer;
  animation: envelopeFloatIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  perspective: 800px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Ensure content stays above the starry ::before background */
.red-envelope,
.prize-reveal-card {
  position: relative;
  z-index: 2;
}

@keyframes envelopeFloatIn {
  0% { opacity: 0; transform: scale(0.3) translateY(40px); }
  60% { opacity: 1; transform: scale(1.1) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Envelope flap — absolute positioned over body top, hinged at top edge */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 70px;
  background: linear-gradient(180deg, #E63946 0%, #C1121F 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: 3;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.2));
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
  backface-visibility: visible;
}

/* Flap opens backward — stays connected at the hinge, no separate fade */
.red-envelope.opening .envelope-flap {
  transform: rotateX(-168deg);
}

/* Envelope body — stays put during flap open, no separate animation */
.envelope-body {
  width: 200px;
  height: 240px;
  background: linear-gradient(135deg, #E63946 0%, #C1121F 100%);
  border-radius: 4px 4px 12px 12px;
  position: relative;
  margin-top: 0;
  z-index: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  overflow: hidden;
}

/* After flap opens, the ENTIRE envelope fades out together — stays as one piece */
.red-envelope.fading {
  transform: scale(1.2);
  opacity: 0;
}

/* Hide tap hint & glow once opening starts */
.red-envelope.opening .envelope-tap-hint,
.red-envelope.opening .envelope-glow {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Gold circle on envelope */
.envelope-gold-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE45E, #FFD603 50%, #FF9800 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255,152,0,0.4), inset 0 2px 4px rgba(255,255,255,0.4);
  border: 3px solid rgba(255,255,255,0.3);
}

.envelope-gold-text {
  font-size: 48px;
  font-weight: 900;
  color: #C1121F;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Shine sweep on envelope */
.envelope-shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  animation: envelopeShine 2.5s ease-in-out infinite;
}

@keyframes envelopeShine {
  0%, 100% { left: -60%; }
  50% { left: 120%; }
}

/* Tap hint — inside envelope body, bottom area */
.envelope-tap-hint {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #FFD603;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  animation: tapHintBounce 1s ease-in-out infinite;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  letter-spacing: 1px;
  z-index: 2;
}

@keyframes tapHintBounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(-6px); opacity: 1; }
}

/* Envelope glow */
.envelope-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,3,0.2) 0%, transparent 70%);
  animation: envelopeGlowPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes envelopeGlowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* --- Prize Reveal Card --- */
.prize-reveal-card {
  display: none;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 340px;
  width: 90%;
  overflow: hidden;
  z-index: 2;
}

.prize-reveal-card.active {
  display: block;
  animation: prizeCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes prizeCardIn {
  0% { opacity: 0; transform: scale(0.5) rotate(-5deg); }
  60% { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.prize-reveal-header {
  background: linear-gradient(135deg, #E63946 0%, #C1121F 100%);
  padding: 20px;
  text-align: center;
}

.prize-reveal-celebrate {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 1px;
}

.prize-reveal-body {
  padding: 24px 20px 20px;
  text-align: center;
}

/* ===== Account Page ===== */

/* Auth (Login/Register) */
.account-auth {
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
  min-height: calc(100vh - var(--nav-height) - 60px);
}

.account-auth.hidden { display: none; }
.profile-card.hidden { display: none; }

/* Profile completion bonus banner */
.profile-bonus-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FFF9E1, #FFF3D6);
  border: 1px solid #FFD603;
  border-radius: 12px;
  margin: 12px 16px 0;
}

.profile-bonus-banner.hidden { display: none; }

.bonus-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
  animation: bonusBounce 2s ease-in-out infinite;
}

@keyframes bonusBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-5deg); }
}

.bonus-banner-text {
  flex: 1;
}

.bonus-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #B8860B;
  margin: 0 0 2px;
  line-height: 1.3;
}

.bonus-banner-sub {
  font-size: 12px;
  color: #9a7c0a;
  margin: 0;
  line-height: 1.3;
}

/* Birthday perks note */
.birthday-perks-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #FFF0F5;
  border-radius: 8px;
  margin: 4px 16px 8px;
  font-size: 12px;
  color: #C44A6E;
  line-height: 1.4;
}

.birthday-perks-note .perks-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.birthday-perks-note strong {
  color: #E63946;
}

/* Registration hint */
.reg-hint {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 12px;
  background: #FFF9E1;
  border-radius: 8px;
  margin: 10px 0;
  line-height: 1.4;
}

.reg-hint strong {
  color: #B8860B;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-md);
}

.auth-header h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.auth-form {
  max-width: 320px;
  margin: 0 auto;
}

.auth-form.hidden { display: none; }

.auth-form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  transition: border-color var(--transition);
  background: var(--bg-card);
}

.phone-input-wrapper:focus-within {
  border-color: var(--red);
}

.phone-prefix {
  padding: 0 var(--space-md);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  background: var(--divider);
  height: 50px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}

#phoneInput, #regPhoneInput {
  flex: 1;
  border: none;
  outline: none;
  padding: var(--space-md);
  font-size: 16px;
  height: 50px;
  background: transparent;
  color: var(--text);
}

.auth-text-input {
  width: 100%;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-md);
  font-size: 16px;
  height: 50px;
  outline: none;
  transition: border-color var(--transition);
  background: var(--bg-card);
  margin-bottom: var(--space-lg);
  box-sizing: border-box;
  color: var(--text);
}

.auth-text-input:focus { border-color: var(--red); }

/* Remember-me checkbox */
.remember-me-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}
.remember-me-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}
.remember-me-text { font-weight: 500; }

.auth-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-bottom: 8px;
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

/* OTP Step */
.otp-sent-to {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.otp-input {
  width: 100%;
  text-align: center;
  font-size: 28px;
  letter-spacing: 16px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.otp-input:focus { border-color: var(--red); }

.btn-link {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  padding: 10px;
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
}

.btn-back { color: var(--text-muted); }

/* Account Dashboard */
.account-dashboard.hidden { display: none; }

.account-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.account-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-name {
  font-size: 17px;
  font-weight: 700;
}

.account-phone {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

.btn-logout-small {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--transition);
}

.btn-logout-small:active {
  background: rgba(255,255,255,0.3);
}

/* Account Layout: left sidebar + right content */
.account-layout {
  display: flex;
  height: calc(100vh - var(--nav-height) - 88px);
}

.account-sidebar {
  width: 92px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.account-side-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: var(--space-lg) var(--space-xs);
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  min-height: 82px;
}

.account-side-tab.active {
  background: var(--yellow-bg);
  border-left-color: var(--red);
  color: var(--red);
  font-weight: 700;
}

.account-side-tab.active::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--yellow-bg);
}

.aside-icon { font-size: 22px; }
.aside-label { font-size: 10px; text-align: center; line-height: 1.2; font-weight: 600; }

.aside-count {
  background: var(--yellow);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  margin-top: 2px;
}

.account-side-tab.active .aside-count {
  background: var(--red);
  color: var(--white);
}

.account-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Account Tab Panels */
.atab-panel {
  display: none;
  padding: 16px;
  min-height: 100%;
}

.atab-panel.active { display: block; }

/* Profile Card */
.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px var(--space-lg);
  border-bottom: 1px solid var(--divider);
  gap: var(--space-md);
}

.profile-row:last-child { border-bottom: none; }

.profile-label {
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-weight: 500;
}

.profile-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

/* Profile Edit */
.profile-edit-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.btn-edit-profile {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-profile:active {
  background: var(--red);
  color: var(--white);
}

.profile-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  background: #FAFAFA;
  outline: none;
  max-width: 180px;
  transition: border-color 0.2s;
}

.profile-input:focus {
  border-color: var(--red);
  background: var(--white);
}

/* Birthday select dropdowns — always English */
.birthday-selects {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.birthday-selects-sm {
  max-width: 240px;
  justify-content: flex-end;
}

.bday-select {
  flex: 1;
  min-width: 80px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: #FAFAFA;
  outline: none;
  font-family: inherit;
  appearance: auto;
  transition: border-color 0.2s;
}

.bday-select:focus {
  border-color: var(--red);
  background: var(--white);
}

.profile-edit-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
}

.btn-cancel-edit {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save-profile {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

/* Coupon List */
.coupon-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coupon-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.coupon-card:active { box-shadow: var(--shadow); }

.coupon-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--yellow-light);
  border-bottom: 1px dashed var(--border);
}

.coupon-card-prize {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
}

.coupon-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.coupon-card-status.unused {
  background: var(--green-bg);
  color: var(--green);
}

.coupon-card-status.redeemed {
  background: #F0F0F0;
  color: var(--text-muted);
}

.coupon-card-status.expired {
  background: var(--red-bg);
  color: var(--red);
}

.coupon-card-bottom {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coupon-card-code {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
}

.coupon-card-date {
  font-size: 11px;
  color: var(--text-muted);
}

.coupon-card-arrow {
  font-size: 14px;
  color: var(--text-muted);
}

/* History List */
.account-history-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ahist-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ahist-info {
  flex: 1;
  min-width: 0;
}

.ahist-prize {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.ahist-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

.ahist-date {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 20px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .page.active,
  .nav-item.active .nav-icon {
    animation: none;
  }
}

/* Hide leftover task-backdrop from old code */
#taskBackdrop, .task-backdrop { display: none !important; }

/* === RESTORED SPIN PAGE STYLES === */
.spin-hype-top, .spin-hype-bottom { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 2px 0; }
.hype-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 6px rgba(255,214,3,0.8); animation: dotBlink 1.2s ease-in-out infinite; }
@keyframes dotBlink { 0%, 100% { opacity: 0.4; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
.hype-text { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.8px; animation: hypePop 1.8s ease-in-out infinite; }
.hype-1 { color: var(--red); animation-delay: 0s; margin-left: 20px; }
.hype-2 { color: #FF9800; animation-delay: 0.4s; margin-left: 40px; }
.hype-3 { color: var(--red); animation-delay: 0.8s; }
.hype-4 { color: #FF9800; animation-delay: 1.2s; }
@keyframes hypePop { 0%, 100% { transform: scale(1) translateY(0); opacity: 0.75; } 50% { transform: scale(1.14) translateY(-2px); opacity: 1; } }
.btn-spin { font-family: "Fredoka", sans-serif; font-size: 24px; padding: 14px 58px; margin-top: 0; }
.btn-spin:disabled { background: var(--border-strong); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.btn-spin-text { position: relative; z-index: 1; }
.btn-spin-shine { position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: btnShine 2.5s ease-in-out infinite; }
@keyframes btnShine { 0% { left: -100%; } 50% { left: 150%; } 100% { left: -100%; } }
.spin-actions { display: flex; justify-content: center; margin-top: 14px; }
.spin-remain { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 6px; letter-spacing: 0.3px; }
.spin-remain.zero { color: var(--red); font-weight: 700; }
.profile-bonus-box { margin-top: 6px; padding: 12px; background: #FFF8E1; border: 1.5px dashed #FFD166; border-radius: 10px; text-align: center; font-size: 12px; color: var(--text); }
.profile-bonus-box span { display: block; margin-bottom: 8px; }
.btn-profile-bonus { font-size: 13px; padding: 8px 22px; background: var(--border-strong); cursor: not-allowed; opacity: 0.5; }
.btn-profile-bonus.active { background: var(--red); color: #fff; cursor: pointer; opacity: 1; }
.wheel-hype { position: absolute; font-size: 22px; pointer-events: none; z-index: 3; opacity: 0.7; animation: wheelHype 3s ease-in-out infinite; }
.wheel-hype-tl { top: -8px; left: -4px; animation-delay: 0s; }
.wheel-hype-tr { top: -8px; right: -4px; animation-delay: 1.5s; }
.wheel-hype-bl { bottom: -8px; left: -4px; animation-delay: 0.75s; }
.wheel-hype-br { bottom: -8px; right: -4px; animation-delay: 2.25s; }
@keyframes wheelHype { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.25); opacity: 0.9; } }

/* ===== 100% WIN badge ===== */
.win-badge {
  position: absolute;
  top: -16px;
  right: -60px;
  width: 130px;
  height: 130px;
  z-index: 7;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: winBang 1.5s ease-in-out infinite;
}
.win-badge img {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes winBang {
  0%,100%{transform:rotate(-2deg) scale(1); opacity: 0.92;}
  30%{transform:rotate(3deg) scale(1.08); opacity: 1;}
  60%{transform:rotate(-1deg) scale(1.02); opacity: 0.95;}
}
