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

#map { width: 100vw; height: 100vh; }

/* 상단 UI 패널 */
#ui {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}


/* 카테고리 필터 바 */
#category-bar {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 90vw;
  padding: 6px 12px;
  background: rgba(20, 20, 30, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  scrollbar-width: none;
}
#category-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #ccc;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.cat-btn.active,
.cat-btn:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}

#clock { color: #aaa; }
#count { color: #fff; font-weight: bold; }

#filters { display: flex; gap: 6px; align-items: center; }

.filter-divider {
  width: 0;
  height: 16px;
  border-left: 1px dashed rgba(255,255,255,0.25);
  margin: 0 2px;
}

.filter-btn {
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #ccc;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.filter-btn.active,
.filter-btn:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.filter-btn[data-tooltip] { position: relative; }
.filter-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: auto;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,30,0.9);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.filter-btn[data-tooltip]:hover::after { opacity: 1; }

/* 검색창 */
#search-box {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 101;
  width: 220px;
}
#search-input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(20,20,30,0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  outline: none;
}
#search-input::placeholder { color: #777; }
#search-results {
  list-style: none;
  margin-top: 4px;
  background: rgba(20,20,30,0.92);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  z-index: 101;
  position: relative;
}
#search-results.visible { display: block; }
#search-results li {
  padding: 9px 14px;
  color: #ddd;
  font-size: 13px;
  cursor: pointer;
}
#search-results li:hover, #search-results li.selected { background: rgba(255,255,255,0.1); color: #fff; }

/* 마커 */
.marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  color: #fff;
  border: 2px solid rgba(0,0,0,0.2);
  cursor: pointer;
}
.marker-24      { background: #e53e3e; }
.marker-time    { background: #d69e2e; }
.marker-unknown { background: #718096; }

/* 팝업 */
.popup {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  min-width: 200px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-family: sans-serif;
}
.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #999;
}
.popup-name     { font-size: 15px; font-weight: bold; margin-bottom: 2px; color: #111; }
.popup-category { font-size: 11px; color: #aaa; margin-bottom: 8px; }
.popup-rating       { font-size: 13px; color: #333; margin-bottom: 6px; }
.popup-review-count { font-size: 11px; color: #999; }
.popup-phone    { font-size: 12px; color: #555; margin-bottom: 2px; }
.popup-address  { font-size: 12px; color: #888; margin-bottom: 8px; }

.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: 12px; }
.hours-table td { padding: 2px 4px; color: #555; }
.hours-table .day-cell  { width: 20px; color: #888; }
.hours-table .time-cell { color: #444; }
.hours-table tr.today td { font-weight: bold; color: #e53e3e; }

.popup-note {
  font-size: 11px;
  color: #888;
  background: #f7f7f7;
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 8px;
  line-height: 1.5;
}
.popup-link {
  display: inline-block;
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
}
.popup-link:hover { text-decoration: underline; }

/* 하단 광고 배너 */
#ad-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 728px;
  max-width: 100vw;
  background: rgba(20, 20, 30, 0.85);
  backdrop-filter: blur(8px);
}
