/* ===================================
   백패킹 날씨 체크 - 모바일 우선 디자인
   =================================== */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --success: #34a853;
    --warning: #f9ab00;
    --danger: #ea4335;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #dadce0;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    height: 100%;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100%;
    overflow-x: hidden;
}

/* 앱 레이아웃 */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
}

/* 헤더 */
.app-header {
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 9999;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

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

.header-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

.header-title i {
    font-size: 16px;
}

/* 짧은 타이틀 숨김, 전체 타이틀 표시 */
.header-title .title-short {
    display: none;
}

.header-title .title-full {
    display: inline;
}

/* 헤더 타이틀 래퍼 */
.header-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* URL 표시 */
.header-url {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 홈 화면 추가 버튼 */
.add-to-home-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.add-to-home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.add-to-home-btn:active {
    transform: scale(0.95);
}

.add-to-home-btn i {
    font-size: 14px;
}

.add-to-home-btn.installable {
    color: #ffd700;
    animation: pulse-star 1.5s ease-in-out infinite;
}

@keyframes pulse-star {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.add-to-home-btn.installed {
    color: #ffd700;
    animation: none;
}

/* 헤더 버튼 그룹 */
.header-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 언어 전환 버튼 */
.lang-switch-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: white;
    line-height: 1;
}

.lang-switch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.lang-switch-btn:active {
    transform: scale(0.95);
}

/* 즐겨찾기 안내 툴팁 */
.add-to-home-tooltip {
    position: fixed;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.add-to-home-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.add-to-home-tooltip.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.add-to-home-tooltip .tooltip-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 240px;
    animation: tooltip-pulse 2s ease-in-out infinite;
}

@keyframes tooltip-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(102, 126, 234, 0.7); }
}

.add-to-home-tooltip .tooltip-icon {
    font-size: 24px;
    animation: tooltip-star 1s ease-in-out infinite;
}

@keyframes tooltip-star {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.add-to-home-tooltip .tooltip-text {
    font-size: 13px;
    line-height: 1.4;
    flex: 1;
}

.add-to-home-tooltip .tooltip-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.add-to-home-tooltip .tooltip-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.add-to-home-tooltip .tooltip-arrow {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #667eea;
}

/* 태블릿 이상: 폰트 크기 증가 */
@media (min-width: 600px) {
    .header-title {
        font-size: 16px;
    }
    
    .header-title i {
        font-size: 18px;
    }
    
    .add-to-home-btn {
        width: 36px;
        height: 36px;
    }
    
    .add-to-home-btn i {
        font-size: 16px;
    }
}

.header-search {
    position: relative;
    width: 100%;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    z-index: 1;
}

.search-input-wrap input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 10px 50px 10px 36px;
    border: none;
    border-radius: 24px;
    font-size: 13px;
    background: white;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: #9aa0a6;
    font-size: 12px;
}

/* 태블릿 이상에서 검색창 폰트 크기 */
@media (min-width: 600px) {
    .search-input-wrap input {
        font-size: 14px;
    }
    
    .search-input-wrap input::placeholder {
        font-size: 14px;
    }
}

/* 현재 위치 버튼 */
.current-location-btn {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.current-location-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.current-location-btn:active {
    transform: scale(0.95);
}

.current-location-btn i {
    position: static;
    color: white;
    font-size: 14px;
}

.current-location-btn.loading {
    pointer-events: none;
}

.current-location-btn.loading i {
    animation: spin 1s linear infinite;
}

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

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    margin-top: 4px;
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text);
}

.suggestion-item:hover, .suggestion-item:active {
    background: var(--bg);
}

.suggestion-item i {
    color: var(--primary);
    position: static;
}

/* 검색 기록 스타일 */
.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.search-history-header i {
    margin-right: 6px;
}

.clear-history-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.clear-history-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--danger);
}

.history-item {
    position: relative;
}

.history-item i.fa-clock {
    color: var(--text-secondary);
}

.remove-history-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .remove-history-btn {
    opacity: 1;
}

.remove-history-btn:hover {
    background: rgba(234, 67, 53, 0.1);
    color: var(--danger);
}

/* 메인 영역 */
.app-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* 지도 섹션 */
.map-section {
    position: relative;
    height: 35vh;
    min-height: 200px;
    max-height: 300px;
}

.map-container {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    transition: opacity 0.3s;
}

.map-overlay.hidden {
    opacity: 0;
}

.selected-location {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 500;
    display: none;
}

.selected-location.show {
    display: block;
}

/* 클릭 마커 */
.clicked-marker { z-index: 1000 !important; }

.clicked-pin {
    width: 32px;
    height: 32px;
    background: var(--danger);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: dropIn 0.3s ease;
}

.clicked-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 14px;
}

@keyframes dropIn {
    from { transform: rotate(-45deg) scale(0); }
    to { transform: rotate(-45deg) scale(1); }
}

/* 현재 위치 마커 */
.current-location-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-location-marker i {
    font-size: 30px;
    color: #ef4444;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 광고 배너 (롤링 슬라이더) */
.banner-section {
    padding: 8px 12px;
    display: none;
}

.banner-slider {
    position: relative;
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    background: #f8fafc;
}

.banner-viewport {
    overflow: hidden;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.banner-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

.banner-slide a {
    display: block;
    width: 100%;
    cursor: pointer;
}

/* 링크 없는 배너 이미지 - 클릭 동작 없음 */
.banner-slide .banner-image-only {
    display: block;
    width: 100%;
    cursor: default;
}

/* 배너 이미지 - 비율 유지하며 전체 표시 */
.banner-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    background: #f8fafc;
}

/* 배너 인디케이터 (점) - 배너 하단 외부 */
.banner-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    background: #f1f5f9;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.banner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.banner-indicator:hover {
    background: #94a3b8;
}

.banner-indicator.active {
    background: var(--primary);
    width: 20px;
    border-radius: 4px;
}

/* GIF 배너 표시 */
.banner-slide.gif-banner img {
    object-fit: contain;
}

@media (max-width: 480px) {
    .banner-slide img {
        max-height: 150px;
    }
}

/* 로딩 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    animation: fadeIn 0.2s ease-out;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 날씨 섹션 */
.weather-section {
    padding: 12px;
}

.weather-section.hidden {
    display: none;
}

/* 현재 날씨 타이틀 */
.current-weather-title {
    margin-bottom: 8px;
}

.current-weather-title h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    margin: 0;
}

.current-weather-title h3 i {
    color: var(--primary);
    font-size: 14px;
}

/* 현재 날씨 카드 (컴팩트 버전) */
.current-weather-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.current-weather-card.compact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px;
}

.cw-compact-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* 왼쪽 영역: 위치 + 온도 */
.cw-left {
    flex: 1;
    min-width: 0;
}

.cw-location-compact h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cw-datetime {
    display: inline-block;
    font-size: 11px;
    opacity: 0.9;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.cw-temp-compact {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cw-temp-compact img {
    width: 40px;
    height: 40px;
}

.cw-temp {
    display: flex;
    align-items: flex-start;
}

.temp-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.temp-unit {
    font-size: 14px;
    font-weight: 500;
    margin-top: 2px;
}

.cw-temp-extra {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 4px;
}

.cw-desc-compact {
    font-size: 11px;
    opacity: 0.95;
}

.cw-range-compact {
    display: flex;
    gap: 8px;
    font-size: 11px;
}

.cw-range-compact .temp-high { color: #ffcdd2; }
.cw-range-compact .temp-low { color: #b3e5fc; }

/* 오른쪽 영역: 상세 정보 2x2 그리드 */
.cw-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    flex-shrink: 0;
}

.cw-detail-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 52px;
}

.cw-detail-compact i {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.cw-detail-compact span {
    font-size: 11px;
    font-weight: 600;
}

.cw-detail-compact small {
    font-size: 8px;
    opacity: 0.8;
    text-align: center;
    line-height: 1.2;
}

/* 기존 스타일 유지 (하위 호환) */
.cw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.cw-location h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 1px;
}

.cw-location span {
    font-size: 10px;
    opacity: 0.9;
}

.cw-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.cw-main {
    padding: 12px;
    text-align: center;
}

.cw-temp-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 2px;
}

.cw-temp-wrap img {
    width: 48px;
    height: 48px;
}

.cw-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cw-range {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
}

.temp-high { color: var(--danger); }
.temp-low { color: var(--primary); }

.cw-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
    padding: 10px 6px;
    gap: 2px;
}

.cw-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.cw-detail i {
    font-size: 14px;
    color: var(--primary);
}

.cw-detail span {
    font-size: 12px;
    font-weight: 600;
}

.cw-detail small {
    font-size: 9px;
    color: var(--text-secondary);
}

/* 7일 예보 */
.forecast-section {
    margin-top: 12px;
}

.forecast-section h3 {
    font-size: 14px;
    font-weight: 600;
    padding: 0 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.forecast-section h3 i {
    color: var(--primary);
}

.forecast-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.forecast-scroll::-webkit-scrollbar {
    display: none;
}

.forecast-card {
    flex-shrink: 0;
    width: 72px;
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.forecast-card:active {
    transform: scale(0.95);
}

.forecast-card.today {
    border-color: var(--primary);
}

.forecast-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.forecast-card.today .forecast-date {
    color: var(--primary);
}

.forecast-icon img {
    width: 36px;
    height: 36px;
}

.forecast-temp {
    font-size: 13px;
    margin: 4px 0;
}

.forecast-temp .temp-high {
    font-weight: 700;
}

.forecast-temp .temp-low {
    color: var(--text-secondary);
    margin-left: 4px;
}

.forecast-rain {
    font-size: 10px;
    color: var(--primary);
}

/* 비/눈 예보 카드 강조 */
.forecast-card.rainy {
    background: linear-gradient(180deg, #e3f2fd 0%, #fff 50%);
    border: 1px solid #90caf9;
}

.forecast-card.snowy {
    background: linear-gradient(180deg, #e8eaf6 0%, #fff 50%);
    border: 1px solid #9fa8da;
}

.forecast-card.rainy .forecast-date,
.forecast-card.snowy .forecast-date {
    font-weight: 700;
}

/* 강수량/적설량 표시 */
.forecast-precip {
    font-size: 10px;
    color: #1976d2;
    font-weight: 600;
    background: rgba(25, 118, 210, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.forecast-snow {
    font-size: 10px;
    color: #5c6bc0;
    font-weight: 600;
    background: rgba(92, 107, 192, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.forecast-precip i {
    color: #1976d2;
}

.forecast-snow i {
    color: #5c6bc0;
}

/* 예보 카드 상세 */
.forecast-desc {
    display: none;
}

.forecast-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--text-muted);
    margin: 4px 0;
}

.forecast-wind, .forecast-gust, .forecast-rain, .forecast-precip, .forecast-snow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.forecast-wind i, .forecast-gust i, .forecast-rain i, .forecast-precip i, .forecast-snow i {
    font-size: 9px;
}

.wind-dir {
    font-weight: 700;
    font-size: 12px;
}

.gust-time {
    font-size: 9px;
    color: var(--text-light);
}

.forecast-wind-dir {
    font-size: 10px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 2px;
}

.forecast-click-hint {
    display: none;
}

/* 날씨 분석 및 해석 */
.weather-analysis-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 12px;
    box-shadow: var(--shadow);
    display: none;
}

.weather-analysis-section.visible {
    display: block;
}

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

/* 날씨 분석 네비게이션 컨트롤 */
.wa-nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wa-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.wa-nav-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.wa-nav-btn:active {
    transform: scale(0.95);
}

.wa-nav-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.wa-swipe-hint {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
}

.wa-swipe-hint i {
    font-size: 12px;
}

/* 날씨 분석 콘텐츠 래퍼 (애니메이션용) */
.wa-content-wrapper {
    overflow: hidden;
    position: relative;
}

.weather-analysis-grid {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.weather-analysis-grid.slide-left {
    animation: slideLeft 0.3s ease;
}

.weather-analysis-grid.slide-right {
    animation: slideRight 0.3s ease;
}

@keyframes slideLeft {
    0% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-30px); opacity: 0.5; }
    51% { transform: translateX(30px); opacity: 0.5; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
    0% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(30px); opacity: 0.5; }
    51% { transform: translateX(-30px); opacity: 0.5; }
    100% { transform: translateX(0); opacity: 1; }
}

.weather-analysis-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.weather-analysis-section h3 i {
    color: var(--primary);
}

/* 날씨 분석 날짜 배지 (제목 옆) */
.wa-date-badge {
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.wa-date-badge.future {
    background: #6366f1;
}

.weather-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: stretch;
}

.weather-analysis-grid > .wa-item {
    min-width: 0;
    width: 100%;
}

.wa-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    box-sizing: border-box;
    overflow: hidden;
}

.wa-item.wa-item-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-item.wa-item-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wa-item.wa-item-clickable:active {
    transform: translateY(0);
}

.wa-item.warning {
    border-left-color: var(--warning);
    background: #fffbeb;
}

.wa-item.danger {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.wa-item.good {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.wa-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.wa-icon i {
    font-size: 14px;
    color: var(--primary);
}

.wa-item.warning .wa-icon {
    background: #fef3c7;
}

.wa-item.warning .wa-icon i {
    color: var(--warning);
}

.wa-item.danger .wa-icon {
    background: #fee2e2;
}

.wa-item.danger .wa-icon i {
    color: var(--danger);
}

.wa-item.good .wa-icon {
    background: #dcfce7;
}

.wa-item.good .wa-icon i {
    color: var(--success);
}

.wa-content {
    flex: 1;
    min-width: 0;
}

.wa-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.wa-sub-label {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.8;
    margin-bottom: 2px;
}

.wa-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.wa-sub-info {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.wa-sub-info .time-info {
    color: var(--primary);
    font-weight: 500;
}

/* 일출/일몰 섹션 스타일 */
.wa-sun-value {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sunrise-time, .sunset-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 600;
}

.sunrise-time i {
    color: #f59e0b;
    font-size: 12px;
}

.sunset-time i {
    color: #6366f1;
    font-size: 12px;
}

#wa-sun .wa-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.wa-item.wa-full {
    grid-column: 1 / -1;
}

.wa-note {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.4;
}

.wa-item.warning .wa-note {
    color: #b45309;
}

.wa-item.danger .wa-note {
    color: var(--danger);
}

/* 비/눈 날씨 분석 스타일 */
.wa-item.rain {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    border: 1px solid #90caf9;
}

.wa-item.rain .wa-icon {
    background: rgba(25, 118, 210, 0.15);
}

.wa-item.rain .wa-icon i {
    color: #1976d2;
}

.wa-item.snow {
    background: linear-gradient(135deg, #e8eaf6 0%, #f5f5f5 100%);
    border: 1px solid #9fa8da;
}

.wa-item.snow .wa-icon {
    background: rgba(92, 107, 192, 0.15);
}

.wa-item.snow .wa-icon i {
    color: #5c6bc0;
}

.wa-item.warning.rain .wa-note {
    color: #1565c0;
}

.wa-item.danger.rain .wa-note {
    color: #0d47a1;
}

.wa-item.warning.snow .wa-note {
    color: #3949ab;
}

.wa-item.danger.snow .wa-note {
    color: #283593;
}

/* 미세먼지 정보 */
.wa-air-quality {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
}

.wa-aq-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.wa-aq-header i {
    color: #64748b;
    font-size: 14px;
}

.wa-aq-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.wa-aq-items {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
}

.wa-aq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.wa-aq-divider {
    width: 1px;
    height: 32px;
    background: #e2e8f0;
}

.wa-aq-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.wa-aq-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.wa-aq-unit {
    font-size: 10px;
    color: #94a3b8;
}

.wa-aq-grade {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #64748b;
}

.wa-aq-grade.good {
    background: #dbeafe;
    color: #1d4ed8;
}

.wa-aq-grade.moderate {
    background: #dcfce7;
    color: #15803d;
}

.wa-aq-grade.unhealthy {
    background: #ffedd5;
    color: #c2410c;
}

.wa-aq-grade.very-unhealthy {
    background: #fee2e2;
    color: #dc2626;
}

.wa-aq-note {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

.wa-aq-note.warning {
    color: #c2410c;
    font-weight: 500;
}

.wa-aq-note:empty {
    display: none;
}

.wa-aq-source {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
}

.wa-aq-source i {
    margin-right: 4px;
}

/* 주의사항 요약 */
.wa-warnings {
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-sm);
    display: none;
}

.wa-warnings.visible {
    display: block;
}

.wa-warnings-title {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wa-warnings-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wa-warnings-list li {
    font-size: 11px;
    color: #78350f;
    padding-left: 16px;
    position: relative;
    line-height: 1.4;
}

.wa-warnings-list li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
    font-size: 10px;
}

@media (max-width: 400px) {
    .weather-analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* 날씨 분석 참고 안내 문구 */
.wa-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--text-secondary);
}

.wa-disclaimer i {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.wa-disclaimer span {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 3시간 단위 예보 버튼 */
.wa-hourly-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.wa-hourly-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.wa-hourly-btn:active {
    transform: translateY(0);
}

.wa-hourly-btn i {
    font-size: 14px;
}

/* 선택된 예보 카드 */
.forecast-card.selected {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
    transform: scale(1.02);
}

/* 위치 권한 안내 모달 */
.location-permission-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.location-permission-modal.show {
    display: flex;
}

.permission-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.permission-modal-header {
    background: linear-gradient(135deg, var(--primary), #4a90d9);
    color: white;
    padding: 24px;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.permission-modal-header i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.permission-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.permission-modal-body {
    padding: 20px 24px;
}

.permission-modal-body > p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.permission-instructions {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.permission-instructions h4 {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-instructions h4:not(:first-child) {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.permission-instructions ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.permission-instructions ol li {
    margin-bottom: 4px;
}

.permission-instructions strong {
    color: var(--text);
    background: #e8f0fe;
    padding: 1px 5px;
    border-radius: 4px;
}

.permission-tip {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: #2e7d32;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.permission-tip i {
    font-size: 18px;
    color: #43a047;
}

.permission-denied-notice {
    text-align: center;
    padding: 20px;
    background: #fff3e0;
    border-radius: 12px;
    margin-bottom: 16px;
}

.permission-denied-notice i {
    font-size: 40px;
    color: #f57c00;
    margin-bottom: 12px;
}

.permission-denied-notice p {
    margin: 8px 0;
    color: #e65100;
}

.permission-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
    justify-content: center;
}

.permission-btn-retry,
.permission-btn-refresh,
.permission-btn-close {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}

.permission-btn-retry {
    background: linear-gradient(135deg, var(--success), #2e7d32);
    color: white;
}

.permission-btn-retry:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.permission-btn-refresh {
    background: var(--primary);
    color: white;
}

.permission-btn-refresh:hover {
    background: var(--primary-dark);
}

.permission-btn-close {
    background: #f1f3f4;
    color: var(--text-secondary);
}

.permission-btn-close:hover {
    background: #e8eaed;
    color: var(--text);
}

/* 실시간 현장 피드백 섹션 */
.feedback-section {
    margin-top: 16px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    /* 롤링 시 크기 변동 방지 */
    min-height: 480px;
}

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

.feedback-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-header h3 i {
    color: var(--primary);
}

.feedback-date {
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.feedback-notice {
    font-size: 10px;
    color: var(--text-secondary);
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 12px;
}

.feedback-guide {
    font-size: 11px;
    color: #b45309;
    background: #fef3c7;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 8px 0 12px 0;
    line-height: 1.5;
    border-left: 3px solid #f59e0b;
}

.feedback-example {
    color: var(--text-secondary);
    font-style: italic;
    display: block;
    margin-top: 4px;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.feedback-input-row {
    display: flex;
    gap: 8px;
}

.feedback-input-wrap {
    flex: 1;
    position: relative;
}

.feedback-input-wrap input {
    width: 100%;
    padding: 10px 12px;
    padding-right: 50px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-input-wrap input::placeholder {
    font-size: 11px;
    color: var(--text-secondary);
}

.feedback-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.feedback-char-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-secondary);
}

.feedback-submit-btn {
    padding: 10px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.feedback-submit-btn:hover {
    background: var(--primary-dark);
}

.feedback-submit-btn:active {
    transform: scale(0.98);
}

.feedback-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* 위치 등록 행 */
.feedback-location-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.feedback-location-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.feedback-location-btn:hover {
    background: #e5e7eb;
    border-color: var(--primary);
}

.feedback-location-btn.active {
    background: #dcfce7;
    border-color: var(--success);
    color: #166534;
}

.feedback-location-btn.active i {
    color: var(--success);
}

.feedback-location-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.feedback-location-status {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.feedback-location-status.registered {
    color: var(--success);
}

.feedback-location-status.registered i {
    color: var(--success);
}

/* 피드백 목록 - 세로 롤링 */
.feedback-list {
    position: relative;
    overflow: hidden;
    /* 3개 아이템 고정 높이 (85px * 3 + 간격) */
    min-height: 279px;
}

/* 롤링 모드 (기본) */
.feedback-list-inner {
    display: flex;
    flex-direction: column;
}

/* 롤링 컨테이너 */
.feedback-list-inner.rolling {
    position: relative;
}

/* 롤링 애니메이션 키프레임 - 아래에서 위로 슬라이드 (새 아이템이 아래서 들어옴) */
@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 확장 모드 */
.feedback-list.expanded {
    max-height: 400px;
    overflow-y: auto;
}

.feedback-list.expanded .feedback-list-inner {
    transition: none;
}

.feedback-list.expanded .feedback-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.feedback-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-secondary);
}

.feedback-empty i {
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.feedback-empty p {
    font-size: 12px;
    line-height: 1.6;
}

/* 피드백 아이템 기본 스타일 */
.feedback-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border-left: 3px solid var(--primary);
    flex-shrink: 0;
    /* 고정 높이로 롤링 시 화면 틀어짐 방지 */
    min-height: 85px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* 부드러운 전환 효과 */
    opacity: 1;
    transform: translateY(0);
}

.feedback-item:last-child {
    margin-bottom: 0;
}

/* 롤링 애니메이션 - 새 아이템이 아래에서 슬라이드 */
.feedback-item.slide-in-bottom {
    animation: slideInFromBottom 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 피드백 푸터 (더보기/닫기 버튼) */
.feedback-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.feedback-count {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.feedback-count i {
    color: var(--primary);
}

.feedback-expand-btn {
    padding: 6px 12px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 16px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.feedback-expand-btn:hover {
    background: var(--primary);
    color: white;
}

.feedback-expand-btn i {
    font-size: 10px;
    transition: transform 0.2s;
}

.feedback-expand-btn.expanded i {
    transform: rotate(180deg);
}

.feedback-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.feedback-location {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.feedback-location i {
    color: var(--primary);
    font-size: 10px;
}

.feedback-time {
    font-size: 10px;
    color: var(--text-secondary);
}

.feedback-message {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
    flex: 1;
}

/* 피드백 아이템 푸터 (위치보기 버튼) */
.feedback-item-footer {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    min-height: 24px; /* 버튼이 없어도 공간 유지 */
}

.feedback-view-location-btn {
    padding: 4px 10px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.feedback-view-location-btn:hover {
    background: var(--primary);
    color: white;
}

.feedback-view-location-btn i {
    font-size: 10px;
}

/* 피드백 로딩 */
.feedback-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.feedback-loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* 주의/추천 */
.tips-section {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.tips-recommendations {
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--success);
}

.tips-recommendations.hidden {
    display: none;
}

.tips-section h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tips-recommendations h4 { color: var(--success); }

.tips-section ul {
    list-style: none;
}

.tips-section li {
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tips-section li:last-child {
    border-bottom: none;
}

.tips-section li i {
    margin-top: 2px;
    font-size: 10px;
}

.tips-recommendations li i { color: var(--success); }

/* 푸터 */
.app-footer {
    padding: 10px 8px;
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.app-footer a:hover {
    text-decoration: underline;
}

.footer-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 12px;
}

.footer-stats {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.footer-stats i {
    color: var(--primary);
}

.footer-stats span {
    font-weight: 600;
    color: var(--text);
}

.footer-version {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.footer-api {
    font-size: 9px;
    color: var(--text-light);
}

/* iOS 홈 화면 추가 모달 */
.ios-install-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ios-install-modal.show {
    display: flex;
}

.ios-install-content {
    background: white;
    border-radius: 16px;
    max-width: 320px;
    width: 100%;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

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

.ios-install-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ios-install-header i {
    font-size: 20px;
}

.ios-install-header h3 {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.ios-install-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-install-body {
    padding: 20px 16px;
}

.ios-install-body > p {
    text-align: center;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.ios-install-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ios-step span:last-child {
    font-size: 13px;
    color: var(--text);
}

.ios-step i {
    color: var(--primary);
}

.ios-install-footer {
    padding: 12px 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
}

.ios-dont-show {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.ios-dont-show input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ios-install-confirm {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ios-install-confirm:hover {
    background: var(--primary-dark);
}

/* Leaflet 팝업 */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm);
}

.leaflet-popup-content {
    margin: 8px 12px;
    font-size: 13px;
}

.marker-popup {
    text-align: center;
}

.marker-popup strong {
    display: block;
    margin-bottom: 4px;
}

.marker-popup p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 3시간 예보 모달 */
.hourly-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.hourly-modal.show {
    opacity: 1;
    visibility: visible;
}

.hourly-modal-content {
    background: var(--card);
    width: 100%;
    max-height: 70vh;
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.hourly-modal.show .hourly-modal-content {
    transform: translateY(0);
}

.hourly-modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* 날짜 네비게이션 */
.hourly-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hourly-date-display {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.hourly-date-display i {
    font-size: 14px;
}

.hourly-nav-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.2s ease;
}

.hourly-nav-btn:hover:not(.disabled) {
    background: var(--primary);
    color: white;
}

.hourly-nav-btn:active:not(.disabled) {
    transform: scale(0.95);
}

.hourly-nav-btn.disabled {
    border-color: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.hourly-modal-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hourly-modal-header h3 i {
    color: var(--primary);
}

.hourly-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.hourly-subtitle .swipe-hint {
    display: inline-block;
    color: var(--text-light);
    font-size: 10px;
    margin-left: 8px;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hourly-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.hourly-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

/* 3시간 예보 슬라이드 애니메이션 */
.hourly-grid.slide-out-left {
    transform: translateX(-30px);
    opacity: 0;
}

.hourly-grid.slide-out-right {
    transform: translateX(30px);
    opacity: 0;
}

.hourly-grid.slide-in-left {
    animation: slideInFromLeft 0.3s ease-out forwards;
}

.hourly-grid.slide-in-right {
    animation: slideInFromRight 0.3s ease-out forwards;
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hourly-card {
    flex-shrink: 0;
    width: 85px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    text-align: center;
    border: 1px solid transparent;
}

/* 비/눈 시간대 카드 강조 */
.hourly-card.rainy {
    background: linear-gradient(180deg, #e3f2fd 0%, #f5f5f5 100%);
    border-color: #90caf9;
}

.hourly-card.snowy {
    background: linear-gradient(180deg, #e8eaf6 0%, #f5f5f5 100%);
    border-color: #9fa8da;
}

/* 강수량/적설량 배지 */
.hourly-weather-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    margin: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.rain-badge {
    background: rgba(25, 118, 210, 0.15);
    color: #1565c0;
}

.rain-badge i {
    color: #1976d2;
}

.snow-badge {
    background: rgba(92, 107, 192, 0.15);
    color: #3949ab;
}

.snow-badge i {
    color: #5c6bc0;
}

.hourly-time {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.hourly-icon img {
    width: 40px;
    height: 40px;
}

.hourly-temp {
    font-size: 18px;
    font-weight: 700;
}

.hourly-desc {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hourly-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hourly-detail {
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hourly-detail i {
    color: var(--primary);
    width: 12px;
}

.hourly-modal-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
}

/* 태블릿/데스크톱 */
@media (min-width: 768px) {
    .app {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: var(--shadow-lg);
    }
    
    .map-section {
        height: 40vh;
        max-height: 350px;
    }
    
    .forecast-card {
        width: 85px;
    }
    
    .hourly-modal-content {
        max-width: 480px;
        margin: 0 auto;
        border-radius: var(--radius);
        max-height: 80vh;
    }
    
    .hourly-modal {
        align-items: center;
        justify-content: center;
    }
}
