/**
 * EcoMap Korea - Premium Design System (style.css)
 * 글래스모피즘, 에메랄드/다크 테마, 애니메이션 및 반응형 레이아웃을 정의합니다.
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* 테마 컬러 정의 (다크 모드 & 친환경 에메랄드) */
  --bg-primary: #0b0f19;
  --bg-secondary: #161c2d;
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-glass-hover: rgba(30, 41, 59, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-focus: rgba(16, 185, 129, 0.4);
  
  --primary: #10b981;          /* 에메랄드 그린 */
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* 상태 컬러 */
  --color-clean: #10b981;      /* 청결 (초록) */
  --color-normal: #eab308;     /* 보통 (노랑) */
  --color-full: #ef4444;       /* 가득참 (빨강) */
  
  /* 지연 시간 및 그림자 */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-inset: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

/* 기본 리셋 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* 메인 대시보드 레이아웃 */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* ==========================================================================
   사이드바 스타일 (왼쪽 패널)
   ========================================================================== */
.sidebar {
  width: 420px;
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  position: relative;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}

/* 로고 섹션 */
.logo-container {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.logo-icon {
  color: var(--primary);
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, #ffffff 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 네비게이션 탭 */
.sidebar-tabs {
  display: flex;
  padding: 8px 16px;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  font-weight: 600;
}

/* 탭 본문 영역 */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 스크롤바 디자인 */
.tab-content::-webkit-scrollbar {
  width: 6px;
}
.tab-content::-webkit-scrollbar-track {
  background: transparent;
}
.tab-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.panel-section {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.panel-section.active {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

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

/* ==========================================================================
   UI 컴포넌트 & 카드 스타일
   ========================================================================== */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(16px);
  position: relative;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

/* 통계 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-item.highlight {
  border-color: rgba(16, 185, 129, 0.2);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.stat-item.highlight .stat-value {
  color: var(--primary);
}

/* 가로 구분자 */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* 에코 링 차트 대용 진행바 */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.progress-bar-bg {
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  border-radius: 99px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 타입 분포 바 리스트 */
.type-distribution-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dist-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dist-bar-label {
  width: 70px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dist-bar-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 0.5s ease-out;
}

.dist-bar-value {
  width: 30px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
}

/* 검색 및 필터 UI */
.search-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
  background: rgba(15, 23, 42, 0.8);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-btn-inside {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.search-btn-inside:hover {
  background: var(--primary-hover);
}

/* 필터 태그 그룹 */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag-checkbox {
  display: none;
}

.filter-tag-label {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.filter-tag-label:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.filter-tag-checkbox:checked + .filter-tag-label {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

/* 리스트 컨테이너 */
.trash-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.trash-list::-webkit-scrollbar {
  width: 4px;
}
.trash-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.trash-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.trash-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.trash-item-card.active {
  background: rgba(16, 185, 129, 0.03);
  border-color: var(--primary);
}

.trash-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trash-item-info {
  flex: 1;
  min-width: 0;
}

.trash-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.trash-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trash-item-addr {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trash-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.status-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}
.status-badge.clean { background: rgba(16, 185, 129, 0.15); color: var(--color-clean); }
.status-badge.normal { background: rgba(234, 179, 8, 0.15); color: var(--color-normal); }
.status-badge.full { background: rgba(239, 68, 68, 0.15); color: var(--color-full); }

/* 입력 폼 필드 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.6);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 공통 버튼 */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* CSV 드롭존 */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.03);
}

.dropzone-icon {
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  transition: var(--transition-smooth);
}

.dropzone:hover .dropzone-icon, .dropzone.dragover .dropzone-icon {
  color: var(--primary);
  transform: translateY(-4px);
}

.dropzone-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.dropzone-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   지도 화면 및 우측 영역
   ========================================================================== */
.map-container {
  flex: 1;
  height: 100%;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

/* 지도 내 커스텀 플로팅 컨트롤러 */
.map-floating-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.map-floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

.map-floating-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--primary);
  transform: scale(1.05);
}

.map-floating-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   우측 상세 서랍 (Detail Drawer)
   ========================================================================== */
.detail-drawer {
  position: absolute;
  top: 24px;
  right: 88px;
  width: 360px;
  max-height: calc(100vh - 48px);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  z-index: 999;
  box-shadow: var(--shadow-premium);
  transform: translateX(420px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.drawer-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.drawer-close svg {
  width: 20px;
  height: 20px;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-memo {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--primary);
  padding: 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 상세 평가 섹션 */
.drawer-votes {
  display: flex;
  gap: 12px;
}

.vote-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vote-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.vote-btn.like-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.vote-btn.dislike-btn:hover {
  border-color: var(--color-full);
  color: var(--color-full);
}

/* 외부 지도 연동 버튼들 */
.external-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.nav-link-btn {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.nav-link-btn.kakao { background: #FFEB00; color: #3C1E1E; }
.nav-link-btn.naver { background: #03C75A; color: #ffffff; }
.nav-link-btn.kakao:hover { background: #FADA0A; }
.nav-link-btn.naver:hover { background: #02b350; }

/* 상태 제보 셀렉트박스 */
.status-update-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   Leaflet 팝업 및 마커 스타일링 커스텀
   ========================================================================== */
.custom-map-marker {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  background: var(--marker-color);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  border: 2px solid white;
  transition: var(--transition-smooth);
}

.marker-icon-wrapper {
  transform: rotate(45deg);
  color: white;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-icon-wrapper svg {
  width: 100%;
  height: 100%;
}

/* 상태별 시각적 효과 (후광 효과) */
.custom-map-marker.status-full {
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.4), 0 4px 10px rgba(0, 0, 0, 0.4);
  animation: pulse-red 2s infinite;
}

.custom-map-marker.status-clean {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25), 0 4px 10px rgba(0, 0, 0, 0.4);
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6), 0 4px 10px rgba(0, 0, 0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0), 0 4px 10px rgba(0, 0, 0, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 4px 10px rgba(0, 0, 0, 0.4); }
}

/* 내 위치 마커 */
.my-location-marker {
  position: relative;
  width: 20px;
  height: 20px;
}

.center-dot {
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border: 2px solid white;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 4px;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.8);
  z-index: 2;
}

.pulse-ring {
  width: 20px;
  height: 20px;
  border: 3px solid #3b82f6;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: pulse-blue 1.8s infinite ease-out;
  opacity: 0;
}

@keyframes pulse-blue {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* 커스텀 클러스터 스타일 */
.custom-cluster-icon {
  background: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transition: var(--transition-smooth);
}

.custom-cluster-icon:hover {
  transform: scale(1.1);
}

/* 리플렛 팝업 리디자인 */
.custom-leaflet-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow-premium);
}

.custom-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: 250px !important;
}

.custom-leaflet-popup .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.9);
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.map-popup-card {
  padding: 16px;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.popup-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.popup-status {
  font-size: 0.7rem;
  font-weight: 500;
}
.popup-status.clean { color: var(--color-clean); }
.popup-status.normal { color: var(--color-normal); }
.popup-status.full { color: var(--color-full); }

.popup-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin-bottom: 4px;
}

.popup-address {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-btn-detail {
  background: var(--primary);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.popup-btn-detail:hover {
  background: var(--primary-hover);
}

.popup-votes {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   주소 검색 자동완성 리스트
   ========================================================================== */
.autocomplete-list {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 150px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

.autocomplete-item {
  padding: 10px 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ==========================================================================
   반응형 레이아웃 및 모바일 처리
   ========================================================================== */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column-reverse; /* 모바일에서는 지도가 위, 사이드바가 아래 */
  }

  .sidebar {
    width: 100%;
    height: 60vh;
    border-right: none;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
  }

  .detail-drawer {
    width: calc(100vw - 32px);
    right: 16px;
    top: 16px;
    bottom: unset;
    max-height: 50vh;
    transform: translateY(-100vh); /* 위에서 아래로 떨어지는 형태 */
  }

  .detail-drawer.active {
    transform: translateY(0);
  }

  .map-floating-controls {
    top: unset;
    bottom: calc(60vh + 16px);
    right: 16px;
  }
}

/* ==========================================================================
   Seoul Oasis - 다국어 스위처 및 구글 연동 스타일 추가
   ========================================================================== */
.lang-switcher {
  display: flex;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.lang-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* 구글 지도 전용 딥링크 버튼 */
.nav-link-btn.google {
  background: #4285F4;
  color: white !important;
}

.nav-link-btn.google:hover {
  background: #357ae8;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.4);
}

/* 카테고리별 마커에 대응되는 펄싱 애니메이션 등 */
.custom-map-marker.status-clean .marker-pulse {
  border-color: #06B6D4;
}

/* 임포트 탭 드롭존 진행 게이지 레이아웃 보완 */
.dropzone.loading-progress {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.03);
  pointer-events: none;
}

/* 펄스 링 (Pulse Ring) 회전 로더 */
.pulse-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
