@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

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

body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── 지도 ── */
#map { width: 100%; height: 100%; }

/* ── 헤더 그라데이션 ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 24px 28px 56px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.48) 0%, rgba(0,0,0,0.18) 60%, transparent 100%);
  pointer-events: none;
}

#title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

/* ── 하단 푸터 ── */
#footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  padding: 48px 28px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.12) 60%, transparent 100%);
  pointer-events: none;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.03em;
  text-align: center;
}

#adminLink {
  color: inherit;
  text-decoration: none;
  pointer-events: all;
}

#adminLink:hover, #adminLink:visited, #adminLink:active {
  color: inherit;
  text-decoration: none;
}

/* ── 통계 뱃지 ── */
#stats {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 10;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-badge {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ── 여행 목록 토글 버튼 ── */
#tripToggleBtn {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: 'Pretendard', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.15s;
}

#tripToggleBtn:hover { background: rgba(255,255,255,1); }

/* ── 여행 목록 패널 ── */
#tripPanel {
  position: fixed;
  top: 0; right: 0;
  width: 320px;
  height: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 20;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

#tripPanel.open { transform: translateX(0); }

#tripPanelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid #eee;
}

#tripPanelClose {
  background: none;
  border: none;
  font-size: 1rem;
  color: #999;
  cursor: pointer;
  padding: 4px;
}

#tripList {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-card {
  border: 1.5px solid #eee;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.trip-card:hover { border-color: #bbb; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.trip-card.active { border-color: #111; }

.trip-card-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.trip-card-date {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 6px;
}

.trip-card-desc {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.5;
}

.trip-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.trip-card-link {
  font-size: 0.75rem;
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

.trip-card-link:hover { text-decoration: underline; }

.trip-all-btn {
  font-family: 'Pretendard', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f5f5f7;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: #333;
  margin-bottom: 4px;
}

.trip-all-btn:hover { background: #eee; }
.trip-all-btn.active { background: #111; color: #fff; }

/* ── Google Maps 커스텀 마커 ── */
.gm-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  border: 2px solid #e74c3c;
  cursor: pointer;
}

.gm-pin span {
  transform: rotate(45deg);
  font-size: 1.15rem;
  line-height: 1;
}

.gm-pin.city {
  width: 46px;
  height: 46px;
  border-color: #4f46e5;
  border-width: 2.5px;
}

.gm-pin.city span { font-size: 1.4rem; }

/* ── InfoWindow 커스텀 스타일 ── */
.iw-content { font-family: 'Pretendard', sans-serif; min-width: 160px; }
.iw-flag { font-size: 1.3rem; margin-bottom: 4px; }
.iw-name { font-weight: 700; font-size: 0.95rem; color: #111; }
.iw-sub { font-size: 0.78rem; color: #777; margin-top: 2px; }
.iw-memo { font-size: 0.76rem; color: #999; margin-top: 6px; padding-top: 6px; border-top: 1px solid #eee; }
.iw-trip { font-size: 0.75rem; font-weight: 600; color: #4f46e5; margin-top: 6px; }
