:root {
  --accent-blue: #3b82f6;
  --accent-amber: #f59e0b;
  --accent-green: #22c55e;
  --accent-rose: #f43f5e;
  --accent-violet: #8b5cf6;
  --accent-cyan: #06b6d4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  background: #0b1020;
  color: #f4f7ff;
}
.top { padding: 24px 20px 10px; }
.top h1 {
  margin: 0 0 6px;
  background: linear-gradient(135deg, #f4f7ff 0%, var(--accent-cyan) 50%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.top p { margin: 0; color: #b9c1dd; }

.controls {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  grid-template-columns: 1fr;
}
input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2d365e;
  background: #121935;
  color: #fff;
}
.inline-actions { display:flex; gap:8px; flex-wrap:wrap; }
.inline-actions button {
  border: 1px solid #3a4472;
  background: #161f40;
  color: #dbe3ff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.regions { display: flex; flex-wrap: wrap; gap: 8px; }
.regions button {
  border: 1px solid #3a4472;
  background: #161f40;
  color: #dbe3ff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.regions button.active { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }

.filter-label { color: #9fb0e8; font-size: 13px; margin-right: 6px; align-self: center; }
.cuisine-filters, .halal-filter, .season-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cuisine-filters button, .halal-filter button, .season-filters button {
  border: 1px solid #3a4472;
  background: #161f40;
  color: #dbe3ff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.cuisine-filters button.active { background: var(--accent-amber); border-color: var(--accent-amber); color: #1c1917; }
.halal-filter button.active { background: var(--accent-green); border-color: var(--accent-green); color: #fff; }
.season-filters button.active { background: var(--accent-violet); border-color: var(--accent-violet); color: #fff; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  padding: 0 20px 10px;
}
.stat {
  background: #121935;
  border: 1px solid #2b3560;
  border-radius: 12px;
  padding: 10px;
  border-top: 3px solid var(--accent-blue);
}
.stat:nth-child(1) { border-top-color: var(--accent-cyan); }
.stat:nth-child(2) { border-top-color: var(--accent-amber); }
.stat:nth-child(3) { border-top-color: var(--accent-violet); }
.stat:nth-child(4) { border-top-color: var(--accent-rose); }
.stat:nth-child(5) { border-top-color: var(--accent-green); }
.stat:nth-child(6) { border-top-color: var(--accent-blue); }
.stat .label { color: #9fb0e8; font-size: 12px; }
.stat .value { font-size: 20px; font-weight: 700; }
.stat:nth-child(1) .value { color: var(--accent-cyan); }
.stat:nth-child(2) .value { color: var(--accent-amber); }
.stat:nth-child(3) .value { color: var(--accent-violet); }
.stat:nth-child(4) .value { color: var(--accent-rose); }
.stat:nth-child(5) .value { color: var(--accent-green); }
.stat:nth-child(6) .value { color: var(--accent-blue); }

main { padding: 0 20px 28px; }
.count { color: #b8c2eb; margin: 8px 0 12px; }
.map-wrap { margin: 8px 0 14px; border:1px solid #2b3560; border-radius:12px; overflow:hidden; }
.map-wrap.hidden { display:none; }
.map-wrap { position: relative; }
#map { width:100%; height:360px; background:#0f1530; }
.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 21, 48, 0.9);
  color: #9fb0e8;
  font-size: 14px;
  z-index: 10;
}
.map-loading.hidden { display: none; }
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  color: #9fb0e8;
  font-size: 14px;
}
.map-placeholder a { color: var(--accent-cyan); }
.map-popup { padding: 4px 0; font-size: 13px; color: #1a1a2e; }
.map-popup b { font-size: 14px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.card {
  border: 1px solid #2b3560;
  border-radius: 12px;
  background: #121935;
  padding: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 18px; }
.meta { color: #a9b5e1; font-size: 13px; margin: 2px 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.badge {
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 8px;
}
.badge-region { background: rgba(6, 182, 212, 0.2); border: 1px solid var(--accent-cyan); color: #67e8f9; }
.badge-category { background: rgba(245, 158, 11, 0.2); border: 1px solid var(--accent-amber); color: #fcd34d; }
.badge-halal { background: rgba(34, 197, 94, 0.2); border: 1px solid var(--accent-green); color: #86efac; }
.badge-distance { background: rgba(139, 92, 246, 0.2); border: 1px solid var(--accent-violet); color: #c4b5fd; }
.links a { color: var(--accent-cyan); text-decoration: none; margin-right: 10px; font-size: 13px; }
.links a:hover { color: var(--accent-amber); }
.site-footer {
  padding: 16px 20px 24px;
  color: #9aa7d8;
  border-top: 1px solid #2b3560;
  margin-top: 8px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.site-footer .credits { margin: 0 0 8px; font-size: 14px; }
.site-footer .credits a { color: var(--accent-cyan); text-decoration: none; }
.site-footer .credits a:hover { text-decoration: underline; }
.site-footer #source { color: #7d8ab5; font-size: 12px; }
.site-footer .built-by { margin: 10px 0 0; color: #6b7594; font-size: 12px; min-height: 1.2em; }
.site-footer .built-by-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: built-by-blink 0.8s step-end infinite;
}
@keyframes built-by-blink {
  50% { opacity: 0; }
}

@media (min-width: 780px) {
  .controls { grid-template-columns: 1fr 220px; align-items: center; }
  .regions, .cuisine-filters, .halal-filter, .season-filters { grid-column: 1 / -1; }
}
