/* style.css 파일 전체 내용 */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');

/* [신규] 톤다운된 배경이 항상 꽉 차도록 설정 */
html, body {
    width: 100%;
    min-height: 100%;
    background-color: #f0f9ff; /* Very light blue background */
    font-family: "Pretendard Variable", sans-serif;
}

/* 1. SVG 지도 path에 모던한 인터랙션 효과 추가 */
path[style*="fill:#fefeea"] {
    fill: #dbeafe; /* Light blue fill */
    stroke: #bfdbfe; /* Darker blue stroke */
    stroke-width: 0.8px; 
    cursor: pointer; 
    transition: all 0.2s ease-out; 
    transform-origin: center center; 
}

path[style*="fill:#fefeea"]:hover {
    fill: #60a5fa; /* Bright blue on hover */
    stroke: #3b82f6; /* Darker blue stroke on hover */
    transform: translateY(-3px) scale(1.01); 
    filter: drop-shadow(0 6px 6px rgba(0,0,0,0.25)); 
    z-index: 10; 
    position: relative; 
}

path[style*="fill:#fefeea"]:active {
    transform: translateY(0px) scale(1); 
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2)); 
}

/* 2. 클릭 불가능한 '선' 조각 (fill:none) */
path[style*="fill:none"] {
    pointer-events: none; 
    stroke: #a0a0a0; 
    stroke-width: 0.5px;
}

/* 3. 모달 팝업이 부드럽게 나타나는 애니메이션 */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.modal-content {
    animation: zoomIn 0.2s ease-out;
}

/* 4. 지도에 표시되는 텍스트 (지역 이름) 스타일 */
.map-label {
    font-family: "Pretendard Variable", sans-serif;
    font-size: 10px;
    font-weight: 900;
    fill: #6b7280; 
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none; 
    transition: fill 0.2s ease-out; 
}

.map-label.hovered-label {
    fill: #2563eb; 
}

/* 5. [신규] 페이지 타이틀 스타일 */

/* 타이틀을 감싸는 헤더 박스 (둥글둥글 + 입체 표현) */
main > header {
    margin: 1rem; /* 16px (카드 안쪽으로 여백) */
    border-radius: 20px; /* 둥글둥글하게 */
    background-color: #eef2ff; /* Light Indigo background */
    box-shadow: 
        5px 5px 10px #dbeafe,  /* Soft blue shadow */
        -5px -5px 10px #ffffff; /* Soft white highlight */
}

/* 실제 타이틀 텍스트 스타일 */
.page-title {
    font-family: "Pretendard Variable", sans-serif;
    font-size: 2.25rem; /* 36px */
    font-weight: 900; 
    text-align: center;
    color: #2563eb; /* Default color for emojis and fallback */
}

.page-title span {
    background: linear-gradient(to right, #4f46e5, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 6. [신규] 카테고리 버튼 스타일 */
.category-button {
    background-color: #ffffff;
    padding: 1.5rem; /* 24px */
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb; /* gray-200 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease-out;
    transform: scale(1);
}

.category-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.category-button:active {
    transform: scale(0.95);
}

/* 7. [신규] 뒤로가기 버튼 스타일 */
.back-button {
    margin-top: 1.5rem; /* 24px */
    background-color: #e0e7ff; /* indigo-100 */
    color: #3730a3; /* indigo-800 */
    font-weight: bold;
    padding: 0.5rem 1.25rem; /* py-2 px-5 */
    border-radius: 9999px; /* rounded-full */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* gap-2 */
    transition: all 0.2s ease-out;
}

.back-button:hover {
    background-color: #c7d2fe; /* indigo-200 */
}


/* --- 미디어 쿼리: 모바일 최적화 (768px 이하 화면) --- */
@media (max-width: 768px) {
    /* body: 콘텐츠를 위로 정렬하여 공간을 더 확보 */
    body {
        align-items: flex-start;
    }

    /* 메인 콘텐츠 영역: 모바일에서 전체 너비 사용 */
    main {
        max-width: 100%;
        margin-left: 0; /* Tailwind의 mx-auto를 무시할 수 있도록 */
        margin-right: 0;
        border-radius: 0; /* 모바일에서 둥근 모서리 제거 (선택 사항) */
        box-shadow: none; /* 모바일에서 그림자 제거 (선택 사항) */
    }
    
    /* 페이지 타이틀: 모바일에서 글꼴 크기 축소 */
    .page-title {
        font-size: 1.75rem; /* 예: 28px */
    }

    /* 지도 컨테이너: 모바일에서 최소 높이 확보 */
    #map-container {
        min-height: 50vh; /* 뷰포트 높이의 50% */
        padding: 0.5rem; /* 컨테이너 패딩 줄이기 */
    }

    /* SVG 지도 자체: 컨테이너에 맞게 반응형으로 조정 */
    #map-container svg {
        width: 100%;
        height: auto;
    }
}