/* ============================================
   👑 臺灣米其林指南 2026 — 必比登推介互動地圖風格
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+TC:wght@300;400;500;600;700;900&family=Noto+Serif+TC:wght@600;700;900&display=swap');

/* --- CSS Variables --- */
:root {
  /* Premium Dark / Michelin Theme Backgrounds */
  --bg-primary: #F9F9F9;        /* Warm light grey background */
  --bg-secondary: #F7F5F0;      /* Warm bone white */
  --bg-tertiary: #F1ECE3;       /* Premium sand tint */
  --bg-card: #FFFFFF;
  --bg-card-hover: #FCFBFA;
  --bg-red-tint: rgba(189, 27, 33, 0.04);

  /* Michelin Branding Colors */
  --primary: #BD1B21;           /* Michelin Premium Red */
  --primary-light: #E0353C;
  --primary-dark: #8E0A10;      /* Dark Deep Red */
  --secondary: #0F0F0F;         /* Rich Premium Black */
  --secondary-light: #2A2A2A;
  --accent: #C5A059;            /* Premium Gold Accent */
  --gold: #C5A059;
  --gold-bright: #DFBA73;
  --gold-dark: #A5823B;
  
  /* Text */
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #8E8E8E;

  /* Borders & Shadows */
  --border: rgba(15, 15, 15, 0.08);
  --border-hover: rgba(189, 27, 33, 0.20);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
  --shadow-red: 0 4px 20px rgba(189, 27, 33, 0.15); /* Red glowing shadow */
  --shadow-gold: 0 4px 20px rgba(197, 160, 89, 0.25);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-bounce: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-secondary);
}

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

::selection {
  background: var(--primary);
  color: white;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================
   MODE SWITCHER & DYNAMIC THEMES
   ============================================ */
.mode-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 1.5rem;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.mode-btn {
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

.mode-btn.active {
  color: #FFFFFF;
  background: #2E7D32;
  box-shadow: 0 2px 12px rgba(46, 125, 50, 0.5);
}

body.theme-stars .mode-btn.active {
  background: #BD1B21;
  box-shadow: 0 2px 14px rgba(255, 215, 0, 0.4);
}

/* Starred Theme Overrides — Elegant Softer Wine-Ruby Red */
body.theme-stars .hero {
  background: 
    radial-gradient(circle at 15% 15%, rgba(255, 215, 0, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(124, 33, 37, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, #4F1619 0%, #7A2125 50%, #59191C 100%);
}

body.theme-stars .footer {
  background: linear-gradient(135deg, #451316 0%, #631C20 50%, #380E10 100%);
  border-top-color: #D4AF37;
}

/* ============================================
   HERO SECTION — Premium Michelin Style
   ============================================ */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 15% 15%, rgba(189, 27, 33, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(197, 160, 89, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #1B241C 0%, #222D23 50%, #2C3A2D 100%);
  color: white;
}

/* Add a gold geometric line pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(197, 160, 89, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.6;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -5%;
  width: 110%;
  height: 60px;
  background: var(--bg-primary);
  border-radius: 50% 50% 0 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  animation: fadeInDown 0.8s ease-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot-red 2s infinite;
}

.hero__title {
  font-family: 'Inter', 'Noto Serif TC', serif;
  font-size: clamp(3.5rem, 8.5vw, 6.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 0.4rem;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease-out;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.hero__subtitle {
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 0.2rem;
  letter-spacing: 1px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero__year {
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Stats */
.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2.8rem;
  text-align: center;
  min-width: 160px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-stat:hover {
  border-color: var(--primary-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-red);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stat__number {
  font-family: 'Inter', 'Noto Serif TC', serif;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.hero-stat:nth-child(3) .hero-stat__number {
  color: var(--accent);
}

.hero-stat__label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Scroll Arrow */
.hero__scroll {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  animation: fadeInUp 0.8s ease-out 0.5s both;
  transition: color var(--transition-fast);
  z-index: 2;
  letter-spacing: 1px;
}

.hero__scroll:hover { color: var(--primary-light); }

.hero__scroll-arrow {
  font-size: 1.2rem;
  animation: bounce 2s infinite;
}

/* ============================================
   STICKY FILTER BAR
   ============================================ */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.filter-bar__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Dropdown */
.city-box {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  box-shadow: var(--shadow-sm);
  height: 42px;
  transition: var(--transition-fast);
}

.city-box:hover { border-color: var(--primary); }

.city-box__icon { font-size: 1rem; margin-right: 6px; }

.city-box__select {
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  height: 100%;
  padding-right: 18px;
}

/* Search Box */
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-box__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  color: var(--text-muted);
}

.search-box__input {
  width: 100%;
  height: 42px;
  padding: 10px 14px 10px 40px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-box__input::placeholder { color: var(--text-muted); }

.search-box__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(189, 27, 33, 0.1);
}

/* Filter buttons */
.filter-group {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-group::-webkit-scrollbar { display: none; }

.filter-bowl-btn,
.filter-cat-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 1.5px solid var(--border);
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
}

.filter-bowl-btn:hover,
.filter-cat-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-red-tint);
}

.filter-bowl-btn.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-red);
}

.filter-cat-btn.active {
  background: var(--bg-red-tint);
  color: var(--primary);
  border-color: var(--primary);
}

/* State controls */
.opennow-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 1.5px solid var(--border);
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.opennow-btn.active {
  background: #E8F5E9;
  border-color: #2E7D32;
  color: #2E7D32;
}

.random-btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 3px 12px rgba(189,27,33,0.25);
}

.random-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(189,27,33,0.35);
}

.nearest-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 1.5px solid var(--border);
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nearest-btn.active {
  background: #E3F2FD;
  border-color: #1565C0;
  color: #1565C0;
}

.nearest-btn__spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

.nearest-btn.loading .nearest-btn__spinner {
  display: inline-block;
}

.nearest-btn.loading .nearest-btn__label {
  opacity: 0.7;
}

.result-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: auto;
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: 20px;
}

.result-count.no-results {
  background: #FFEBEE;
  color: #C62828;
}

/* ============================================
   WELCOME MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.65);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.welcome-card {
  background: white;
  width: 90%;
  max-width: 580px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.2rem;
  border: 1px solid rgba(197, 160, 89, 0.2);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.modal-overlay.active .welcome-card {
  transform: translateY(0);
}

.welcome-card__header {
  margin-bottom: 2rem;
}

.welcome-card__logo {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.6rem;
  animation: pulse-grow 2s infinite ease-in-out;
}

.welcome-card__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--secondary);
  margin-bottom: 0.4rem;
}

.welcome-card__sub {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.8rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.2rem;
  scrollbar-width: thin;
}

.welcome-city-btn {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.welcome-city-btn:hover {
  background: var(--bg-red-tint);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.welcome-city-btn span:first-child {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.welcome-city-btn__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   ACHIEVEMENT PANEL
   ============================================ */
.achievement-panel {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.achievement-panel__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}

.achievement-badge__emoji { font-size: 1.2rem; }

.achievement-badge__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.achievement-info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: var(--transition-fast);
}

.achievement-info-btn:hover { background: var(--primary); }

.achievement-progress {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-progress__text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.achievement-progress__count {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--primary);
}

.achievement-progress__track {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.achievement-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.achievement-share-btn {
  background: #2E7D32;
  color: white;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(46,125,50,0.25);
  transition: var(--transition-fast);
}

.achievement-share-btn:hover {
  background: #1B5E20;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46,125,50,0.35);
}

.achievement-mini-btn {
  background: white;
  border: 1.5px solid var(--border);
  padding: 8px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.achievement-mini-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* ============================================
   MAP SECTION
   ============================================ */
.map-section {
  width: 100%;
  height: 75vh;
  min-height: 600px;
  background: var(--bg-tertiary);
  position: relative;
}

.map-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: row;
}

#map {
  flex: 5;
  height: 100%;
}

.map-sidebar {
  flex: 1;
  min-width: 280px;
  height: 100%;
  background: #EDF3EE; /* Soft premium light sage green background */
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: -2px 0 10px rgba(0,0,0,0.05);
}

/* Hide default map attribution control since it's relocated to the footer */
.leaflet-control-attribution {
  display: none !important;
}

.map-sidebar__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.map-sidebar__placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.map-sidebar__placeholder p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.map-sidebar__content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.map-sidebar__close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.map-sidebar__close:hover {
  color: var(--primary);
}

/* Sidebar Specific card styling refinements */
.map-sidebar .map-popup__bowls {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: 2rem; /* Avoid overlap with close button */
}

.map-sidebar .map-popup__name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.3;
  margin-top: 4px;
}

.map-sidebar .map-popup__category {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}

.map-sidebar .map-popup__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.map-sidebar .map-popup__closed {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.map-sidebar .map-popup__distance {
  font-size: 0.78rem;
  color: #1565C0;
  font-weight: 600;
}

.map-sidebar .map-popup__address {
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.map-sidebar .map-popup__phone {
  font-size: 0.82rem;
  margin-top: 2px;
}

.map-sidebar .phone-chip {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.map-sidebar .card__hours {
  margin-top: 4px;
  width: 100%;
  background: #ffffff; /* White card layout to pop out from sage green background */
}

.map-sidebar .card__hours summary {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.map-sidebar .hours-row {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.map-sidebar .map-popup__desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: #ffffff; /* White card layout to pop out from sage green background */
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 3.5px solid var(--primary);
  line-height: 1.5;
  margin-top: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.map-sidebar .map-popup__note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.map-sidebar .map-popup__nav {
  display: block;
  text-align: center;
  background: #243026;
  color: white;
  padding: 9px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 6px;
  transition: var(--transition-fast);
}

.map-sidebar .map-popup__nav:hover {
  background: var(--primary);
  box-shadow: var(--shadow-red);
}

/* User Location marker dot styling */
.user-loc-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-loc-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1976D2;
  border: 3px solid white;
  box-shadow: 0 0 10px rgba(25,118,210,0.6);
  position: relative;
}

.user-loc-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(25,118,210,0.2);
  animation: pulse-loc 2.2s infinite;
}

/* Custom Marker Styling */
.custom-marker:hover {
  z-index: 99999 !important;
}

.custom-marker div:hover {
  transform: scale(1.15) !important;
}

/* Inline Michelin Icon Styling */
.michelin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 1.8px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
  margin-right: 6px;
}

.michelin-icon--large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: 2.2px solid #FFFFFF;
  margin-right: 0;
  box-shadow: 0 2px 8px rgba(189, 27, 33, 0.3);
}

/* Custom Map Popup */
.custom-popup .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  padding: 0;
}

.custom-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(197, 160, 89, 0.15);
  border-top: none;
  border-left: none;
}

.custom-popup .leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 20px !important;
  top: 8px !important;
  right: 10px !important;
}

.custom-popup .leaflet-popup-close-button:hover {
  color: var(--primary) !important;
}

.custom-popup .leaflet-popup-content {
  margin: 0;
}

/* Popup Content Style */
.map-popup {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-popup__bowls {
  font-size: 0.8rem;
}

.map-popup__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.25;
}

.map-popup__category {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.map-popup__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1px;
}

.map-popup__closed {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.map-popup__distance {
  font-size: 0.75rem;
  color: #1565C0;
  font-weight: 600;
}

.map-popup__address {
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 5px;
  margin-top: 1px;
}

.map-popup__phone {
  font-size: 0.78rem;
  margin-top: -2px;
}

.map-popup .phone-chip {
  padding: 3px 8px;
  font-size: 0.75rem;
}

.map-popup .card__hours {
  margin-bottom: 0;
  margin-top: 2px;
}

.map-popup .card__hours summary {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.map-popup .hours-row {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.map-popup__desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  line-height: 1.4;
  margin-top: 1px;
}

.map-popup__note {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.map-popup__nav {
  display: block;
  text-align: center;
  background: #243026;
  color: white;
  padding: 7px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
  transition: var(--transition-fast);
}

.map-popup__nav:hover {
  background: var(--primary);
  box-shadow: var(--shadow-red);
}

/* ============================================
   RESTAURANT CARD LIST
   ============================================ */
.restaurant-section {
  max-width: 1400px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}

.section-header {
  border-left: 5px solid var(--primary);
  padding-left: 12px;
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--secondary);
}

.section-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

#restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card--highlight {
  animation: pulse-highlight 1.5s ease-out;
}

.card--visited {
  border-color: rgba(46, 158, 91, 0.35);
  background: #F4FAF6;
}

.card--closed-today {
  opacity: 0.72;
}

.card__accent {
  height: 4px;
  width: 100%;
}

.card__content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.card__bowls {
  font-size: 1.1rem;
}

.card__district {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.card__name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.card__category {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

/* Status Badges */
.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}
.status-badge--open { background: #E8F5E9; color: #2E7D32; }
.status-badge--closed { background: #FFF3E0; color: #E65100; }
.status-badge--closed-today { background: #FFEBEE; color: #C62828; }
.status-badge--unknown { background: #ECEFF1; color: #37474F; }

.card__closed {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card__distance {
  font-size: 0.78rem;
  color: #1565C0;
  font-weight: 600;
}

/* Phone and weekly hours collapse styles */
.card__phone-row {
  margin-bottom: 0.6rem;
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1565C0;
  background: #E3F2FD;
  padding: 4px 10px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.phone-chip:hover {
  background: #BBDEFB;
}

.phone-chip--none {
  background: #ECEFF1;
  color: #546E7A;
}

.card__hours {
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow: hidden;
}

.card__hours[open] {
  border-color: rgba(189, 27, 33, 0.2);
}

.card__hours summary {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__hours summary::-webkit-details-marker {
  display: none;
}

.card__hours summary::after {
  content: '▼';
  font-size: 0.65rem;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.card__hours[open] summary::after {
  transform: rotate(180deg);
}

.hours-list {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 2px 0;
}

.hours-row--today {
  font-weight: 700;
  color: var(--primary);
  background: rgba(189, 27, 33, 0.05);
  border-radius: 4px;
  padding: 2px 6px;
  margin: 0 -6px;
}

.hours-row--closed .hours-row__time {
  color: var(--text-muted);
}

.card__address {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-red-tint);
  border-left: 3.5px solid var(--primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.card__translate {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: -0.6rem;
  margin-bottom: 1rem;
}
.card__translate:hover { text-decoration: underline; }

.card__actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: auto;
}

.card__btn {
  padding: 9px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.card__btn--map {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.card__btn--map:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.card__btn--nav {
  background: #243026;
  color: white;
}

.card__btn--nav:hover {
  background: var(--primary);
  box-shadow: var(--shadow-red);
}

.card__btn--check {
  background: white;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.card__btn--check:hover {
  background: #E8F5E9;
  border-color: #2E7D32;
  color: #2E7D32;
}

.card__check-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--text-muted);
  border-radius: 3px;
  display: inline-block;
  position: relative;
  transition: var(--transition-fast);
}

.card--visited .card__check-box {
  border-color: #2E7D32;
  background: #2E7D32;
}

.card--visited .card__check-box::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 3.5px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.card__btn--share {
  background: white;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.card__btn--share:hover {
  background: var(--bg-secondary);
}

.no-results-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.no-results-emoji {
  font-size: 3rem;
  display: block;
}

.no-results-msg h3 {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
}

.no-results-msg p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
  max-width: 1400px;
  margin: 4.5rem auto;
  padding: 0 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.stats-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.stats-card__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 10px;
}

/* Horizontal Stat Bars */
#district-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-bar__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  width: 75px;
  text-align: right;
  white-space: nowrap;
}

.stat-bar__track {
  flex: 1;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  width: 0%; /* Animated via transition width */
  transition: width 0.1s;
}

.stat-bar__value {
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

/* Donut Chart and Categories */
.donut-wrapper {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-wrap: wrap;
}

#category-donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
  box-shadow: var(--shadow-sm);
}

#category-donut::after {
  content: attr(data-total) '\n軒';
  position: absolute;
  inset: 26px;
  background: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--secondary);
  font-family: 'Noto Serif TC', serif;
  line-height: 1.2;
}

#category-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.stat-category {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.stat-category__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.stat-category__name {
  font-weight: 700;
  color: var(--text-primary);
  margin-right: auto;
}

.stat-category__count {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============================================
   LEVELS DETAILS MODAL
   ============================================ */
.levels-modal__content {
  max-width: 480px !important;
}

.levels-modal__title {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--secondary);
  text-align: center;
  margin-bottom: 0.3rem;
}

.levels-modal__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.8rem;
}

.levels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.level-row--active {
  background: var(--bg-red-tint);
  border-color: var(--primary);
}

.level-row__emoji {
  font-size: 1.4rem;
}

.level-row__details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.level-row__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.level-row__req {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.level-row--active .level-row__title {
  color: var(--primary);
}

.level-row__current-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============================================
   RANDOM SELECTION MODAL
   ============================================ */
.modal-content {
  background: white;
  width: 90%;
  max-width: 460px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.2rem;
  border: 1px solid rgba(197, 160, 89, 0.2);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close:hover { color: var(--primary); }

.modal-dice {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.modal-dice.spin {
  animation: roll-dice 0.6s ease-out;
}

.modal-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.modal-restaurant {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.modal-bowls {
  font-size: 1.1rem;
}

.modal-name {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--secondary);
}

.modal-category-text {
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-district {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-address {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.modal-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
  line-height: 1.5;
}

.modal-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.modal-btn {
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition-fast);
}

.modal-btn--nav {
  background: #243026;
  color: white;
}

.modal-btn--nav:hover {
  background: var(--primary);
  box-shadow: var(--shadow-red);
}

.modal-btn--map {
  background: white;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.modal-btn--map:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.modal-retry {
  background: var(--bg-red-tint);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition-fast);
}

.modal-retry:hover {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-red);
}

/* ============================================
   FOOTER SECTION
   ============================================ */
.footer {
  background: linear-gradient(135deg, #1B241C 0%, #222D23 50%, #2C3A2D 100%);
  color: rgba(255, 255, 255, 0.45);
  padding: 4rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  border-top: 4px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--primary-light);
}

.footer-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 8px;
}

.footer-counter__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2E7D32;
  animation: pulse-dot 2.5s infinite;
}

.footer-counter__text {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: scale(1.08);
  box-shadow: var(--shadow-red);
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

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

@keyframes pulse-dot {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(46,125,50, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(46,125,50, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(46,125,50, 0); }
}

@keyframes pulse-dot-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(189,27,33, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(189,27,33, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(189,27,33, 0); }
}

@keyframes pulse-loc {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes pulse-highlight {
  0% { box-shadow: 0 0 0 0 rgba(189, 27, 33, 0.4); border-color: var(--primary); }
  70% { box-shadow: 0 0 0 10px rgba(189, 27, 33, 0); }
  100% { box-shadow: none; }
}

@keyframes roll-dice {
  0% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(180deg) scale(1.2); }
  70% { transform: rotate(360deg) scale(0.95); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes pulse-grow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ============================================
   RESPONSIVE LAYOUTS
   ============================================ */
@media (max-width: 992px) {
  .hero-stats { gap: 1rem; }
  .hero-stat { padding: 1.2rem 2rem; min-width: 140px; }
  .donut-wrapper { justify-content: center; gap: 1.5rem; }
  #category-donut { margin: 0 auto; }
}

@media (max-width: 768px) {
  .hero { min-height: 80vh; padding: 1.5rem 1.5rem 4rem; }
  .hero::after { height: 40px; }
  .hero__title { font-size: 3.2rem; }
  .hero__year { margin-bottom: 2.5rem; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; width: 100%; max-width: 400px; }
  .hero-stat { padding: 1rem; min-width: 0; }
  
  .filter-bar { padding: 0.6rem 1rem; }
  .filter-bar__inner { gap: 0.6rem; }
  .search-box { max-width: none; width: 100%; }
  .result-count { width: 100%; text-align: center; margin-top: 4px; }
  
  .achievement-panel__inner { gap: 1rem; }
  .achievement-progress { width: 100%; }
  .achievement-actions { width: 100%; justify-content: space-between; }
  
  .map-section { height: 45vh; min-height: 300px; }
  .map-container { flex-direction: column; }
  #map { flex: none; width: 100%; height: 100%; }
  .map-sidebar { display: none; }
  
  #restaurant-grid { grid-template-columns: 1fr; }
  .card__actions { grid-template-columns: repeat(2, 1fr); }
  
  .stats-grid { grid-template-columns: 1fr; }
  
  .welcome-card { padding: 1.5rem; }
  .welcome-grid { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
}

@media (max-width: 480px) {
  .welcome-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { max-width: none; }
}

/* ===== Language Switcher ===== */
.lang-switch {
  position: absolute;
  top: 25px;
  right: 25px;
  display: flex;
  gap: 8px;
  z-index: 100;
  background: rgba(27, 36, 28, 0.6);
  padding: 6px 10px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lang-switch__btn {
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-switch__btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.lang-switch__btn.active {
  color: white;
  background: var(--primary);
  box-shadow: var(--shadow-red);
}

@media (max-width: 768px) {
  .lang-switch {
    top: 15px;
    right: 15px;
    padding: 4px 6px;
    gap: 4px;
  }
  .lang-switch__btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}
