/**
 * =============================================
 * K-바이오 클러스터맵 - 스타일시트
 * =============================================
 *
 * 디자인 참고:
 *   - BICS 메인 사이트 (다크 네이비 + 네트워크 패턴)
 *   - 글래스모피즘 카드 UI
 *   - 사이버/테크 느낌의 바이오 시각화
 *
 * 컬러 팔레트:
 *   - Primary Dark: #0a1628, #0d2a3d (다크 네이비)
 *   - Accent Cyan: #00d4ff, #4ecdc4 (청록 포인트)
 *   - Accent Blue: #2563eb, #3b82f6 (블루 포인트)
 *   - Text: #ffffff, rgba(255,255,255,0.8)
 *   - Glass: rgba(255,255,255,0.08)
 *
 * =============================================
 */


/* =============================================
   1. 기본 리셋 및 레이아웃
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: #0a1520;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* 모바일 동적 뷰포트 높이 */
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 메인 컨테이너 */
.container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(30, 80, 120, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(20, 60, 100, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, #0a1520 0%, #0d1a28 50%, #0a1520 100%);
}


/* =============================================
   2. 헤더 스타일
   ============================================= */

.header {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(0, 50, 80, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 180, 220, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-badge {
    background: rgba(0, 180, 220, 0.15);
    color: #00d4ff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(0, 180, 220, 0.3);
}


/* =============================================
   3. 지도 영역 스타일
   ============================================= */

.map-section {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: transparent;
    overflow: hidden;
}

.map-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    overflow: hidden;
    background: transparent;
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

/* 3D 지도 래퍼 */
.map-wrapper {
    transform-style: preserve-3d;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#map-svg {
    overflow: visible;
    filter: drop-shadow(8px 12px 24px rgba(0, 0, 0, 0.4));
    max-width: 100%;
    max-height: 100%;
    display: block;
}


/* =============================================
   📌 4. 3D 지역 스타일 (상단면, 측면)
   ============================================= */

/* 지역 path 기본 스타일 */
.region-path {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    transform-box: fill-box;
}

/* 상단면 - 밝은 지도 (주인공) */
.region-top {
    fill: #a8c8dc;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 0.8;
    transition: all 0.3s ease;
}

.region-top:hover,
.region-top.active {
    fill: #c0dae8;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.2;
}

/* 왼쪽 측면 (3D 두께) */
.region-side-left {
    fill: #7a9eb5;
    stroke: none;
}

/* 앞쪽 측면 (3D 두께) */
.region-side-front {
    fill: #5c8298;
    stroke: none;
}

/* 측면 호버 효과 */
.region-top:hover ~ .region-side-left,
.region-top.active ~ .region-side-left {
    fill: #8fb3c8;
}

.region-top:hover ~ .region-side-front,
.region-top.active ~ .region-side-front {
    fill: #6e96ac;
}


/* =============================================
   📌 5. 지역별 색상 (미묘한 차이로 구분) - 다크 테마
   ============================================= */

.region-group[data-region="서울"] .region-top { fill: #b5d0e2; }
.region-group[data-region="경기"] .region-top { fill: #aecbdd; }
.region-group[data-region="인천"] .region-top { fill: #b2cee0; }
.region-group[data-region="강원"] .region-top { fill: #a8c8dc; }
.region-group[data-region="충북"] .region-top { fill: #accadd; }
.region-group[data-region="충남"] .region-top { fill: #aac9dc; }
.region-group[data-region="세종"] .region-top { fill: #b8d2e4; }
.region-group[data-region="대전"] .region-top { fill: #b5d0e2; }
.region-group[data-region="전북"] .region-top { fill: #a9c8db; }
.region-group[data-region="전남"] .region-top { fill: #a6c6da; }
.region-group[data-region="광주"] .region-top { fill: #b3cfe1; }
.region-group[data-region="경북"] .region-top { fill: #aac9dc; }
.region-group[data-region="대구"] .region-top { fill: #b6d1e3; }
.region-group[data-region="울산"] .region-top { fill: #afcbde; }
.region-group[data-region="경남"] .region-top { fill: #adcadd; }
.region-group[data-region="부산"] .region-top { fill: #b9d3e5; }
.region-group[data-region="제주"] .region-top { fill: #a4c5d9; }


/* =============================================
   📌 6. 지역 호버/활성 효과
   ============================================= */

/* 지역 그룹 */
.region-group {
    cursor: pointer;
    transition: transform 0.4s ease;
}

/* 호버/활성 시 효과 */
.region-group:hover .region-top,
.region-group.active .region-top {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.5;
}

/* 선택된 지역 색상 */
.region-group.active .region-top {
    fill: #d0e8f5 !important;
    stroke: #ffffff;
    stroke-width: 2;
}

.region-group.active .region-side-left {
    fill: #8fb8d0 !important;
}

.region-group.active .region-side-front {
    fill: #70a0b8 !important;
}

/* 측면 트랜지션 */
.region-group .region-side-left,
.region-group .region-side-front,
.region-group .region-top {
    transition: all 0.4s ease;
}

.region-group:hover .region-side-left,
.region-group.active .region-side-left {
    fill: #8fb3c8;
}

.region-group:hover .region-side-front,
.region-group.active .region-side-front {
    fill: #6e96ac;
}

.region-group:hover .region-top,
.region-group.active .region-top {
    fill: #c8e0ef;
}

/* 자동 하이라이트 시 글로우 효과 */
.region-group.auto-highlight .region-top {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}


/* =============================================
   📌 7. 라벨 스타일
   ============================================= */

.region-label {
    font-size: 11px;
    font-weight: 600;
    fill: #2c4a5e;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    paint-order: stroke fill;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.region-group:hover .region-label,
.region-group.active .region-label {
    fill: #1a3040;
    font-size: 12px;
    font-weight: 700;
}

/* 라벨 레이어 - 항상 최상위 */
.labels-layer {
    pointer-events: none;
}

.labels-layer .region-label {
    font-size: 11px;
    font-weight: 600;
    fill: #2c4a5e;
    text-anchor: middle;
    dominant-baseline: middle;
    paint-order: stroke fill;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.4s ease;
    letter-spacing: 0.3px;
}

/* 자동 하이라이트 및 활성 상태 라벨 */
.labels-layer .region-label.highlighted,
.region-group.active + .labels-layer .region-label {
    fill: #0d2030;
    font-size: 13px;
    font-weight: 700;
    stroke: rgba(255, 255, 255, 1);
    stroke-width: 4px;
}


/* =============================================
   8. 왼쪽 정보 패널 섹션 스타일 (둥근 타일)
   ============================================= */

.info-section {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    max-height: calc(100vh - 80px);
    background: rgba(20, 30, 45, 0.75);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
    z-index: 100;
    overflow: hidden;
    /* 접히는 애니메이션 */
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 패널 접힘 상태 */
.info-section.collapsed {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
}

.info-section.collapsed * {
    visibility: hidden;
}

/* 패널 헤더 */
.info-panel-header {
    background: transparent;
    padding: 24px 24px 16px;
    color: white;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-panel-region {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.info-panel-count {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.info-panel-count .count-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #4ecdc4;
}

.info-panel-count .count-label {
    font-size: 12px;
    opacity: 0.6;
    font-weight: 400;
}

/* 패널 바디 (카드 컨테이너) */
.info-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow-y: auto;
    background: transparent;
    max-height: calc(100vh - 180px);
}

/* 개별 카드 */
.info-card {
    background: transparent;
    border-bottom: 1px solid rgba(78, 205, 196, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 카드별 flex 설정 */
.info-card:nth-child(1) { flex: 0 0 auto; }
.info-card:nth-child(2) { flex: 1 1 auto; }
.info-card:nth-child(3) { flex: 1 1 auto; }

.info-card-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(78, 205, 196, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px 6px;
    background: transparent;
    flex-shrink: 0;
}

.info-card-content {
    padding: 8px 16px 14px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 특화분야 태그 */
.info-panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.info-tag {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.info-tag.placeholder {
    background: rgba(78, 205, 196, 0.08);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(78, 205, 196, 0.1);
}

/* 미니맵 */
.info-panel-minimap {
    width: 100%;
    flex: 1;
    min-height: 80px;
    background: rgba(0, 20, 40, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(78, 205, 196, 0.1);
}

.info-panel-minimap svg {
    width: 100%;
    height: 100%;
}

/* 대표 클러스터 목록 */
.info-panel-clusters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.info-cluster-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-cluster-item:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
}

.info-cluster-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.info-cluster-status.operating {
    background: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.5);
}

.info-cluster-status.planned {
    background: #fcc419;
    box-shadow: 0 0 8px rgba(252, 196, 25, 0.5);
}

.info-cluster-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.info-cluster-placeholder {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 16px;
}

/* 스크롤바 */
.info-panel-clusters::-webkit-scrollbar {
    width: 4px;
}

.info-panel-clusters::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.info-panel-clusters::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.3);
    border-radius: 3px;
}


/* =============================================
   9. 오른쪽 리스트 스타일 (둥근 타일)
   ============================================= */

.list-section {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 340px;
    max-height: calc(100vh - 80px);
    background: rgba(20, 30, 45, 0.75);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
    z-index: 100;
    overflow: hidden;
}

.list-header {
    padding: 24px 24px 16px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.list-title {
    font-size: 22px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.3px;
}

.list-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
    font-weight: 400;
}

/* 지역 탭 */
.region-tabs {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border-bottom: 1px solid rgba(78, 205, 196, 0.08);
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(78, 205, 196, 0.4) transparent;
}

.region-tabs::-webkit-scrollbar {
    height: 6px;
}

.region-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.region-tabs::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.4);
    border-radius: 3px;
}

.region-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.6);
}

.region-tab {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.region-tab:hover {
    border-color: rgba(78, 205, 196, 0.4);
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.region-tab.active {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.5);
    color: #4ecdc4;
    font-weight: 600;
}


/* =============================================
   📌 9-0. 전국 지도용 통계 요약 섹션
   ============================================= */

.summary-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.summary-intro {
    padding: 14px 16px;
    background: rgba(78, 205, 196, 0.05);
    margin: 12px;
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.1);
}

.summary-intro-title {
    font-size: 13px;
    font-weight: 600;
    color: #4ecdc4;
    margin-bottom: 8px;
}

.summary-intro-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.summary-stats {
    flex: 1;
    padding: 4px 12px 16px;
    background: transparent;
    overflow-y: auto;
}

.summary-stats-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(78, 205, 196, 0.1);
}

.summary-stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.summary-stat-item:hover {
    border-color: rgba(78, 205, 196, 0.3);
    background: rgba(78, 205, 196, 0.05);
}

.summary-stat-item .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.summary-stat-item .stat-value {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.summary-stat-item .stat-value span {
    color: #4ecdc4;
}

/* 상세 리스트 섹션 */
.detail-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* 클러스터 리스트 */
.cluster-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    background: transparent;
}

.cluster-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cluster-item:hover {
    border-color: rgba(78, 205, 196, 0.4);
    background: rgba(78, 205, 196, 0.08);
}

.cluster-item.highlighted {
    border-color: rgba(78, 205, 196, 0.6);
    background: rgba(78, 205, 196, 0.12);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.15);
}

/* 클러스터 헤더 (이름 + 배지) */
.cluster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.cluster-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    flex: 1;
    line-height: 1.4;
}

.cluster-badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.cluster-location {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 로딩 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #4ecdc4;
    font-size: 16px;
    font-weight: 600;
}

/* 클러스터 리스트 스크롤바 */
.cluster-list::-webkit-scrollbar {
    width: 5px;
}

.cluster-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.cluster-list::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.3);
    border-radius: 3px;
}

.cluster-list::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.5);
}


/* =============================================
   📌 9-1. 기업 리스트 스타일 (클러스터 선택 시)
   ============================================= */

.company-list-header {
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(20, 45, 70, 0.6) 0%, transparent 100%);
    border-bottom: 1px solid rgba(78, 205, 196, 0.1);
}

.company-list-back {
    font-size: 11px;
    color: #4ecdc4;
    cursor: pointer;
    margin-bottom: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.company-list-back:hover {
    color: #6dd5c8;
    transform: translateX(-2px);
}

.company-list-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.company-list-status {
    display: inline-block;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* 클러스터 상세 정보 섹션 */
.cluster-detail-section {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(78, 205, 196, 0.08);
    background: transparent;
}

.cluster-detail-section:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(78, 205, 196, 0.8);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.6;
}

.detail-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-tag {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* 클러스터 태그 */
.cluster-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.cluster-tag {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.company-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    margin: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.company-item:hover {
    background: rgba(78, 205, 196, 0.08);
    border-color: rgba(78, 205, 196, 0.3);
}

.company-icon {
    width: 32px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.company-info {
    flex: 1;
    min-width: 0;
}

.company-name {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-type {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.company-empty {
    padding: 24px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}


/* =============================================
   📌 10. 반응형 스타일
   ============================================= */

/* 태블릿 (1200px 이하) */
@media (max-width: 1200px) {
    .list-section {
        width: 280px;
        right: 20px;
    }

    .info-section {
        width: 260px;
        left: 20px;
    }

    .map-section {
        padding: 10px;
    }

    .back-button {
        left: 290px;
    }
}

/* 작은 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .list-section {
        width: 260px;
        right: 16px;
    }

    .info-section {
        width: 240px;
        left: 16px;
    }

    .back-button {
        left: 260px;
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .container {
        flex-direction: column;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: relative;
        margin: 0;
        padding: 0;
    }

    /* 지도 영역 - 화면 상단 고정 */
    .map-section {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 58%;
        margin: 0;
        padding: 5px 5px 10px 5px;
        z-index: 1;
        overflow: visible;
    }

    .map-container {
        width: 100%;
        height: 100%;
        overflow: visible;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 0;
        margin: 0;
    }

    .map-wrapper {
        width: 100%;
        height: 100%;
        overflow: visible;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    #map-svg {
        width: auto !important;
        height: auto !important;
        max-width: 100%;
        max-height: 100%;
        overflow: visible;
    }

    /* 정보 패널 숨김 */
    .info-section {
        display: none !important;
    }

    /* 리스트 패널 - 화면 하단 고정, 좌우 꽉 참 */
    .list-section {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100% !important;
        height: 42%;
        max-height: none;
        margin: 0;
        border-radius: 20px 20px 0 0;
        z-index: 200;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: none;
        background: rgba(20, 30, 45, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .header {
        top: 5px;
    }

    .header h1 {
        font-size: 14px;
        padding: 6px 12px;
    }

    /* 드래그 핸들 */
    .list-header {
        padding: 18px 16px 12px;
        position: relative;
        width: 100%;
    }

    .list-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .list-title {
        font-size: 16px;
    }

    .list-subtitle {
        font-size: 11px;
    }

    /* 지역 탭 가로 스크롤 */
    .region-tabs {
        display: flex;
        flex-wrap: nowrap;
        padding: 8px 12px;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .region-tabs::-webkit-scrollbar {
        display: none;
    }

    .region-tab {
        padding: 7px 12px;
        font-size: 11px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 요약 섹션 */
    .summary-section {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .summary-intro {
        margin: 8px 12px;
        padding: 12px 14px;
    }

    .summary-intro-title {
        font-size: 12px;
    }

    .summary-intro-desc {
        font-size: 10px;
        line-height: 1.5;
    }

    .summary-stats {
        padding: 4px 12px 16px;
    }

    .summary-stats-title {
        font-size: 9px;
        margin-bottom: 8px;
    }

    .summary-stat-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .summary-stat-item .stat-label {
        font-size: 11px;
    }

    .summary-stat-item .stat-value {
        font-size: 13px;
    }

    /* 클러스터 리스트 */
    .detail-list-section {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .cluster-list {
        flex: 1;
        padding: 8px 12px 20px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .cluster-item {
        padding: 12px 14px;
        margin-bottom: 8px;
    }

    .cluster-header {
        flex-wrap: nowrap;
    }

    .cluster-name {
        font-size: 13px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cluster-badge {
        font-size: 9px;
        padding: 2px 6px;
        flex-shrink: 0;
    }

    .cluster-tags {
        display: flex;
        gap: 4px;
        margin-top: 6px;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }

    .cluster-tag {
        font-size: 9px;
        padding: 2px 5px;
    }

    .cluster-location {
        font-size: 10px;
        margin-top: 4px;
        padding-top: 6px;
    }

    /* 뒤로가기 버튼 */
    .back-button {
        top: 12px;
        left: 12px;
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 10px;
    }

    /* 클러스터 상세 */
    .company-list-header {
        padding: 12px 14px;
    }

    .company-list-back {
        font-size: 10px;
    }

    .company-list-title {
        font-size: 14px;
    }

    .cluster-detail-section {
        padding: 10px 14px;
    }

    .detail-label {
        font-size: 9px;
    }

    .detail-value {
        font-size: 12px;
    }

    .detail-description {
        font-size: 11px;
    }

    .detail-tags {
        gap: 4px;
    }

    .detail-tag {
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    .map-section {
        height: 56%;
        padding: 3px 3px 6px 3px;
    }

    .list-section {
        height: 44%;
        width: 100% !important;
    }

    .header h1 {
        font-size: 12px;
        padding: 5px 10px;
    }

    .list-header {
        padding: 16px 12px 10px;
        width: 100%;
    }

    .list-title {
        font-size: 15px;
    }

    .region-tabs {
        gap: 5px;
        padding: 6px 8px;
        width: 100%;
    }

    .region-tab {
        padding: 6px 10px;
        font-size: 10px;
    }

    .summary-intro {
        margin: 6px 8px;
        padding: 10px 12px;
    }

    .summary-stats {
        padding: 2px 8px 12px;
    }

    .summary-stat-item {
        padding: 8px 10px;
    }

    .cluster-list {
        padding: 6px 10px 16px;
    }

    .cluster-item {
        padding: 10px 12px;
    }

    .cluster-name {
        font-size: 12px;
    }

    .cluster-location {
        font-size: 9px;
    }

    .back-button {
        top: 8px;
        left: 8px;
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* 가로 모드 모바일 */
@media (max-width: 900px) and (orientation: landscape) {
    .container {
        flex-direction: row;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        padding: 0;
    }

    .map-section {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 55%;
        height: 100%;
        padding: 5px;
        margin: 0;
    }

    .list-section {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        left: auto;
        width: 45% !important;
        height: 100% !important;
        max-height: none;
        margin: 0;
        border-radius: 20px 0 0 20px;
        transform: none;
    }

    .list-header::before {
        display: none;
    }

    .summary-section {
        max-height: calc(100% - 120px);
    }

    .cluster-list {
        max-height: calc(100% - 120px);
    }

    .back-button {
        top: 10px;
        left: 10px;
    }
}


/* =============================================
   11. 뒤로가기 버튼 스타일
   ============================================= */

.back-button {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 300;
    background: rgba(20, 30, 45, 0.75);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: rgba(30, 45, 65, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.35),
        0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
}

.back-button:active {
    transform: translateY(0);
}


/* =============================================
   12. 기업 마커 스타일
   ============================================= */

.company-marker {
    transition: all 0.2s ease;
}

.company-marker:hover {
    transform: scale(1.1);
}

.company-tooltip {
    pointer-events: none;
}


/* =============================================
   13. 줌인 뷰 스타일
   ============================================= */

.detail-view-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    z-index: 200;
    background: rgba(8, 25, 45, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 150, 200, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.legend {
    pointer-events: none;
}

