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

html, body { height: 100%; overflow: hidden; }

body {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, sans-serif;
  color: #e8e4da;
  background: #14171c;
}

#map { position: absolute; inset: 0; }

#sidebar {
  position: absolute;
  top: 16px; left: 16px; bottom: 16px;
  width: 300px;
  display: flex;
  flex-direction: column;
  background: rgba(18, 22, 28, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
}

#sidebar header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }

.subtitle { font-size: 12px; color: #9aa3ad; margin: 2px 0 12px; }

#search {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e8e4da;
  font-size: 13px;
  outline: none;
}
#search:focus { border-color: #e8a33d; }

#stats-line { font-size: 11px; color: #9aa3ad; margin-top: 8px; }

#upload-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #e8a33d;
  text-decoration: none;
}
#upload-link:hover { text-decoration: underline; }

#hike-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 8px;
}

#hike-list li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
#hike-list li:hover { background: rgba(255, 255, 255, 0.07); }
#hike-list li.active { background: rgba(232, 163, 61, 0.18); }

#hike-list .hike-title { font-size: 14px; font-weight: 600; }
#hike-list .hike-meta { font-size: 11px; color: #9aa3ad; margin-top: 2px; }

.year-divider {
  font-size: 11px;
  font-weight: 700;
  color: #e8a33d;
  padding: 12px 12px 4px !important;
  cursor: default !important;
}
.year-divider:hover { background: none !important; }

#hike-card {
  position: absolute;
  right: 16px; bottom: 24px;
  width: 400px;
  padding: 18px;
  background: rgba(18, 22, 28, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  z-index: 10;
}
#hike-card.hidden { display: none; }

#card-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  color: #9aa3ad; font-size: 20px; cursor: pointer;
}

#card-title { font-size: 17px; font-weight: 700; padding-right: 24px; }
#card-date { font-size: 12px; color: #9aa3ad; margin: 4px 0 10px; }

.card-stats {
  display: flex;
  gap: 14px;
  font-size: 13px;
  margin-bottom: 10px;
}
.card-stats span { color: #cfd6dd; }
.card-stats b { color: #e8a33d; }

#profile { width: 100%; height: 90px; border-radius: 6px; background: rgba(255,255,255,0.04); }

#card-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  background: #e8a33d;
  color: #14171c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}
#card-link.disabled { opacity: 0.35; pointer-events: none; }

#reset-view {
  position: absolute;
  top: 16px; right: 16px;
  padding: 8px 14px;
  background: rgba(18, 22, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e8e4da;
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
}
#reset-view:hover { border-color: #e8a33d; }

.hike-marker {
  width: 14px; height: 14px;
  background: #e8a33d;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(232, 163, 61, 0.8);
  cursor: pointer;
}
.hike-marker:hover { transform: scale(1.3); }

.hike-marker-label {
  position: absolute;
  left: 18px; top: -2px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.7);
  pointer-events: none;
}

@media (max-width: 720px) {
  #sidebar { width: calc(100% - 32px); bottom: auto; max-height: 45%; }
  #hike-card { width: calc(100% - 32px); }
}
