/* ===== 乐途慢享 · 候鸟式养老栖息地指南 共享样式 ===== */

:root {
    --primary: #1a4a4a;
    --primary-light: #2d6d6d;
    --sunset-gold: #d4a574;
    --warm-orange: #e89b5a;
    --ivory: #f5e6d3;
    --bg-warm: #fdfaf6;
    --bg-card: #ffffff;
    --text-dark: #2c3e3e;
    --text-mid: #5a6c6c;
    --text-light: #8a9a9a;
    --border: #e8e0d4;
    --winter-color: #c0392b;
    --winter-bg: #fdf2f0;
    --summer-color: #27795a;
    --summer-bg: #f0f8f4;
    --shadow-sm: 0 2px 8px rgba(26, 74, 74, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 74, 74, 0.1);
    --shadow-lg: 0 8px 30px rgba(26, 74, 74, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    background: var(--bg-warm);
    color: var(--text-dark);
    line-height: 1.85;
    font-size: 16px;
}

a { text-decoration: none; color: inherit; }

/* ===== 顶部导航 ===== */
.navbar {
    background: var(--primary);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.navbar .logo,
.navbar a.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ivory);
    font-size: 1.3em;
    font-weight: 600;
    letter-spacing: 1px;
}

.navbar a.logo:hover {
    opacity: 0.85;
}

.navbar .logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--sunset-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--ivory);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95em;
    transition: all 0.3s;
    opacity: 0.85;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.15);
    opacity: 1;
}

/* ===== 通用容器 ===== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 页面横幅 ===== */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--ivory);
    padding: 60px 24px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner.winter-banner {
    background: linear-gradient(135deg, #8b3a2e 0%, #c05a4a 100%);
}

.page-banner.summer-banner {
    background: linear-gradient(135deg, #1a5a3a 0%, #2d8a5a 100%);
}

.page-banner h1 {
    font-size: 2.4em;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.page-banner .banner-sub {
    font-size: 1.05em;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.page-banner .banner-meta {
    margin-top: 18px;
    font-size: 0.9em;
    opacity: 0.7;
}

/* ===== 季节入口卡片（首页） ===== */
.season-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 50px auto;
    max-width: 960px;
    padding: 0 24px;
}

.season-card {
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    transition: all 0.35s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.season-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.season-card.winter {
    background: linear-gradient(135deg, #fdf2f0 0%, #fce8e3 100%);
    border: 2px solid #e8c5be;
}

.season-card.summer {
    background: linear-gradient(135deg, #f0f8f4 0%, #e3f2eb 100%);
    border: 2px solid #b8dcc8;
}

.season-card .season-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.season-card h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.season-card.winter h2 { color: #8b3a2e; }
.season-card.summer h2 { color: #1a5a3a; }

.season-card p {
    color: var(--text-mid);
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.7;
}

.season-card .season-btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 24px;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s;
}

.season-card.winter .season-btn {
    background: #c05a4a;
    color: white;
}

.season-card.summer .season-btn {
    background: #2d8a5a;
    color: white;
}

.season-card:hover .season-btn {
    transform: scale(1.05);
}

/* ===== 区域分区 ===== */
.region-section {
    margin-bottom: 56px;
}

.region-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.region-header .region-icon {
    font-size: 1.6em;
}

.region-header h2 {
    font-size: 1.45em;
    color: var(--primary);
    font-weight: 600;
}

.region-header .region-count {
    margin-left: auto;
    background: var(--ivory);
    color: var(--text-mid);
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 0.85em;
}

/* ===== 城市卡片网格 ===== */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.city-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border-top: 4px solid var(--sunset-gold);
    display: flex;
    flex-direction: column;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.city-card {
    scroll-margin-top: 80px;
}

.city-card.highlight {
    animation: card-highlight 1.8s ease;
}

@keyframes card-highlight {
    0%   { box-shadow: 0 0 0 3px var(--sunset-gold), var(--shadow-md); }
    50%  { box-shadow: 0 0 0 5px var(--sunset-gold), 0 4px 24px rgba(212, 165, 116, 0.4); }
    100% { box-shadow: var(--shadow-sm); }
}

.city-card.winter-card { border-top-color: #c05a4a; }
.city-card.summer-card { border-top-color: #2d8a5a; }

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-header .city-name {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-dark);
}

.card-header .rank-badge {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.82em;
    font-weight: 500;
    color: white;
    background: var(--text-light);
}

.rank-badge.top3 { background: linear-gradient(135deg, var(--sunset-gold), var(--warm-orange)); }
.rank-badge.top10 { background: var(--primary); }
.rank-badge.winter-badge { background: #c05a4a; }
.rank-badge.summer-badge { background: #2d8a5a; }

.city-card .city-province {
    color: var(--text-light);
    font-size: 0.88em;
    margin-bottom: 12px;
}

.city-card .city-score {
    font-size: 0.9em;
    color: var(--text-mid);
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}

.city-card .city-score strong {
    color: var(--primary);
    font-size: 1.1em;
}

.city-card .city-desc {
    font-size: 0.9em;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 16px;
    flex-grow: 1;
}

.city-card .city-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.city-card .tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78em;
    background: var(--bg-warm);
    color: var(--text-mid);
}

.city-card .city-links {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.city-card .link-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 20px;
    font-size: 0.85em;
    transition: all 0.3s;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.city-card .link-btn:hover {
    background: var(--primary);
    color: white;
}

.city-card .link-btn.map-btn {
    border-color: var(--summer-color);
    color: var(--summer-color);
}

.city-card .link-btn.map-btn:hover {
    background: var(--summer-color);
    color: white;
}

/* ===== 排行表 ===== */
.rank-table-section {
    margin: 40px 0;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.92em;
}

.rank-table thead {
    background: var(--primary);
    color: var(--ivory);
}

.rank-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 0.9em;
}

.rank-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.rank-table tbody tr:hover {
    background: var(--bg-warm);
}

.rank-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.rank-table tbody tr:hover .city-link {
    color: var(--primary-light);
    text-decoration: underline;
}

.rank-table .city-link {
    color: var(--primary);
    font-weight: 500;
    transition: color 0.2s;
}

.rank-table .rank-num {
    font-weight: 600;
    color: var(--primary);
    width: 50px;
    text-align: center;
}

.rank-table .rank-num.top1 { color: #c0392b; font-size: 1.1em; }
.rank-table .rank-num.top2 { color: #d4a574; }
.rank-table .rank-num.top3 { color: #e89b5a; }

.rank-table .score-val {
    font-weight: 600;
    color: var(--primary);
}

.rank-table .province-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.82em;
    background: var(--ivory);
    color: var(--text-mid);
}

/* ===== 说明区 ===== */
.info-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.info-section h3 {
    color: var(--primary);
    font-size: 1.2em;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.info-section p {
    color: var(--text-mid);
    font-size: 0.92em;
    line-height: 1.9;
    margin-bottom: 10px;
}

.info-section .indicator-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.info-section .indicator-item {
    background: var(--bg-warm);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88em;
    color: var(--text-mid);
}

.info-section .indicator-item strong {
    color: var(--primary);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--primary);
    color: var(--ivory);
    padding: 40px 24px 24px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 8px;
    font-size: 0.9em;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-content .footer-link {
    color: var(--sunset-gold);
    text-decoration: underline;
    opacity: 0.9;
}

.footer-content .footer-disclaimer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.82em;
    opacity: 0.6;
}

/* ===== 各省统计 ===== */
.province-stats {
    margin: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--sunset-gold);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card.winter-stat { border-left-color: #c05a4a; }
.stat-card.summer-stat { border-left-color: #2d8a5a; }

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

.stat-card .stat-icon {
    font-size: 1.4em;
}

.stat-card .stat-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary);
}

.stat-card .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.88em;
    border-bottom: 1px dashed var(--border);
}

.stat-card .stat-row:last-child {
    border-bottom: none;
}

.stat-card .stat-label {
    color: var(--text-light);
}

.stat-card .stat-value {
    color: var(--text-dark);
    font-weight: 500;
}

.stat-card .stat-value strong {
    color: var(--primary);
    font-size: 1.05em;
}

.stat-card .stat-best {
    color: var(--sunset-gold);
    font-weight: 600;
}

.stat-card.winter-stat .stat-best { color: #c05a4a; }
.stat-card.summer-stat .stat-best { color: #2d8a5a; }

/* 统计卡片可点击样式 */
.stat-card.clickable {
    cursor: pointer;
}

.stat-card .stat-link {
    cursor: pointer;
    transition: opacity 0.2s;
}

.stat-card .stat-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.stat-card .stat-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    text-align: center;
    font-size: 0.82em;
    color: var(--text-light);
    transition: color 0.3s;
}

.stat-card.clickable:hover .stat-footer {
    color: var(--primary);
}

.stat-card.summer-stat.clickable:hover .stat-footer {
    color: #2d8a5a;
}

.stat-card.winter-stat.clickable:hover .stat-footer {
    color: #c05a4a;
}

/* 区域分区可滚动定位 */
.region-section {
    scroll-margin-top: 80px;
}

/* 统计卡片高亮动画 */
.stat-card.highlight {
    animation: stat-highlight 1.8s ease;
}

@keyframes stat-highlight {
    0%   { box-shadow: 0 0 0 3px var(--sunset-gold), var(--shadow-md); }
    50%  { box-shadow: 0 0 0 5px var(--sunset-gold), 0 4px 24px rgba(212, 165, 116, 0.4); }
    100% { box-shadow: var(--shadow-sm); }
}

/* 排行表省份标签可点击 */
.rank-table .province-tag {
    cursor: pointer;
    transition: all 0.2s;
}

.rank-table .province-tag:hover {
    background: var(--sunset-gold);
    color: white;
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--ivory);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: all 0.3s;
    z-index: 99;
    font-size: 1.3em;
    border: none;
}

.back-to-top.visible { opacity: 1; }
.back-to-top:hover { background: var(--primary-light); transform: translateY(-3px); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .nav-links { gap: 2px; }
    .nav-links a { padding: 6px 10px; font-size: 0.85em; }
    .page-banner h1 { font-size: 1.6em; }
    .season-entry { grid-template-columns: 1fr; }
    .city-grid { grid-template-columns: 1fr; }
    .rank-table { font-size: 0.82em; }
    .rank-table th, .rank-table td { padding: 8px 10px; }
    .container { padding: 0 16px; }
}
