/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #FFF8F0;
  color: #2D1B0E;
  line-height: 1.6;
  min-height: 100vh;
}
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* === Header === */
.header {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFB627 100%);
  padding: 32px 0 24px;
  text-align: center;
  color: white;
}
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; }
.logo-icon { font-size: 36px; }
.logo-text { font-size: 36px; font-weight: 800; letter-spacing: -1px; }
.logo-accent { color: #FFF3C4; }
.tagline { margin-top: 8px; font-size: 16px; opacity: 0.92; font-weight: 500; }

/* === Search === */
.search-section {
  background: white;
  padding: 24px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #F5F0EB;
  border-radius: 16px;
  padding: 4px 16px;
  border: 2px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrapper:focus-within {
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}
.search-icon { font-size: 20px; margin-right: 8px; }
#searchInput {
  flex: 1;
  border: none;
  background: none;
  font-size: 18px;
  padding: 14px 0;
  outline: none;
  font-family: inherit;
  color: #2D1B0E;
}
#searchInput::placeholder { color: #A0917F; }
.clear-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #A0917F;
  padding: 4px 8px;
}
.suggestions {
  position: absolute;
  left: 20px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
}
.suggestion-item {
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #F5F0EB;
  transition: background 0.15s;
}
.suggestion-item:hover { background: #FFF8F0; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-name { font-weight: 600; font-size: 15px; }
.suggestion-meta { font-size: 13px; color: #A0917F; }

/* === Stats === */
.stats-bar { background: #FFF3E0; padding: 14px 0; }
.stats-row { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.stat { font-size: 14px; color: #6D5D4B; }
.stat-num { font-weight: 700; color: #FF6B35; font-size: 16px; }

/* === View Toggle === */
.view-toggle-section { padding: 20px 0 0; }
.view-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.toggle-btn {
  padding: 10px 24px;
  border: 2px solid #E8DFD5;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #6D5D4B;
  transition: all 0.2s;
}
.toggle-btn.active {
  background: #FF6B35;
  border-color: #FF6B35;
  color: white;
}
.toggle-btn:hover:not(.active) { border-color: #FF6B35; color: #FF6B35; }

/* Cuisine Filters */
.cuisine-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.cuisine-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid #E8DFD5;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: #6D5D4B;
  transition: all 0.2s;
  white-space: nowrap;
}
.cuisine-chip.active {
  background: #FF6B35;
  border-color: #FF6B35;
  color: white;
}
.cuisine-chip:hover:not(.active) { border-color: #FF6B35; }
.cuisine-chip .chip-count {
  display: inline-block;
  background: rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 12px;
  margin-left: 6px;
}
.cuisine-chip.active .chip-count { background: rgba(255,255,255,0.25); }

/* === Dish Grid === */
.main-content { padding: 24px 0 40px; min-height: 60vh; }
.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.dish-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #F0E8DF;
}
.dish-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.dish-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.dish-name { font-size: 18px; font-weight: 700; color: #2D1B0E; }
.dish-cuisine {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.dish-mentions { font-size: 13px; color: #A0917F; margin-bottom: 6px; }
.dish-restaurant-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #FF6B35;
}
.dish-restaurant-count .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF6B35;
}
.dish-top-spot { font-size: 13px; color: #6D5D4B; margin-top: 8px; }
.dish-top-spot strong { color: #2D1B0E; }

/* Load More */
.load-more-btn {
  display: block;
  margin: 32px auto 0;
  padding: 14px 40px;
  background: #FF6B35;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.load-more-btn:hover { background: #E85D2C; }

/* === Map === */
.map-container { padding: 0; }
#map { height: 70vh; width: 100%; border-radius: 0; }

/* === Dish Detail === */
.dish-detail-panel {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.back-btn {
  background: none;
  border: 1.5px solid #E8DFD5;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #6D5D4B;
  transition: all 0.2s;
}
.back-btn:hover { border-color: #FF6B35; color: #FF6B35; }
.detail-header h2 { font-size: 24px; font-weight: 800; }
.cuisine-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 8px;
}

.restaurant-list { display: flex; flex-direction: column; gap: 12px; }
.restaurant-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #F0E8DF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.restaurant-rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FF6B35;
  color: white;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.restaurant-rank.top3 { background: #FF6B35; }
.restaurant-rank:not(.top3) { background: #D4C4B0; }
.restaurant-info { flex: 1; min-width: 200px; }
.restaurant-name { font-size: 16px; font-weight: 700; }
.restaurant-address { font-size: 13px; color: #A0917F; margin-top: 2px; }
.restaurant-cuisines { font-size: 12px; color: #6D5D4B; margin-top: 4px; }
.restaurant-mentions {
  text-align: right;
  flex-shrink: 0;
}
.mention-count { font-size: 20px; font-weight: 800; color: #FF6B35; }
.mention-label { font-size: 12px; color: #A0917F; }
.restaurant-reviews { font-size: 12px; color: #A0917F; }
.directions-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #FF6B35;
  text-decoration: none;
  font-weight: 600;
}
.directions-link:hover { text-decoration: underline; }

/* === Footer === */
.footer {
  background: #2D1B0E;
  color: #D4C4B0;
  text-align: center;
  padding: 32px 0;
  margin-top: 40px;
}
.footer p { font-size: 16px; font-weight: 600; color: white; }
.footer-sub { font-size: 13px; margin-top: 6px; color: #A0917F; }

/* === Cuisine Colors === */
.cuisine-chinese { background: #FFE8E0; color: #CC3300; }
.cuisine-vietnamese { background: #E0F5E9; color: #1B7A3D; }
.cuisine-japanese { background: #FFF0F5; color: #CC3366; }
.cuisine-thai { background: #FFF5E0; color: #CC7700; }
.cuisine-indian { background: #FFF3E0; color: #CC6600; }
.cuisine-korean { background: #E8E0FF; color: #5533CC; }
.cuisine-filipino { background: #E0F0FF; color: #0066CC; }

/* === Responsive === */
@media (max-width: 600px) {
  .header { padding: 24px 0 18px; }
  .logo-text { font-size: 28px; }
  .logo-icon { font-size: 28px; }
  .tagline { font-size: 14px; }
  #searchInput { font-size: 16px; }
  .stats-row { gap: 16px; }
  .dish-grid { grid-template-columns: 1fr; }
  .detail-header h2 { font-size: 20px; }
  .restaurant-card { flex-direction: column; align-items: flex-start; }
  .restaurant-mentions { text-align: left; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dish-card { animation: fadeIn 0.3s ease-out; }
