/* ==================== Reset & Base ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-gradient: linear-gradient(135deg, #4338ca 0%, #1e40af 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --warning-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);

    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-light: rgba(226, 232, 240, 0.8);

    --accent-blue: #2563eb;
    --accent-indigo: #4f46e5;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;

    --spacing-xs: 0.5rem; --spacing-sm: 1rem; --spacing-md: 1.5rem;
    --spacing-lg: 2rem; --spacing-xl: 3rem; --spacing-xxl: 4rem;

    --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.04);

    --transition-fast: 0.2s ease; --transition-normal: 0.3s ease; --transition-slow: 0.5s ease;
}

body {
    font-family: 'Noto Sans SC', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* 모바일 앱 느낌을 위해 바디 높이 고정 예방 */
    min-height: 100vh;
}

/* 섹션 전환 제어 */
.app-section {
    display: none;
    animation: slideIn 0.3s ease-out;
}
.app-section.active {
    display: block;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--spacing-lg); }

/* ==================== Header ==================== */
/* ==================== App Bar (Fixed Top) ==================== */
.app-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    z-index: 2000;
    position: relative; /* 자식 absolute 정렬 기준 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-light);
}

.app-bar.home-bar {
    justify-content: center;
}

.app-bar .back-btn {
    position: absolute;
    left: 16px; /* 좌측 고정 */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg-card-hover);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.app-bar .bar-title {
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    font-size: 1.15rem;
    font-weight: 700;
    z-index: -1; 
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    pointer-events: none; /* 뒤에 있는 요소 클릭 허용 */
}

/* ==================== Hero ==================== */
/* ==================== Home Screen ==================== */
.home-screen {
    padding: 24px 16px;
    background: #f0f4f8;
}

.home-welcome {
    text-align: center;
    margin-bottom: 35px;
    margin-top: 30px;
    padding: 0 20px;
    animation: fadeInDown 0.8s ease-out;
}

.home-welcome h1 {
    font-size: 2.1rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.home-welcome p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 20px;
}

.feature-request-btn {
    background: white;
    color: var(--accent-blue);
    border: 1.5px solid var(--accent-blue);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.feature-request-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    border-color: transparent;
}

#feature-content:focus {
    border-color: var(--accent-blue) !important;
}

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

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.lost-result-count {
    margin: -10px 0 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
    font-weight: 500;
}

.lost-result-count strong {
    color: var(--accent-blue);
    font-weight: 800;
}

.home-item {
    background: white;
    border-radius: 20px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 110px; /* 모든 항목 크기 균일화 */
}

.home-item:active {
    transform: scale(0.92);
}

.item-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.item-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

/* Color variations for item icons background or subtle glow */
.item-cctv .item-icon { color: #4338ca; }
.item-weather .item-icon { color: #f59e0b; }
.item-hallasan .item-icon { color: #059669; }
.item-airport .item-icon { color: #3b82f6; }
.item-lost .item-icon { color: #8b5cf6; }

.home-item.item-empty {
    background: rgba(255, 255, 255, 0.3);
    border: 1px dashed rgba(0,0,0,0.1);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

/* ==================== Sections ==================== */
.section { padding: var(--spacing-xxl) 0; }
.section-alt { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); border-top: 1px solid rgba(0,0,0,0.03); border-bottom: 1px solid rgba(0,0,0,0.03); }
.section-header { text-align: center; margin-bottom: var(--spacing-xl); }
.section-title {
    font-size: 2.25rem; font-weight: 700; margin-bottom: var(--spacing-sm);
    background: var(--primary-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); }

/* ==================== CCTV ==================== */
.cctv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacing-lg); }
.cctv-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    overflow: hidden; transition: all var(--transition-normal);
    border: 1px solid var(--border-light); box-shadow: var(--shadow-md);
}
.cctv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent-blue); }
.cctv-video-wrapper { position: relative; aspect-ratio: 16/10; background: #000; overflow:hidden; }
.cctv-video-el { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-embed-container { width: 100%; height: 100%; }
.yt-embed-container iframe { width: 100%; height: 100%; border: none; }
.live-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(220,38,38,0.9); color: white;
    padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.cctv-info { padding: var(--spacing-md); }
.cctv-info h3 { font-size: 1.2rem; margin-bottom: 4px; text-align: center; }
.cctv-info p { color: var(--text-muted); font-size: 0.9rem; text-align: center; }

/* ==================== Weather System ==================== */
/* Weather Alerts */
.weather-alerts-container {
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.weather-alert-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-left: 6px solid #dc2626;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #991b1b;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    animation: alert-pulse 2s infinite;
}

@keyframes alert-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2); }
    100% { transform: scale(1); }
}

.alert-type-badge {
    background: #dc2626;
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
    white-space: nowrap;
}

.location-tabs { 
    display: flex; 
    gap: 10px; 
    margin-bottom: var(--spacing-lg); 
    width: 100%;
}
.location-tab {
    flex: 1; /* 가로 공간 균등 배분 */
    background: var(--bg-card); border: 2px solid var(--border-light);
    padding: 12px 4px; border-radius: var(--radius-md); cursor: pointer;
    transition: all var(--transition-normal);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    box-shadow: var(--shadow-sm);
    min-width: 0; /* flex 자식의 최소 너비 해제 */
}
.location-tab:hover { background: var(--bg-card-hover); border-color: var(--accent-purple); transform: translateY(-3px); }
.location-tab.active { background: var(--primary-gradient); border-color: transparent; box-shadow: var(--shadow-lg); }
.tab-icon { font-size: 1.5rem; }
.tab-name { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.tab-sub { font-size: 0.8rem; color: var(--text-muted); }
.location-tab.active .tab-name, .location-tab.active .tab-sub { color: white; }
.location-tab.active .tab-sub { color: rgba(255,255,255,0.8); }

.location-weather { display: none; animation: fadeIn 0.4s ease; }
.location-weather.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.current-weather {
    background: var(--bg-card); border-radius: var(--radius-xl);
    padding: 16px; margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-light);
    display: flex; flex-direction: column; align-items: stretch;
    gap: 12px; box-shadow: var(--shadow-md);
}
.weather-main {
    display: flex; align-items: center; gap: 16px;
    flex-shrink: 0;
    justify-content: space-between;
}
.weather-temp-wrap {
    flex: 1;
}
.weather-icon { font-size: 3rem; animation: float 3s ease-in-out infinite; flex-shrink: 0; }
.weather-temp { display: flex; align-items: baseline; gap: 4px; }
.temp-value {
    font-size: 2.8rem; font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1;
}
.temp-unit { font-size: 1rem; color: var(--text-secondary); }
.weather-desc { font-size: 1rem; color: var(--text-secondary); margin-top: 4px; }
.weather-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid var(--border-light);
    padding-left: 12px;
}
.weather-detail-item {
    display: flex; align-items: center; gap: 6px;
    padding: 2px 0; background: transparent;
    border-radius: 0; transition: none;
    white-space: nowrap;
}
.weather-detail-item:hover { transform: none; box-shadow: none; }
.detail-icon { font-size: 0.9rem; }
.detail-label { font-size: 0.75rem; color: var(--text-muted); margin-right: 4px; }
.detail-value { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }

.subsection-title { font-size: 1.1rem; margin-bottom: var(--spacing-sm); text-align: center; font-weight: 700; }
.hourly-weather { margin-bottom: var(--spacing-xl); }
.hourly-scroll { display: flex; gap: 6px; overflow-x: auto; padding: var(--spacing-sm) 0; }
.hourly-scroll::-webkit-scrollbar { height: 4px; }
.hourly-scroll::-webkit-scrollbar-track { background: var(--bg-card-hover); border-radius: 2px; }
.hourly-scroll::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 2px; }
.hourly-item {
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: 10px 6px; min-width: 65px; text-align: center;
    border: 1px solid var(--border-light); transition: all var(--transition-fast); flex-shrink: 0;
}
.hourly-item:hover { transform: translateY(-4px); border-color: var(--accent-blue); box-shadow: var(--shadow-md); }
.hourly-time { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.hourly-icon { font-size: 1.5rem; margin: 6px 0; }
.hourly-temp { font-size: 1rem; font-weight: 600; }
.hourly-wind { font-size: 0.75rem; color: #0288d1; font-weight: 600; margin-top: 2px; }
.hourly-precip { font-size: 0.75rem; color: #546e7a; margin-top: 1px; }
.hourly-precip.precip-blue { color: #1e88e5; font-weight: bold; }

.weekly-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.weekly-item {
    background: var(--bg-card); border-radius: var(--radius-md); padding: 8px 4px;
    text-align: center; border: 1px solid var(--border-light); transition: all var(--transition-fast);
}
.weekly-item:hover { transform: translateY(-4px); border-color: var(--accent-green); box-shadow: var(--shadow-md); }
.weekly-day { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }
.weekly-icon { font-size: 1.2rem; margin: 4px 0; }
.weekly-temps { display: flex; justify-content: center; gap: 4px; margin-top: 2px; font-size: 0.75rem; color: var(--text-muted); }
.temp-high { font-weight: 700; color: #ff5252; }
.temp-low { font-weight: 700; color: #448aff; }
.weekly-precip { font-size: 0.75rem; color: #546e7a; margin-top: 4px; }
.weekly-precip.precip-blue { color: #1e88e5; font-weight: bold; }

/* Lost Goods Image Support */
.lost-card { display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.lost-img-box { width: 100%; height: 120px; background: #f0f2f5; overflow: hidden; position: relative; }
.lost-img-box img { width: 100%; height: 100%; object-fit: cover; }
.lost-info { padding: 12px; }

/* ==================== Hallasan ==================== */
.status-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: var(--spacing-lg); margin-bottom: var(--spacing-lg);
    display: flex; align-items: center; gap: var(--spacing-lg);
    border: 2px solid var(--border-light); transition: all var(--transition-normal); box-shadow: var(--shadow-md);
}
.status-card.status-open { border-color: var(--accent-green); background: linear-gradient(135deg, rgba(6,78,59,0.05) 0%, rgba(16,185,129,0.03) 100%); }
.status-card.status-closed { border-color: var(--accent-red); background: linear-gradient(135deg, rgba(127,29,29,0.05) 0%, rgba(239,68,68,0.03) 100%); }
.status-card.status-loading { border-color: var(--border-light); }
.status-icon { font-size: 3rem; flex-shrink: 0; }
.status-content h3 { font-size: 1.6rem; margin-bottom: 4px; }
.status-time { font-size: 0.9rem; color: var(--text-muted); }

.trails-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: var(--spacing-lg); } /* 모바일 1열 강제 */
.trail-card {
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: 10px; border: 1px solid var(--border-light);
    transition: all var(--transition-normal); box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 4px;
}
@media (min-width: 480px) { .trails-grid { grid-template-columns: repeat(2, 1fr); } }
.trail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; gap: 4px; }
.trail-header h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.trail-status-badge { padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.trail-status-badge.open { background: var(--success-gradient); color: white; }
.trail-status-badge.partial { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.trail-status-badge.closed { background: var(--danger-gradient); color: white; }
.trail-info-compact { display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; color: var(--text-secondary); }
.trail-info-compact span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trail-detail { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.9rem; }
.trail-label { color: var(--text-muted); }
.trail-value { font-weight: 600; }

/* ==================== Flights ==================== */
.flight-tabs {
    display: flex;
    justify-content: center;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 30px;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.flight-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.flight-tab.active {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.flight-row {
    display: flex; padding: 10px 4px; border-bottom: 1px solid var(--border-light);
    align-items: center; font-size: 0.8rem;
}
.flight-header { background: var(--bg-card-hover) !important; font-weight: 700; color: var(--text-primary); border-top: 1px solid var(--border-light); }
.flight-col { flex: 1; text-align: center; min-width: 0; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.flight-col:nth-child(1) { flex: 1.1; font-weight: 700; } /* 항공편명 */
.flight-col:nth-child(2) { flex: 1.3; font-size: 0.75rem; word-break: break-all; } /* 항공사명 복구 */
.flight-col:nth-child(3) { flex: 1.2; word-break: break-all; } /* 출발/목적지 */
.flight-col:nth-child(4) { flex: 1.5; } /* 시간 */
.flight-col:nth-child(5) { flex: 1.1; } /* 상태 */

.flight-row:hover:not(.flight-header) { background: var(--bg-card-hover); }
.status-badge { padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.status-badge.status-ontime { background: var(--success-gradient); color: white; }
.status-badge.status-delayed { background: var(--warning-gradient); color: white; }
.status-badge.status-cancelled { background: var(--danger-gradient); color: white; }
.status-badge.status-landed, .status-badge.status-departed { background: var(--accent-gradient); color: white; }
.status-badge.status-boarding { background: var(--primary-gradient); color: white; }

/* ==================== Festival ==================== */
.festival-list { display: flex; flex-direction: column; gap: 16px; }
.festival-card {
    background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: transform 0.2s; cursor: pointer;
}
.festival-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.festival-img { width: 100%; height: 200px; object-fit: cover; }
.festival-info { padding: 16px; }
.festival-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.festival-date { font-size: 0.85rem; color: var(--accent-orange); font-weight: 600; margin-bottom: 4px; }
.festival-place { font-size: 0.85rem; color: var(--text-muted); }


/* ==================== Lost & Found ==================== */
.lost-filter-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
}

.lost-tabs {
    display: flex;
    gap: 12px;
}

.lost-tab {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lost-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.lost-date-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.date-input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.search-btn {
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    background: var(--secondary-gradient);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 42px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.lost-goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 30px;
}

.lost-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lost-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--accent-indigo);
}

.lost-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lost-card.image-only {
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: white;
}

.lost-card.image-only .lost-img-box {
    width: 100%;
    height: 100%;
}

.lost-card.image-only .lost-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lost-category-badge-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-gradient);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.no-lost-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #f1f5f9;
    color: #cbd5e1;
}

.lost-category-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lost-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
}

.lost-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.lost-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lost-header-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.view-toggle-container {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    width: 100%; /* 너비 100%로 설정 */
    margin-top: 10px;
}

.view-toggle-btn {
    flex: 1; /* 5:5 비율을 위해 동일한 비중 할당 */
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-toggle-btn.active {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* ==================== CCTV ==================== */
.cctv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.cctv-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-light);
}

.cctv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.cctv-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.cctv-video-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cctv-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff2442;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cctv-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.cctv-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cctv-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cctv-name-cn {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lost-goods-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr); /* 3열 고정 */
    gap: 10px;
    margin-top: 20px;
}

.lost-card.gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lost-card.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.lost-card.gallery-item .lost-img-box {
    width: 100%;
    height: 100%;
}

.lost-card.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-lost-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #e2e8f0;
    color: #94a3b8;
}

.lost-category-badge-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    pointer-events: none;
}

.lost-goods-grid.active {
    display: grid !important;
}

.lost-table-container.active {
    display: block !important;
}

/* Excel Style Table */
.lost-table-container {
    display: none; /* 기본 숨김 */
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-light);
}

.lost-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.lost-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.lost-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.lost-table tr:hover {
    background: #fcfdfe;
}

.lost-table-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f5f9;
}

.lost-table-btn {
    padding: 6px 12px;
    background: #f1f5f9;
    color: var(--accent-blue);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.lost-table-btn:hover {
    background: var(--accent-blue);
    color: white;
}

.lost-date {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.lost-place {
    font-family: inherit;
    font-weight: 500;
}

.lost-link-btn {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-card-hover);
    color: var(--accent-indigo);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.lost-link-btn:hover {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
}

.loading-lost {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.lost-found-source {
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== Lost & Found 고도화 필터 ==================== */
.search-filter-box {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 5px;
}

.filter-select, .filter-input, .date-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.filter-select:focus, .filter-input:focus, .date-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 56, 202, 0.1);
}

.align-end {
    justify-content: flex-end;
}

.search-btn {
    padding: 12px 30px;
    height: 48px;
}

/* ==================== Footer ==================== */
.app-footer { 
    padding: 20px 0; 
    background: #f8fafc; 
    border-top: 1px solid var(--border-light); 
    margin-top: 20px;
}
.footer-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
}
.source-title { font-size: 1rem; margin-bottom: 10px; color: var(--text-primary); }
.footer-links li { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; list-style: none; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--spacing-xl); margin-bottom: var(--spacing-lg); }
.footer-section h3 { font-size: 1.3rem; margin-bottom: var(--spacing-sm); background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-links li { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--accent-blue); }
.footer-bottom { text-align: center; padding-top: var(--spacing-md); border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: 0.875rem; }

/* XHS Footer Card */
.xhs-footer-card {
    background: white; border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.xhs-qr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xhs-info-section h4 { font-size: 1rem; color: var(--text-primary); margin-bottom: 4px; }
.xhs-info-section .xhs-id { font-size: 0.8rem; color: #ff2442; font-weight: 700; margin-bottom: 2px; }
.xhs-info-section p { font-size: 0.75rem; color: var(--text-muted); }
.xhs-qr-box { width: 80px; height: 80px; background: #f8fafc; border-radius: 8px; padding: 4px; border: 1px solid var(--border-light); }
.xhs-qr-box img { width: 100%; height: 100%; object-fit: contain; }

/* ==================== Modal ==================== */
.modal-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    animation: fadeIn 0.3s ease;
}

.modal-content { 
    background: #000; 
    border-radius: var(--radius-xl); 
    width: 95%; 
    max-width: 1000px; 
    position: relative; 
    padding: 2px; /* 비디오가 꽉 차게 */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalScaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes modalScaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: rgba(255,255,255,0.2); 
    backdrop-filter: blur(4px);
    border: none; 
    color: white; 
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem; 
    cursor: pointer; 
    z-index: 10; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

#modal-body video, #modal-body iframe { 
    width: 100%; 
    aspect-ratio: 16/9; 
    border-radius: var(--radius-lg); 
    display: block;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) { .container { padding: var(--spacing-md); } }

/* ==================== 태블릿 (769px ~ 1024px) ==================== */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .cctv-grid { gap: 12px; }
}


/* ==================== Home Screen Responsive ==================== */
@media (max-width: 480px) {
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .item-icon {
        font-size: 1.8rem;
    }
    .item-label {
        font-size: 0.75rem;
    }
    .home-welcome h1 {
        font-size: 1.5rem;
    }
}

/* ==================== Sections Responsive ==================== */
@media (max-width: 768px) {
    .cctv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .flight-row { grid-template-columns: 0.9fr 1fr 0.8fr 0.9fr; gap: 2px; font-size: 0.72rem; }
    .trails-grid { grid-template-columns: 1fr 1fr; }
}

/* ==================== Lost Detail Modal Styles ==================== */
.lost-detail-content {
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 24px;
}

.lost-modal-body {
    display: flex;
    flex-direction: column;
}

.lost-modal-img-container {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.lost-modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lost-modal-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #cbd5e1;
}

.lost-modal-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lost-modal-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lost-modal-category {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 800;
    text-transform: uppercase;
}

.lost-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.lost-modal-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
}

.lost-modal-field {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
}

.lost-modal-label {
    color: var(--text-muted);
    font-weight: 600;
    min-width: 70px;
}

.lost-modal-value {
    color: var(--text-primary);
    font-weight: 700;
}

.lost-modal-footer {
    padding: 20px 24px 24px;
    display: flex;
    gap: 12px;
}

.lost-modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 1rem;
}

.lost-modal-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.lost-modal-btn.secondary {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.lost-modal-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}


/* ==================== Festival & Events (축제) ==================== */
.festival-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.festival-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.festival-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.festival-card .image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin: 0;
}

.festival-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.festival-card:hover .festival-img {
    transform: scale(1.1);
}

.tag.ing {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff2442;
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    font-style: normal;
    box-shadow: 0 4px 10px rgba(255, 36, 66, 0.3);
    z-index: 5;
}

.festival-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.festival-date {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.festival-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.2rem;
}

.festival-place {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Lost & Found Table Optimization ===== */
.lost-table th, .lost-table td {
    padding: 12px 10px;
    white-space: nowrap; /* 줄바꿈 방지 */
}

.lost-table td {
    overflow: hidden;
    text-overflow: ellipsis; 
    max-width: 200px; /* 적절한 너비 유지 */
}

#wechat-qr-container {
    animation: fadeIn 0.4s ease-out;
}

/* ===== Footer QR Section ===== */
.footer-qr-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px auto;
    padding: 10px;
}
.qr-item {
    text-align: center;
    transition: transform 0.3s ease;
}
.qr-item a {
    display: block;
    text-decoration: none;
    cursor: pointer;
}
.qr-item:hover {
    transform: translateY(-5px);
}
.qr-img {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: white;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.03);
}
.qr-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

@media (max-width: 480px) {
    .footer-qr-container {
        gap: 20px;
    }
    .qr-img {
        width: 120px;
        height: 120px;
    }
}

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