/* styles.css - First Date Ăn Gì? (Modern UI & Mobile Optimized) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Cinzel:wght@700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-ancient: 'Cinzel', serif;

  /* Mystical Cosmic Theme Palette */
  --swiggy-orange: #f59e0b;
  --swiggy-orange-hover: #d97706;
  --swiggy-orange-light: rgba(245, 158, 11, 0.16);
  --swiggy-orange-glow: rgba(245, 158, 11, 0.45);

  --bg-app: #080913;
  --bg-surface: rgba(18, 22, 42, 0.72);
  --bg-card: rgba(22, 28, 54, 0.85);
  --bg-subtle: rgba(255, 255, 255, 0.06);
  --bg-hover: rgba(255, 255, 255, 0.12);

  --text-title: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.8);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --rating-green: #10b981;
  --veg-green: #10b981;
  --nonveg-red: #f43f5e;
}

/* THEME 1: VÒNG QUAY CƠ DUYÊN (Hổ phách hoàng kim) */
body.theme-ket-hoi-tho-lun {
  --theme-accent: #f59e0b;
  --theme-glow: rgba(245, 158, 11, 0.45);
  --btn-primary-bg: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  --btn-primary-hover: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

/* THEME 2: QUẺ TRƯA MAY MẮN (Đỏ ruby huyền bí) */
body.theme-que-trua {
  --theme-accent: #e11d48;
  --theme-glow: rgba(225, 29, 72, 0.45);
  --btn-primary-bg: linear-gradient(135deg, #e11d48 0%, #be123c 50%, #881337 100%);
  --btn-primary-hover: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #be123c 100%);
}

/* =========================================================
   LOGIN SCREEN OVERLAY
   ========================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1025 0%, #2d1b3d 25%, #1e1233 50%, #0f1729 100%);
  overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 600px at 20% 80%, rgba(252, 128, 25, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 50% 50%, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.login-overlay.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* --- Orbiting Food Icons --- */
.login-food-orbit {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  animation: orbitSpin 30s linear infinite;
  pointer-events: none;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.orbit-food {
  position: absolute;
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(252, 128, 25, 0.4));
  /* Distribute 12 items around a circle */
  --angle: calc(var(--i) * 30deg);
  --radius: 250px;
  left: calc(50% + cos(var(--angle)) * var(--radius) - 1rem);
  top:  calc(50% + sin(var(--angle)) * var(--radius) - 1rem);
  animation: orbitCounterSpin 30s linear infinite, foodFloat 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.25s);
}

@keyframes orbitCounterSpin {
  from { transform: rotate(0deg) scale(1); }
  to   { transform: rotate(-360deg) scale(1); }
}

@keyframes foodFloat {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(252, 128, 25, 0.4)) scale(1); }
  50%      { filter: drop-shadow(0 0 16px rgba(252, 128, 25, 0.7)) scale(1.2); }
}

/* --- Login Card --- */
.login-card {
  position: relative;
  z-index: 2;
  width: 400px;
  max-width: 90vw;
  padding: 48px 36px 36px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 80px rgba(252, 128, 25, 0.08);
  animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

@keyframes cardAppear {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo-wrap {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #fc8019 0%, #ff5200 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  box-shadow: 0 8px 32px rgba(252, 128, 25, 0.4);
  animation: logoPulse 2.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(252, 128, 25, 0.4); transform: scale(1); }
  50%      { box-shadow: 0 12px 48px rgba(252, 128, 25, 0.6); transform: scale(1.05); }
}

.login-title {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  min-height: 1.5em;
}

.login-subtitle {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
  min-height: 1.3em;
}

/* --- Login Form --- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 16px;
  font-size: 1.15rem;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}

.login-input {
  width: 100%;
  padding: 15px 16px 15px 50px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.3s ease;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.login-input:focus {
  border-color: rgba(252, 128, 25, 0.6);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(252, 128, 25, 0.12), 0 0 20px rgba(252, 128, 25, 0.1);
}

.login-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  line-height: 1.4;
  animation: shake 0.4s ease-in-out;
}

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

.login-submit-btn {
  margin-top: 8px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #fc8019 0%, #ff5200 100%);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(252, 128, 25, 0.35);
  position: relative;
  overflow: hidden;
}

.login-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(252, 128, 25, 0.5);
}

.login-submit-btn:hover::before {
  opacity: 1;
}

.login-submit-btn:active {
  transform: translateY(0) scale(0.98);
}

.login-btn-arrow {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.login-submit-btn:hover .login-btn-arrow {
  transform: translateX(4px);
}

/* --- Login Footer --- */
.login-footer-text {
  text-align: center;
  margin-top: 24px;
}

.login-footer-text p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  min-height: 1.2em;
}

/* --- Heart Icons at Bottom Corners --- */
.login-heart {
  position: fixed;
  bottom: 32px;
  font-size: 2.8rem;
  z-index: 100000;
  animation: heartBeat 1.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(236, 72, 153, 0.5));
  user-select: none;
}

.login-heart-left {
  left: 32px;
  animation-delay: 0s;
}

.login-heart-right {
  right: 32px;
  animation-delay: 0.75s;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.25); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.15); }
  60%      { transform: scale(1); }
}

/* --- Floating particles background --- */
.login-overlay::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 30% 70%, rgba(255,255,255,0.1), transparent),
    radial-gradient(2px 2px at 60% 30%, rgba(255,255,255,0.12), transparent),
    radial-gradient(2px 2px at 80% 60%, rgba(255,255,255,0.08), transparent),
    radial-gradient(2px 2px at 45% 85%, rgba(255,255,255,0.1), transparent),
    radial-gradient(2px 2px at 90% 15%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 15% 50%, rgba(252,128,25,0.2), transparent),
    radial-gradient(1px 1px at 75% 45%, rgba(139,92,246,0.2), transparent);
  animation: starsTwinkle 4s ease-in-out infinite alternate;
  pointer-events: none;
}

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

/* --- Mobile Responsive Login --- */
@media (max-width: 480px) {
  .login-food-orbit {
    width: 360px;
    height: 360px;
  }
  .orbit-food {
    font-size: 1.5rem;
    --radius: 170px;
    left: calc(50% + cos(var(--angle)) * var(--radius) - 0.75rem);
    top:  calc(50% + sin(var(--angle)) * var(--radius) - 0.75rem);
  }
  .login-card {
    padding: 36px 24px 28px;
    border-radius: 22px;
  }
  .login-logo-circle {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }
  .login-title {
    font-size: 1.25rem;
  }
  .login-heart {
    font-size: 2.2rem;
    bottom: 24px;
  }
  .login-heart-left { left: 20px; }
  .login-heart-right { right: 20px; }
}

/* Hide main content when login is showing */
body.login-active .site-header,
body.login-active .theme-selector-bar,
body.login-active .mode-banner,
body.login-active .mode-container,
body.login-active .controls-section,
body.login-active .catalog-section,
body.login-active .floating-hearts-container,
body.login-active .mobile-bottom-nav,
body.login-active .site-footer {
  display: none;
}

/* =========================================================
   CONSENT POPUP OVERLAY
   ========================================================= */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: consentFadeIn 0.4s ease forwards;
}

@keyframes consentFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.consent-overlay.fade-out {
  animation: consentFadeOut 0.5s ease forwards;
}

@keyframes consentFadeOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.05); }
}

.consent-card {
  position: relative;
  width: 440px;
  max-width: 92vw;
  padding: 44px 36px 36px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(252, 128, 25, 0.1);
  text-align: center;
  animation: consentCardPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(24px) scale(0.92);
}

@keyframes consentCardPop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.consent-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: consentIconBounce 2s ease-in-out infinite;
}

@keyframes consentIconBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25%      { transform: scale(1.1) rotate(-5deg); }
  75%      { transform: scale(1.1) rotate(5deg); }
}

.consent-title {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  min-height: 1.4em;
}

.consent-message {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  margin-bottom: 28px;
  min-height: 1.2em;
}

.consent-extra-content {
  margin-bottom: 24px;
  padding: 18px 20px;
  background: rgba(252, 128, 25, 0.1);
  border: 1px solid rgba(252, 128, 25, 0.25);
  border-radius: 16px;
  animation: extraContentSlide 0.4s ease forwards;
}

@keyframes extraContentSlide {
  from { opacity: 0; transform: translateY(-10px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 200px; }
}

.consent-question {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-style: italic;
  min-height: 1.2em;
}

.consent-btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.consent-btn {
  padding: 14px 32px;
  border: none;
  border-radius: 14px;
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.consent-btn-yes {
  background: linear-gradient(135deg, #fc8019 0%, #ff5200 100%);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 8px 24px rgba(252, 128, 25, 0.4);
}

.consent-btn-yes:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 36px rgba(252, 128, 25, 0.55);
}

.consent-btn-yes::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.consent-btn-yes:hover::after {
  opacity: 1;
}

/* Growing "Có" button animation when user clicks "Không" */
.consent-btn-yes.grow-1 {
  font-size: 1.25rem;
  padding: 18px 40px;
  box-shadow: 0 12px 36px rgba(252, 128, 25, 0.5);
}

.consent-btn-yes.grow-2 {
  font-size: 1.5rem;
  padding: 22px 52px;
  box-shadow: 0 16px 48px rgba(252, 128, 25, 0.6);
  animation: yesButtonPulse 1s ease-in-out infinite;
}

.consent-btn-yes.grow-3 {
  font-size: 1.8rem;
  padding: 26px 64px;
  box-shadow: 0 20px 56px rgba(252, 128, 25, 0.7);
  animation: yesButtonPulse 0.8s ease-in-out infinite;
}

.consent-btn-yes.grow-4 {
  font-size: 2.1rem;
  padding: 30px 72px;
  box-shadow: 0 24px 64px rgba(252, 128, 25, 0.8);
  animation: yesButtonPulse 0.6s ease-in-out infinite;
}

@keyframes yesButtonPulse {
  0%, 100% { box-shadow: 0 16px 48px rgba(252, 128, 25, 0.5); }
  50%      { box-shadow: 0 20px 56px rgba(252, 128, 25, 0.8), 0 0 40px rgba(252, 128, 25, 0.3); }
}

.consent-btn-no {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.consent-btn-no:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

/* Shrinking "Không" button as "Có" grows */
.consent-btn-no.shrink-1 {
  font-size: 0.85rem;
  padding: 12px 24px;
  opacity: 0.7;
}

.consent-btn-no.shrink-2 {
  font-size: 0.78rem;
  padding: 10px 20px;
  opacity: 0.5;
}

.consent-btn-no.shrink-3 {
  font-size: 0.72rem;
  padding: 8px 16px;
  opacity: 0.35;
}

.consent-btn-no.shrink-4 {
  font-size: 0.65rem;
  padding: 6px 12px;
  opacity: 0.25;
}

@media (max-width: 480px) {
  .consent-card {
    padding: 32px 20px 28px;
  }
  .consent-btn-row {
    flex-direction: column;
    gap: 10px;
  }
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 90px; /* space for mobile bottom nav */
  position: relative;
  overflow-x: hidden;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 9, 19, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.5);
}

/* =========================================================
   AMBIENT COSMIC AURA BACKGROUND
   ========================================================= */
.cosmic-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #151833 0%, #080912 70%);
}

.cosmic-ambient-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 45% 15%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(2px 2px at 75% 35%, rgba(251, 191, 36, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 85% 75%, rgba(139, 92, 246, 0.45), transparent),
    radial-gradient(1px 1px at 25% 80%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(2px 2px at 60% 85%, rgba(56, 189, 248, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 90% 20%, rgba(244, 63, 94, 0.4), transparent);
  background-size: 550px 550px;
  animation: cosmicStarsTwinkle 35s linear infinite;
  opacity: 0.75;
}

@keyframes cosmicStarsTwinkle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-550px); }
}

.cosmic-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.28;
  pointer-events: none;
  animation: cosmicGlowPulse 12s ease-in-out infinite alternate;
}

.cosmic-glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
  top: -120px;
  left: -100px;
}

.cosmic-glow-2 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: 35%;
  right: -180px;
  animation-delay: -4s;
}

.cosmic-glow-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #e11d48 0%, transparent 70%);
  bottom: 80px;
  left: 25%;
  animation-delay: -8s;
}

@keyframes cosmicGlowPulse {
  0% { transform: scale(1) translate(0, 0); opacity: 0.22; }
  50% { transform: scale(1.15) translate(30px, -20px); opacity: 0.35; }
  100% { transform: scale(0.95) translate(-20px, 20px); opacity: 0.25; }
}

/* =========================================================
   SITE HEADER (Dark Glassmorphic)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 0.85rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.swiggy-logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.45rem;
  box-shadow: 0 0 16px var(--swiggy-orange-glow), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brand-titles h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 2px;
}

.brand-location strong {
  color: #fbbf24;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* User header profile */
.user-header-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.user-pill-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-quick-link {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  transition: all 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-quick-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.user-logout-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  transition: all 0.18s ease;
}

.user-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.sound-toggle-btn,
.global-stats-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-title);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sound-toggle-btn:hover,
.global-stats-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* =========================================================
   THEME SELECTOR TOOLBAR (Segmented Dark Pills)
   ========================================================= */
.theme-selector-bar {
  max-width: 960px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  z-index: 5;
}

.theme-pill-group {
  display: inline-flex;
  background: rgba(18, 22, 45, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  gap: 0.4rem;
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1.45rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.theme-btn.active {
  background: var(--btn-primary-bg);
  color: #ffffff;
  box-shadow: 0 0 20px var(--theme-glow);
}

/* =========================================================
   BANNER SECTION
   ========================================================= */
.mode-banner {
  max-width: 800px;
  margin: 1.25rem auto 0.75rem;
  padding: 0 1rem;
  text-align: center;
  position: relative;
  z-index: 5;
}

.mode-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.mode-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.mode-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* =========================================================
   ARENA 1: VÒNG QUAY TRÒN TỰ CHỌN MÓN (Dark Mystical)
   ========================================================= */
.mode-container {
  display: none;
  position: relative;
  z-index: 5;
}
.mode-container.active {
  display: block;
}

.wheel-arena-wrapper {
  max-width: 1060px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* Circular Wheel Frame */
.wheel-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.circular-wheel-frame {
  width: 440px;
  height: 440px;
  position: relative;
  border-radius: 50%;
  padding: 14px;
  background: radial-gradient(circle, #161b38 0%, #0d1024 100%);
  border: 4px solid rgba(245, 158, 11, 0.4);
  box-shadow: 
    0 0 35px rgba(245, 158, 11, 0.3),
    0 20px 50px rgba(0, 0, 0, 0.7),
    inset 0 0 25px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cosmicWheelPortal 8s ease-in-out infinite alternate;
}

@keyframes cosmicWheelPortal {
  0% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.25), 0 20px 50px rgba(0,0,0,0.7), inset 0 0 25px rgba(0,0,0,0.8); }
  100% { box-shadow: 0 0 45px rgba(245, 158, 11, 0.45), 0 25px 60px rgba(0,0,0,0.8), inset 0 0 30px rgba(0,0,0,0.9); }
}

#wheel-canvas {
  width: 412px;
  height: 412px;
  border-radius: 50%;
  display: block;
  cursor: pointer;
  user-select: none;
}

/* Center Hub (Golden Sun Talisman) */
.wheel-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde68a 0%, #f59e0b 55%, #78350f 100%);
  border: 4px solid #fef08a;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.7), 0 6px 18px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #1e1202;
  z-index: 25;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.wheel-center-hub:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.9), 0 8px 24px rgba(0, 0, 0, 0.7);
}

/* Pointer Needle (Mystic Flame / Golden Pin) */
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 46px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 70%, #991b1b 100%);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.9)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
  z-index: 30;
  transform-origin: 50% 0%;
  pointer-events: none;
  transition: transform 0.08s ease;
}

.wheel-pointer::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffffff;
}

.wheel-pointer.bounce {
  transform: translateX(-50%) rotate(-14deg);
}

/* =========================================================
   CUSTOM DISHES MANAGER (Dark Glass Card)
   ========================================================= */
.dish-manager-panel {
  background: rgba(18, 23, 47, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.manager-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.manager-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.manager-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-title);
}

.wheel-count-badge {
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
}

.manager-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Add Dish Form */
.add-dish-form {
  display: flex;
  gap: 0.55rem;
}

.add-dish-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-title);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.add-dish-input:focus {
  border-color: #f59e0b;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.btn-add-dish {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.btn-add-dish:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
}

/* Quick Actions */
.manager-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-act-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-act-btn:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Chips Container */
.wheel-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.4rem 0.1rem;
}

.wheel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-title);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.wheel-chip:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.14);
}

.chip-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.chip-del-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
  transition: color 0.18s ease;
}

.chip-del-btn:hover {
  color: #f87171;
}

/* =========================================================
   ARENA 2: QUẺ TRƯA MAY MẮN (Mystical Altar)
   ========================================================= */
.que-arena {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.que-altar-canvas {
  background: radial-gradient(ellipse at top, #21183b 0%, #120d24 60%, #0a0717 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(225, 29, 72, 0.35);
  box-shadow: 0 0 45px rgba(225, 29, 72, 0.2), 0 20px 50px rgba(0, 0, 0, 0.7);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.que-altar-canvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 180px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.que-steps-guide {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.step-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
}

.step-badge.active {
  color: #fca5a5;
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.6);
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.35);
}

/* Ceremony Stage */
.que-ceremony-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
  z-index: 2;
}

/* 5 Quẻ che tên (Fanned Mystery Sticks) */
.fanned-sticks-group {
  position: absolute;
  top: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 320px;
  height: 190px;
  z-index: 10;
  transition: all 0.6s cubic-bezier(0.34, 1.3, 0.64, 1);
  transform-origin: bottom center;
}

.mystery-stick {
  width: 46px;
  height: 175px;
  position: absolute;
  bottom: 0;
  background: linear-gradient(180deg, #881337 0%, #be123c 20%, #b45309 21%, #faedcd 90%, #92400e 100%);
  border: 2px solid #fbbf24;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 12px rgba(251, 191, 36, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  cursor: pointer;
  user-select: none;
  transform-origin: bottom center;
  transition: transform 0.6s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.4s ease;
}

.mystery-stick:hover {
  filter: brightness(1.15) drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
}

.stick-pattern {
  font-size: 1.15rem;
}

.stick-seal {
  background: #991b1b;
  color: #fef08a;
  border: 1px solid #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.2rem;
  border-radius: 3px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.stick-ornament {
  font-size: 0.75rem;
  color: #b45309;
}

/* Fanned Out Positions */
.mystery-stick.stick-pos-0 { transform: rotate(-24deg) translate(-75px, 15px); }
.mystery-stick.stick-pos-1 { transform: rotate(-12deg) translate(-38px, 4px); }
.mystery-stick.stick-pos-2 { transform: rotate(0deg) translate(0px, 0px); }
.mystery-stick.stick-pos-3 { transform: rotate(12deg) translate(38px, 4px); }
.mystery-stick.stick-pos-4 { transform: rotate(24deg) translate(75px, 15px); }

/* Animation: Gathering into the cylinder */
.fanned-sticks-group.gathering-in .mystery-stick {
  transform: rotate(0deg) translate(0, 110px) scale(0.85);
  opacity: 0;
}

/* Bamboo Cylinder / Hộp Quẻ Tre Khắc Ấn */
.bamboo-cylinder-wrap {
  position: relative;
  z-index: 15;
}

.bamboo-cylinder {
  width: 140px;
  height: 175px;
  background: linear-gradient(90deg, #451a03 0%, #78350f 25%, #92400e 50%, #78350f 75%, #451a03 100%);
  border-radius: 14px 14px 18px 18px;
  border: 3px solid #d97706;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 20px rgba(217, 119, 6, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: bottom center;
}

.bamboo-rings {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #d97706 0%, #fef08a 50%, #d97706 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
.bamboo-rings.top { top: 22px; }
.bamboo-rings.bottom { bottom: 22px; }

.bamboo-label {
  background: #991b1b;
  color: #fef08a;
  padding: 0.65rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #fbbf24;
  font-family: var(--font-ancient);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

/* Cylinder Shake Animation */
@keyframes shakeCylinderFierce {
  0% { transform: rotate(0deg) translateY(0); }
  12% { transform: rotate(-14deg) translateY(-10px); }
  24% { transform: rotate(14deg) translateY(-6px); }
  36% { transform: rotate(-16deg) translateY(-12px); }
  48% { transform: rotate(15deg) translateY(-8px); }
  60% { transform: rotate(-12deg) translateY(-6px); }
  72% { transform: rotate(10deg) translateY(-4px); }
  84% { transform: rotate(-8deg) translateY(-2px); }
  94% { transform: rotate(4deg) translateY(-1px); }
  100% { transform: rotate(0deg) translateY(0); }
}

.bamboo-cylinder.shaking {
  animation: shakeCylinderFierce 1.3s ease-in-out infinite;
}

/* Single Fallen Winning Stick */
.fallen-stick-wrapper {
  position: absolute;
  top: 10px;
  z-index: 25;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(60px) scale(0.6);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fallen-stick-wrapper.popping-out {
  opacity: 1;
  transform: translateY(-20px) scale(1.12);
  pointer-events: auto;
}

.winning-fallen-stick {
  width: 62px;
  height: 215px;
  background: linear-gradient(180deg, #991b1b 0%, #be123c 22%, #fef3c7 23%, #ffffff 85%, #fde68a 100%);
  border: 3px solid #fbbf24;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.6), 0 0 35px rgba(251, 191, 36, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  animation: goldenGlow 1.4s ease-in-out infinite alternate;
}

@keyframes goldenGlow {
  from { box-shadow: 0 16px 40px rgba(220, 38, 38, 0.5), 0 0 20px rgba(251, 191, 36, 0.6); }
  to { box-shadow: 0 20px 50px rgba(220, 38, 38, 0.8), 0 0 45px rgba(251, 191, 36, 0.95); }
}

.fallen-stick-head {
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.fallen-stick-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fallen-stick-text {
  font-family: var(--font-ancient);
  font-size: 1.1rem;
  font-weight: 800;
  color: #991b1b;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.18em;
}

.fallen-stick-tail {
  font-size: 0.72rem;
  color: #d97706;
  font-weight: 800;
}

.altar-tea-pot {
  font-size: 1.9rem;
  margin-top: 0.5rem;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.3));
}

.que-instruction {
  font-size: 0.92rem;
  color: #e2e8f0;
  text-align: center;
  margin-top: 0.65rem;
  font-style: italic;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   CONTROLS & GLOWING ACTION CTA BUTTON
   ========================================================= */
.controls-section {
  max-width: 800px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 5;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.category-tabs {
  display: inline-flex;
  background: rgba(18, 23, 47, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  gap: 0.3rem;
  box-shadow: var(--shadow-sm);
}

.cat-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.cat-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.cat-btn.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fef08a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.budget-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.budget-select {
  appearance: none;
  background: rgba(18, 23, 47, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-title);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.55rem 2.2rem 0.55rem 1.1rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.budget-select:focus,
.budget-select:hover {
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.select-chevron {
  position: absolute;
  right: 0.85rem;
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.veg-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #34d399;
  cursor: pointer;
  background: rgba(18, 23, 47, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  user-select: none;
}

.veg-filter-label:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.veg-filter-label input[type="checkbox"] {
  accent-color: #10b981;
  cursor: pointer;
}

/* BIG CTA BUTTON (Magical Glow Pulsing) */
.cta-spin-btn {
  background: var(--btn-primary-bg);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1.05rem 3.2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 0 25px var(--theme-glow), 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cta-spin-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: ctaShimmer 3.5s infinite;
}

@keyframes ctaShimmer {
  0% { left: -100%; }
  35%, 100% { left: 100%; }
}

.cta-spin-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 35px var(--theme-glow), 0 14px 40px rgba(0, 0, 0, 0.75);
}

.cta-spin-btn:active {
  transform: translateY(1px);
}

.cta-spin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   FOOD CATALOG (Dark Mystical Cards)
   ========================================================= */
.catalog-section {
  max-width: 1060px;
  margin: 3.5rem auto;
  padding: 0 1rem;
  position: relative;
  z-index: 5;
}

.catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.catalog-title-wrap h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.02em;
}

.catalog-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.catalog-search-wrap {
  position: relative;
  width: 300px;
}

.catalog-search-input {
  width: 100%;
  background: rgba(18, 23, 47, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  color: var(--text-title);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.catalog-search-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1.4rem;
}

/* Mystical Food Card */
.catalog-item-card {
  background: rgba(18, 23, 47, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.catalog-item-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 20px rgba(245, 158, 11, 0.2);
}

.catalog-img-wrap {
  height: 150px;
  background: #111428;
  position: relative;
  overflow: hidden;
}

.catalog-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.catalog-item-card:hover .catalog-img-wrap img {
  transform: scale(1.08);
}

/* Veg / Non-Veg Icons */
.swiggy-veg-icon {
  width: 16px;
  height: 16px;
  border: 2px solid #10b981;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 26, 0.85);
}
.swiggy-veg-icon::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.swiggy-nonveg-icon {
  width: 16px;
  height: 16px;
  border: 2px solid #f43f5e;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 26, 0.85);
}
.swiggy-nonveg-icon::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid #f43f5e;
}

.catalog-tag-overlay {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delivery-time-badge {
  background: rgba(10, 13, 26, 0.85);
  backdrop-filter: blur(8px);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
}

.catalog-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.catalog-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.rating-badge {
  background: #059669;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.catalog-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.catalog-dish-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-title);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.catalog-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-subtle);
}

.catalog-price {
  font-weight: 800;
  color: #fbbf24;
  font-size: 0.98rem;
}

.order-link-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f59e0b;
  transition: transform 0.2s ease;
}

.catalog-item-card:hover .order-link-text {
  transform: translateX(3px);
}

/* =========================================================
   RESULT MODAL (Dark Mystical Celestial Dialog)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 5, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-dialog {
  background: radial-gradient(ellipse at top, #1e2448 0%, #10142b 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.35);
  max-width: 490px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.25), 0 30px 80px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  position: relative;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.modal-header-banner {
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.modal-header-badge {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.close-modal-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.modal-content-body {
  padding: 1.35rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-food-visual {
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #111428;
  margin-bottom: 1.1rem;
  border: 1px solid var(--border-subtle);
}

.modal-food-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-dish-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.modal-dish-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-dish-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.modal-dish-desc {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem;
  border-radius: var(--radius-md);
}

/* Fortune poem box */
.fortune-poem-box {
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 1.1rem;
  text-align: center;
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.15);
}

.fortune-poem-title {
  font-family: var(--font-ancient);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fda4af;
  margin-bottom: 0.35rem;
  letter-spacing: 0.06em;
}

.fortune-poem-text {
  font-size: 0.9rem;
  font-style: italic;
  color: #ffe4e6;
  line-height: 1.6;
  margin-bottom: 0.45rem;
}

.fortune-advice {
  font-size: 0.8rem;
  color: #f43f5e;
  font-weight: 600;
}

/* Post-spin decision banner */
.modal-decision-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.1rem;
  text-align: center;
}

.decision-prompt {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 0.75rem;
}

.decision-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.modal-btn {
  padding: 0.78rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-remove-dish {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}
.btn-remove-dish:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

.btn-keep-dish {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}
.btn-keep-dish:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.action-row-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.btn-gmaps {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.35);
}
.btn-gmaps:hover {
  background: #1d4ed8;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.55);
}

.btn-delivery {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}
.btn-delivery:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.55);
}

.btn-share {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--border-color);
}
.btn-share:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-spin-again {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}
.btn-spin-again:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.55);
}

.btn-add-plan {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}
.btn-add-plan:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.55);
}

/* =========================================================
   PLAN MODAL (KẾ HOẠCH)
   ========================================================= */
.plan-selected-dish {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}

.plan-selected-emoji {
  font-size: 1.8rem;
}

.plan-selected-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plan-selected-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-title);
}

.plan-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.plan-field-group {
  margin-bottom: 1rem;
}

.plan-field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 0.4rem;
}

.plan-field-group .label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.plan-field-group input[type="date"],
.plan-field-group input[type="time"],
.plan-field-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-title);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
  resize: vertical;
}

.plan-field-group input[type="date"]:focus,
.plan-field-group input[type="time"]:focus,
.plan-field-group textarea:focus {
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.plan-activity-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.plan-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.plan-chip.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.plan-activity-detail {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-bottom: 1.1rem;
}

.plan-activity-detail .btn-gmaps {
  width: 100%;
  margin-bottom: 0.75rem;
}

.plan-detail-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.plan-suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plan-suggestion-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-title);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-suggestion-card:hover {
  background: rgba(255, 255, 255, 0.09);
}

.plan-suggestion-card.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.plan-suggestion-name {
  font-size: 0.88rem;
  font-weight: 700;
}

.plan-suggestion-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.plan-empty-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.btn-confirm-plan {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  font-size: 0.95rem;
  padding: 0.9rem 1rem;
}
.btn-confirm-plan:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.55);
}

.plan-thankyou-dialog {
  max-width: 420px;
}

.plan-thankyou-body {
  text-align: center;
  padding-top: 0.5rem;
}

.plan-thankyou-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.plan-thankyou-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 0.6rem;
}

.plan-thankyou-message {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

/* =========================================================
   CONTINUOUS FLOATING HEARTS (Luminous Neon Hearts)
   ========================================================= */
.floating-hearts-container {
  position: fixed;
  bottom: 84px;
  left: 20px;
  width: 70px;
  height: 280px;
  pointer-events: none;
  z-index: 120;
  overflow: visible;
}

.heart-source-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20, 25, 52, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid #f43f5e;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  animation: heartPulse 1.4s ease-in-out infinite;
  transition: transform 0.15s ease;
}

.heart-source-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.8);
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  14% { transform: scale(1.14); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}

.floating-heart {
  position: absolute;
  bottom: 12px;
  left: 12px;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 10px rgba(244, 63, 94, 0.7));
  animation: floatUpWave 3.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes floatUpWave {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translate(var(--dx1, 8px), -40px) scale(1.05) rotate(var(--rot1, 8deg));
  }
  50% {
    opacity: 0.9;
    transform: translate(var(--dx2, -12px), -120px) scale(1) rotate(var(--rot2, -8deg));
  }
  80% {
    opacity: 0.5;
    transform: translate(var(--dx3, 14px), -200px) scale(0.9) rotate(var(--rot1, 10deg));
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx4, -5px), -270px) scale(0.7) rotate(0deg);
  }
}

/* =========================================================
   MOBILE BOTTOM NAVIGATION BAR (Only on Mobile)
   ========================================================= */
.mobile-bottom-nav {
  display: none; /* Hidden on desktop */
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  max-width: calc(100vw - 2.5rem);
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  visibility: hidden;
  background: rgba(20, 25, 52, 0.95);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35), 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 300;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.site-footer {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
  position: relative;
  z-index: 5;
}

/* =========================================================
   MOBILE RESPONSIVE RULES (< 768px & < 480px)
   ========================================================= */
@media (max-width: 768px) {
  /* Safari iOS tự động zoom khi focus vào input có font-size < 16px, bất kể
     user-scalable=no — kết hợp với maximum-scale=1.0 gây "kẹt" zoom lệch cả
     trang sau khi rời input đó. Ép tối thiểu 16px cho mọi ô nhập liệu để
     tránh Safari kích hoạt zoom. */
  input, select, textarea {
    font-size: 16px !important;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    padding: 0.65rem 0.85rem;
  }

  .brand-titles h1 {
    font-size: 0.95rem;
  }

  .theme-btn {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
  }

  .wheel-arena-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .circular-wheel-frame {
    width: 320px;
    height: 320px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vw - 32px);
    padding: 8px;
  }

  #wheel-canvas {
    width: 100%;
    height: 100%;
  }

  .wheel-center-hub {
    width: 60px;
    height: 60px;
    font-size: 0.85rem;
  }

  .category-tabs {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.25rem;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .cat-btn {
    white-space: nowrap;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }

  .cta-spin-btn {
    font-size: 1.1rem;
    padding: 0.95rem 2rem;
    width: 100%;
    justify-content: center;
  }

  .catalog-search-wrap {
    width: 100%;
  }

  .action-row-primary,
  .decision-btn-row,
  .plan-field-row {
    grid-template-columns: 1fr;
  }

  .floating-hearts-container {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    left: 12px;
  }

  .heart-source-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
  }

  .catalog-img-wrap {
    height: 120px;
  }

  .catalog-dish-title {
    font-size: 0.92rem;
  }

  /* Quẻ Altar Mobile Optimization */
  .que-arena {
    padding: 0 0.5rem;
  }

  .que-altar-canvas {
    padding: 1.5rem 0.75rem;
  }

  .que-steps-guide {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.25rem;
  }

  .step-badge {
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
  }

  .que-ceremony-stage {
    height: 290px;
  }

  .fanned-sticks-group {
    width: 290px;
  }

  .mystery-stick {
    width: 40px;
    height: 155px;
  }

  .mystery-stick.stick-pos-0 { transform: rotate(-22deg) translate(-65px, 12px); }
  .mystery-stick.stick-pos-1 { transform: rotate(-11deg) translate(-32px, 3px); }
  .mystery-stick.stick-pos-2 { transform: rotate(0deg) translate(0px, 0px); }
  .mystery-stick.stick-pos-3 { transform: rotate(11deg) translate(32px, 3px); }
  .mystery-stick.stick-pos-4 { transform: rotate(22deg) translate(65px, 12px); }

  /* Mobile Bottom Navigation Bar Enabled */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10, 13, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: space-around;
    z-index: 110;
  }

  .mobile-nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
    text-decoration: none;
  }

  .mobile-nav-item .nav-icon {
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-nav-item.active {
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
  }
}

@media (max-width: 600px) {
  .sound-toggle-btn #sound-text,
  .global-stats-btn .catalog-btn-text {
    display: none;
  }

  .sound-toggle-btn,
  .global-stats-btn {
    padding: 0.45rem;
    width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: 50%;
  }

  .brand-location {
    display: none;
  }

  .header-right {
    gap: 0.4rem;
  }

  .header-right .global-stats-btn {
    display: none;
  }

  .user-header-profile {
    gap: 0.35rem;
  }

  .user-pill-badge {
    padding: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .user-pill-badge #user-display-name {
    display: none;
  }

  .admin-quick-link {
    padding: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .admin-quick-link .admin-link-text {
    display: none;
  }

  .brand-titles h1 {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .dish-manager-panel {
    padding: 1.2rem;
  }

  .manager-title {
    font-size: 1.05rem;
  }

  .add-dish-input {
    font-size: 0.82rem;
    padding: 0.6rem 0.8rem;
  }

  .btn-add-dish {
    padding: 0.6rem 0.95rem;
    font-size: 0.82rem;
  }
}
