/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --accent: #ff6f00;
    --accent-light: #ff9800;
    --success: #2e7d32;
    --warning: #f9a825;
    --danger: #c62828;
    --bg: #0d1b2a;
    --bg-card: #1b2838;
    --bg-card-light: #243447;
    --text: #e0e6ed;
    --text-secondary: #8b9dc3;
    --border: #2a3f54;
    --radius: 16px;
    --radius-sm: 10px;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ===== 加载页 ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.mountain-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.loading-content h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.loading-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes loading {
    0% { width: 0%; margin-left: 0; }
    50% { width: 70%; margin-left: 0; }
    100% { width: 0%; margin-left: 100%; }
}

/* ===== 头部 ===== */
.app-header {
    position: sticky;
    top: 0;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.location-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

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

.location-icon {
    font-size: 1rem;
}

#locationName {
    font-weight: 600;
    font-size: 0.95rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-icon {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.icon-btn:active {
    transform: scale(0.9);
    background: var(--primary-light);
}

.icon-btn-with-badge {
    position: relative;
}

.icon-btn-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    border: 1px solid var(--bg-card);
    display: none;
}

/* ===== 弹窗 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: flex-end;
    z-index: 200;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

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

.modal-header h3 {
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary-light);
}

.search-box button {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-light);
    color: white;
    cursor: pointer;
}

.search-box .btn-primary {
    width: auto;
    padding: 12px 14px;
    background: var(--accent);
}

.location-list {
    margin-bottom: 16px;
}

.location-item {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.location-item:hover, .location-item:active {
    background: var(--bg-card-light);
}

.location-item-name {
    font-weight: 500;
}

.location-item-weather {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--accent);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:active {
    transform: scale(0.98);
    background: var(--accent-light);
}

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

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== 收藏快捷栏 ===== */
.favorites-bar {
    margin: 12px 16px 0;
    position: relative;
}

.favorites-bar::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 2;
}

.favorites-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 4px 8px 0;
    scrollbar-width: none;
}

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

.fav-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fav-chip:active {
    transform: scale(0.95);
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.fav-chip.active {
    background: var(--primary);
    border-color: var(--primary-light);
    color: white;
}

.fav-chip .fav-chip-icon {
    font-size: 0.9rem;
}

.fav-empty-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 6px 0;
    white-space: nowrap;
}

/* ===== 主天气卡片 ===== */
.weather-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

.main-weather {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.main-weather::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.current-temp {
    font-size: 4rem;
    font-weight: 200;
    line-height: 1;
    letter-spacing: -2px;
}

.weather-desc {
    font-size: 1.1rem;
    margin-top: 8px;
    opacity: 0.9;
}

.feels-like {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 4px;
}

.weather-icon-large {
    font-size: 4.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
}

.detail-item {
    text-align: center;
}

.detail-icon {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 4px;
}

.detail-label {
    font-size: 0.7rem;
    opacity: 0.7;
    display: block;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

.update-time {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 12px;
}

/* ===== 预测卡片 ===== */
.section-title {
    font-size: 1.05rem;
    margin: 24px 16px 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.prediction-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin: 12px 16px;
    padding: 18px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.prediction-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.prediction-icon {
    font-size: 2.2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 14px;
}

.prediction-title {
    flex: 1;
}

.prediction-title h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

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

.prediction-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.prediction-body {
    padding-top: 4px;
}

.prediction-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.prediction-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease, background 0.5s;
    width: 0%;
}

.prediction-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.cloud-sea-best {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    padding: 6px 10px;
    background: rgba(255, 152, 0, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 152, 0, 0.2);
    color: var(--text-secondary);
}

.cloud-sea-best-icon {
    font-size: 0.9rem;
}

.cloud-sea-best-time {
    font-weight: 600;
    color: var(--text);
}

.cloud-sea-best-score {
    font-weight: 700;
    margin-left: auto;
}

.cloud-sea-best-score.score-excellent { color: #4caf50; }
.cloud-sea-best-score.score-good { color: #8bc34a; }
.cloud-sea-best-score.score-moderate { color: #ff9800; }
.cloud-sea-best-score.score-poor { color: #9e9e9e; }

.cloud-sea-best-time.score-excellent { color: #81c784; }
.cloud-sea-best-time.score-good { color: #aed581; }
.cloud-sea-best-time.score-moderate { color: #ffd54f; }
.cloud-sea-best-time.score-poor { color: #b0bec5; }

.prediction-factors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 晚霞机位推荐 */
.sunset-spots {
    margin-top: 10px;
}

.spots-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.spots-loading {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px 0;
}

.spots-empty {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px 0;
}

.spot-card {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,0.06);
}

.spot-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.spot-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.spot-features {
    font-size: 0.7rem;
    color: var(--accent-light);
}

.factor-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    max-width: 100%;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.factor-tag.good {
    background: rgba(46, 125, 50, 0.2);
    color: #81c784;
    border-color: var(--success);
}

.factor-tag.bad {
    background: rgba(198, 40, 40, 0.2);
    color: #ef5350;
    border-color: var(--danger);
}

.factor-tag.warning {
    background: rgba(249, 168, 37, 0.2);
    color: #ffd54f;
    border-color: var(--warning);
}

/* ===== 小时预报 ===== */
.hourly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-right: 16px;
}

.btn-back-today {
    padding: 6px 12px;
    border-radius: 14px;
    border: 1px solid var(--primary-light);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back-today:active {
    background: var(--primary-light);
}

.hourly-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 0 16px 8px;
    scrollbar-width: none;
}

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

.hourly-item {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.hourly-item:active {
    transform: scale(0.95);
    background: var(--bg-card-light);
}

.hourly-item.current {
    background: var(--primary);
    border-color: var(--primary-light);
}

.hourly-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hourly-item.current .hourly-time {
    color: rgba(255,255,255,0.8);
}

.hourly-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.hourly-temp {
    font-size: 1rem;
    font-weight: 600;
}

.hourly-pop {
    font-size: 0.7rem;
    color: var(--accent-light);
    margin-top: 4px;
}

/* ===== 天文信息 ===== */
.astro-section {
    margin: 16px;
}

.astro-card {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.astro-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.astro-icon {
    font-size: 2rem;
}

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

.astro-time {
    font-size: 1.3rem;
    font-weight: 600;
}

.astro-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ===== 每日预报 ===== */
.daily-list {
    margin: 0 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.daily-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.daily-item:last-child {
    border-bottom: none;
}

.daily-item:active {
    background: var(--bg-card-light);
}

.daily-item.selected {
    background: var(--primary);
    border-color: var(--primary-light);
}

.daily-item.selected .daily-day,
.daily-item.selected .daily-temp-high,
.daily-item.selected .daily-desc {
    color: white;
}

.daily-item.selected .daily-date,
.daily-item.selected .daily-temp-low {
    color: rgba(255,255,255,0.7);
}

.daily-day {
    width: 50px;
    font-weight: 600;
    font-size: 0.95rem;
}

.daily-date {
    width: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.daily-icon {
    flex: 1;
    text-align: center;
    font-size: 1.6rem;
}

.daily-temps {
    width: 90px;
    text-align: right;
}

.daily-temp-high {
    font-weight: 600;
    font-size: 1rem;
}

.daily-temp-low {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 4px;
}

.daily-desc {
    width: 60px;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== 页脚 ===== */
.app-footer {
    text-align: center;
    padding: 24px 16px 32px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.8;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
    #app {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0,0,0,0.5);
        min-height: 100vh;
    }
    
    body {
        background: #070f18;
    }
}

/* ===== 评分颜色 ===== */
.score-excellent { color: #4caf50; }
.score-good { color: #8bc34a; }
.score-moderate { color: #ff9800; }
.score-poor { color: #f44336; }
.score-bad { color: #9e9e9e; }

.bar-excellent { background: linear-gradient(90deg, #4caf50, #8bc34a); }
.bar-good { background: linear-gradient(90deg, #8bc34a, #cddc39); }
.bar-moderate { background: linear-gradient(90deg, #ff9800, #ffc107); }
.bar-poor { background: linear-gradient(90deg, #f44336, #ff5722); }
.bar-bad { background: linear-gradient(90deg, #9e9e9e, #bdbdbd); }

/* ===== 收藏按钮 ===== */
.fav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
    line-height: 1;
}

.fav-btn:active {
    transform: scale(1.3);
}

.fav-btn.favorited {
    color: #ffc107;
}

.location-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 14px 16px;
}

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

.location-section-title {
    padding: 8px 4px 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 8px;
}

.location-section-title:first-child {
    margin-top: 0;
}


/* ===== 折叠功能 ===== */
.collapsible {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collapsible:active {
    opacity: 0.7;
}

.collapse-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.collapse-hint-inline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.3s;
    user-select: none;
}

.collapse-hint-inline:active {
    opacity: 0.7;
}

.collapsed .collapse-hint,
.collapsed .collapse-hint-inline {
    transform: rotate(-90deg);
}

.hourly-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 专业观测（莉景天气风格） ===== */
.pro-obs-section {
    margin-top: 8px;
}

.pro-obs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-right: 16px;
}

.pro-obs-wrapper {
    display: flex;
    margin: 0 16px;
    background: linear-gradient(180deg, #1a1f3a 0%, #14182e 100%);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    height: auto;
}

/* 左侧固定标签列 */
.pro-obs-labels {
    width: 72px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.pro-obs-label {
    box-sizing: border-box;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 0.7rem;
    color: rgba(200,210,230,0.75);
    white-space: nowrap;
    font-weight: 400;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pro-obs-label.wind-label {
    font-size: 0.6rem;
}

/* 右侧滚动数据区 */
.pro-obs-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    position: relative;
}

.pro-obs-scroll::-webkit-scrollbar {
    display: none;
}

/* 每行 */
.pro-obs-row {
    display: flex;
    height: 27px;
    min-width: max-content;
}

.pro-obs-row.params {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pro-obs-row.cloud {
    height: 24px;
}

.pro-obs-row.cloud:last-child {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* 每小时单元格 */
.pro-obs-cell {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text);
    position: relative;
}

.pro-obs-cell.date-cell {
    font-size: 0.75rem;
    color: rgba(200,210,230,0.9);
    font-weight: 500;
}

.pro-obs-cell.time-cell {
    font-size: 0.8rem;
    color: rgba(200,210,230,0.9);
    font-weight: 500;
}

.pro-obs-cell.weather-cell {
    font-size: 1.1rem;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}

.pro-obs-cell.weather-text {
    font-size: 0.55rem;
    color: var(--text-secondary);
    position: static;
}

.pro-obs-cell.wind-cell {
    font-size: 1.2rem;
}

/* 云层区域 */
.pro-obs-cloud-area {
    position: relative;
    flex: 1;
    min-width: max-content;
    display: flex;
    align-items: flex-start;
}

.pro-obs-cloud-canvas {
    display: block;
    image-rendering: auto;
}

/* 降水柱状图区域 */
.pro-obs-precip-area {
    height: 64px;
    display: flex;
    min-width: max-content;
    padding: 4px 0;
    position: relative;
}

.pro-obs-precip-cell {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    padding-bottom: 2px;
    position: relative;
}

.pro-obs-precip-bar-rain {
    width: 14px;
    background: linear-gradient(to top, #1565c0, #42a5f5);
    border-radius: 2px 2px 0 0;
    min-height: 1px;
    transition: height 0.3s;
}

.pro-obs-precip-bar-snow {
    width: 14px;
    background: linear-gradient(to top, #c2185b, #f48fb1);
    border-radius: 2px 2px 0 0;
    min-height: 1px;
    transition: height 0.3s;
}

.pro-obs-precip-value {
    position: absolute;
    top: 100%;
    font-size: 0.55rem;
    color: #42a5f5;
    white-space: nowrap;
    margin-top: 1px;
}

/* 图例 */
.pro-obs-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 4px 0;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.pro-obs-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pro-obs-legend-line {
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.pro-obs-legend-line.temp { background: #ffc107; }
.pro-obs-legend-bar {
    width: 12px;
    height: 8px;
    border-radius: 1px;
}

.pro-obs-legend-bar.rain { background: #42a5f5; }
.pro-obs-legend-bar.snow { background: #f48fb1; }

/* 参数行颜色 */
.temp-hot { color: #ff8a65; }
.temp-warm { color: #ffcc80; }
.temp-mild { color: #e0e6ed; }
.temp-cool { color: #81d4fa; }
.temp-cold { color: #4fc3f7; }

.humid-high { color: #4fc3f7; }
.humid-mid { color: #81d4fa; }
.humid-low { color: rgba(200,210,230,0.6); }

.wind-calm { color: #81c784; }
.wind-breezy { color: #aed581; }
.wind-windy { color: #ffcc80; }
.wind-gusty { color: #ff8a65; }

.vis-good { color: #81c784; }
.vis-moderate { color: #ffcc80; }
.vis-poor { color: #ef5350; }


/* ===== 逐小时预测滑动条（云海/晚霞） ===== */
.hourly-prediction-scroll {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 12px 16px 4px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    scrollbar-width: none;
}

.hourly-prediction-scroll::-webkit-scrollbar {
    display: none;
}

.pred-hour-card {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    padding: 8px 4px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pred-hour-card:active {
    transform: scale(0.92);
}

.pred-hour-card.selected {
    background: var(--primary);
    border-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(57, 73, 171, 0.35);
}

.pred-hour-card.selected .pred-hour-time {
    color: rgba(255,255,255,0.9);
}

.pred-hour-card.selected .pred-hour-detail {
    color: rgba(255,255,255,0.7);
}

.pred-hour-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.pred-hour-bar-bg {
    height: 40px;
    width: 20px;
    margin: 0 auto 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.pred-hour-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 10px 10px;
    transition: height 0.4s ease;
}

.pred-hour-score {
    font-size: 0.75rem;
    font-weight: 700;
}

.pred-hour-detail {
    font-size: 0.55rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: break-word;
}

.pred-hour-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pred-hour-badge.excellent { background: #4caf50; }
.pred-hour-badge.good { background: #8bc34a; }
.pred-hour-badge.moderate { background: #ff9800; }
.pred-hour-badge.poor { background: #f44336; }





/* ===== 地图弹窗 ===== */
.map-modal-content {
    padding-bottom: 16px;
}

.map-search-box {
    display: flex;
    gap: 8px;
    margin: 0 20px 12px;
}

.map-search-box input {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
}

.map-search-box button {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-light);
    color: white;
    cursor: pointer;
}

.map-container {
    height: 50vh;
    min-height: 300px;
    margin: 0 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-card);
    position: relative;
    isolation: isolate;
}

.map-info {
    margin: 10px 20px 0;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.snap-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.snap-toggle input {
    accent-color: var(--primary);
}

.map-actions {
    display: flex;
    gap: 10px;
    margin: 12px 20px 0;
}

.map-actions button {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.map-actions button:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-card-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:active {
    background: var(--primary-light);
}

/* Leaflet 暗色适配 */
.leaflet-container {
    background: var(--bg-card);
    border-radius: inherit;
}

/* 修复地图圆角外露出白色边框 */
.map-container .leaflet-container {
    border-radius: var(--radius-sm);
}

.map-container .leaflet-control-attribution {
    border-radius: 0 0 var(--radius-sm) 0;
}


/* ===== 收藏长按菜单 ===== */
.fav-context-menu {
    position: fixed;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 300;
    padding: 4px;
    min-width: 120px;
}

.fav-context-item {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.fav-context-item:active {
    background: var(--bg-card-light);
}

/* ===== 设置弹窗 ===== */
.settings-list {
    padding: 8px 0;
}

.settings-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item.hidden {
    display: none;
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.settings-icon {
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 10px;
}

.settings-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.settings-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.settings-select-row {
    padding-left: 48px;
}

.settings-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.settings-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    margin-top: 8px;
}

.settings-input:focus {
    border-color: var(--primary-light);
}

/* Toggle 开关 */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.settings-toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.settings-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}


/* ===== 更新公告 ===== */
.changelog-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px 2px;
}

.changelog-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.changelog-item:hover {
    background: var(--bg-card-light);
}

.changelog-item:active {
    transform: scale(0.98);
}

.changelog-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.changelog-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.changelog-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
    display: none;
}

.changelog-item.expanded .changelog-detail {
    display: block;
    animation: fadeIn 0.2s ease;
}

.changelog-item.expanded .changelog-title {
    color: var(--accent-light);
}
