:root {
  --bg: #0c0e14;
  --surface: #151922;
  --surface-2: #1c2230;
  --border: #2a3347;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #6ea8fe;
  --accent-dim: #3d5a8a;
  --kef: #3dd68c;
  --deal: #f5c542;
  --under2: #7eb8da;
  --none: #6b7280;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(110, 168, 254, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(61, 214, 140, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.app { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

header { margin-bottom: 1rem; }
header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
header p { color: var(--muted); margin-top: 0.35rem; font-size: 0.95rem; }

.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 14, 20, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.search-wrap { flex: 1; min-width: 200px; position: relative; }
.search-wrap svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
#search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem 0.6rem 2.35rem;
  outline: none;
}
#search:focus { border-color: var(--accent); }
#search::placeholder { color: var(--muted); }

select.sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  max-width: 100%;
}

.kef-bar {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  background: rgba(61, 214, 140, 0.08);
  border: 1px solid rgba(61, 214, 140, 0.25);
  border-radius: 10px;
}
.kef-bar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--kef);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.kef-bar-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.kef-btn.active { background: rgba(61, 214, 140, 0.22); border-color: var(--kef); color: var(--kef); }
.kef-date {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}
.kef-date-label { font-size: 0.82rem; color: var(--muted); }
.kef-clear { border-style: dashed; color: var(--muted); font-size: 0.75rem; }
.kef-tonight-summary { font-size: 0.8rem; color: #b8e6cc; margin-top: 0.35rem; }

.controls-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}
.toggle-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.toggle-filters:hover { border-color: var(--accent-dim); }
.toggle-filters[aria-expanded="true"] .toggle-icon { transform: rotate(90deg); display: inline-block; }
.filter-count {
  background: var(--accent-dim);
  color: var(--text);
  border-radius: 999px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  min-width: 1.1rem;
  text-align: center;
}
.filter-count:empty { display: none; }
.active-filters-preview {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.filter-panel {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.2s ease;
  max-height: 1200px;
  opacity: 1;
  margin-top: 0.65rem;
}
.filter-panel.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.filter-section { margin-top: 0.65rem; }
.filter-section:first-child { margin-top: 0; }
.filter-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.35rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.chip:hover { border-color: var(--accent-dim); color: var(--text); }
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--text); }
.chip.clear { border-style: dashed; color: var(--accent); margin-left: 0.25rem; }
.chip.show-all { border-style: dashed; color: var(--muted); }
.chip.show-all:hover { color: var(--text); }
.show-all-inline { margin-top: 0.5rem; }

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.stats-bar strong { color: var(--text); }
.stats-muted { color: var(--muted); }

.results { display: grid; gap: 0.75rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent-dim); }
.card.on-tonight { border-color: rgba(61, 214, 140, 0.45); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; }
.card h2 { font-size: 1.05rem; font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.badge-kef { background: rgba(61, 214, 140, 0.18); color: var(--kef); }
.badge-deal { background: rgba(245, 197, 66, 0.18); color: var(--deal); }
.policy-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; font-style: italic; }
.badge-none { background: rgba(107, 114, 128, 0.2); color: var(--none); }
.badge-price { background: var(--surface-2); color: var(--text); }
.badge-live { background: rgba(61, 214, 140, 0.28); color: #fff; animation: pulse 2s ease infinite; }
@keyframes pulse { 50% { opacity: 0.75; } }

.schedule-line {
  font-size: 0.88rem;
  color: var(--kef);
  margin: 0.35rem 0 0.2rem;
  font-weight: 500;
}
.schedule-times { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }

.cuisine-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.45rem 0; }
.tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.policy-line { font-size: 0.88rem; margin: 0.3rem 0; color: #c5d0e0; }
.policy-line mark { background: rgba(110, 168, 254, 0.25); color: var(--text); border-radius: 3px; padding: 0 2px; }

.address-row { margin: 0.35rem 0; font-size: 0.88rem; }
.address-row a { color: var(--accent); text-decoration: none; }
.address-row a:hover { text-decoration: underline; }
.district { color: var(--muted); font-size: 0.8rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.55rem; font-size: 0.82rem; }
.links a { color: var(--accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}
footer a { color: var(--accent); }

@media (max-width: 640px) {
  header h1 { font-size: 1.4rem; }
  .card-top { flex-direction: column; }
  .badges { justify-content: flex-start; }
}