/* SpeedCam - Modern UI 2026 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --warning: #f59e0b;
  --success: #16a34a;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  white-space: nowrap;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

/* Map */
#map {
  width: 100%;
  height: 100vh;
  padding-top: 64px;
}

/* Bottom Sheet / Filter */
.filter-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 8px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.filter-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
}

.filter-btn:hover:not(.active) {
  background: #f1f5f9;
}

/* Location Button */
.my-location-btn {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.my-location-btn:active {
  transform: scale(0.95);
}

/* Info Card (when marker clicked) */
.info-card {
  position: fixed;
  bottom: 100px;
  left: 16px;
  right: 16px;
  max-width: 400px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 20px;
  z-index: 950;
  display: none;
  animation: slideUp 0.3s ease;
}

.info-card.show { display: block; }

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

.info-card .close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.info-card .speed {
  font-size: 2rem;
  font-weight: 800;
  color: var(--danger);
}

.info-card .type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #fef2f2;
  color: var(--danger);
  margin-bottom: 8px;
}

.info-card .address {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 8px 0;
}

.info-card .meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 600px) {
  .filter-bar {
    bottom: 16px;
    padding: 6px;
    gap: 4px;
  }
  .filter-btn {
    padding: 9px 14px;
    font-size: 0.85rem;
  }
}
