/* ===== 全局重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-light: #a5b4fc;
    --primary-dark: #4338ca;
    --accent: #f5576c;
    --accent-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --container: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ===== 容器 ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部 ===== */
header {
    background: var(--primary-gradient);
    color: #fff;
    padding: 40px 0 30px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}

.header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.site-branding {
    margin-bottom: 25px;
}

.site-logo {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.site-logo a {
    color: #fff;
    text-decoration: none;
}

.site-logo a:hover {
    color: rgba(255,255,255,0.85);
}

.site-tagline {
    font-size: 1.15rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== 导航 ===== */
.main-navigation {
    margin-top: 15px;
    width: 100%;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 0 8px;
    justify-content: center;
}

.main-navigation ul::-webkit-scrollbar {
    height: 3px;
}

.main-navigation ul::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.main-navigation ul::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
}

.main-navigation ul li a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 25px;
    transition: var(--transition);
    display: inline-block;
}

.main-navigation ul li a:hover,
.main-navigation ul li a.active {
    color: var(--primary-dark);
    background-color: rgba(255,255,255,0.95);
}

/* ===== 主内容区 ===== */
.content-area {
    padding: 50px 20px;
}

/* ===== 英雄区域 ===== */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 70px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-md);
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.3;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99,102,241,0.35);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.hero-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* ===== 区块标题 ===== */
.section-header {
    text-align: center;
    margin-bottom: 45px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ===== 文章卡片网格 ===== */
.diary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

.diary-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.diary-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.diary-card:hover .diary-image img {
    transform: scale(1.08);
}

.diary-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.1));
}

.diary-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.diary-category {
    display: inline-block;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary);
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    font-weight: 600;
    align-self: flex-start;
}

.diary-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.4;
}

.diary-title a {
    color: inherit;
    text-decoration: none;
}

.diary-title a:hover {
    color: var(--primary);
}

.diary-excerpt {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 18px;
    flex: 1;
}

.diary-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ===== 双栏区域 ===== */
.travel-photo-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    margin-bottom: 60px;
}

.travel-section,
.photography-section {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 35px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.travel-section:hover,
.photography-section:hover {
    box-shadow: var(--shadow-md);
}

.section-subtitle-bar {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 25px;
    position: relative;
    padding-left: 18px;
}

.section-subtitle-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* ===== 列表项 ===== */
.travel-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.travel-item {
    display: flex;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.travel-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.travel-item:hover {
    transform: translateX(4px);
}

.travel-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.travel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.travel-item:hover .travel-thumbnail img {
    transform: scale(1.1);
}

.travel-info {
    flex: 1;
}

.travel-info-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.travel-info-title a {
    color: inherit;
    text-decoration: none;
}

.travel-info-title a:hover {
    color: var(--primary);
}

.travel-location {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.travel-description {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 相册网格 ===== */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-item:hover img {
    transform: scale(1.12);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-title-overlay {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

/* ===== 更多链接 ===== */
.section-more {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
}

.section-more:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* ===== 统计区域 ===== */
.stats-section {
    margin-bottom: 60px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 45px 40px;
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-card {
    color: #fff;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.1;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== 文章列表页 ===== */
.page-header {
    text-align: center;
    margin-bottom: 35px;
    padding: 30px 0;
}

.page-header .section-title {
    font-size: 2.2rem;
}

.page-description {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-top: 12px;
}

/* ===== 筛选标签 ===== */
.filter-section {
    margin-bottom: 40px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 24px;
    border-radius: 25px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

/* ===== 文章网格（列表页） ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.articles-grid .diary-card {
    flex-direction: row;
    height: 200px;
}

.articles-grid .diary-image {
    width: 40%;
    height: auto;
    flex-shrink: 0;
}

.articles-grid .diary-content {
    width: 60%;
}

/* ===== 文章详情页 ===== */
.article-detail {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-md);
    margin-bottom: 50px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.article-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary);
    font-size: 0.85rem;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 18px;
    font-weight: 600;
}

.article-title-main {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-meta-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-hero-image {
    width: 100%;
    height: 380px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 35px;
    box-shadow: var(--shadow-md);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 30px 0 15px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
}

.article-body p {
    margin-bottom: 18px;
    color: var(--text-light);
}

.article-body ul {
    margin: 15px 0 20px 20px;
    list-style: disc;
}

.article-body ul li {
    margin-bottom: 10px;
    color: var(--text-light);
    line-height: 1.8;
}

.article-body .tip-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid #0ea5e9;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 25px 0;
}

.article-body .tip-box strong {
    color: #0369a1;
}

.article-body .warning-box {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border-left: 4px solid #eab308;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 25px 0;
}

/* ===== 相关推荐 ===== */
.related-section {
    margin-bottom: 50px;
}

.related-section .section-subtitle-bar {
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===== 页脚 ===== */
footer {
    background: #1e293b;
    color: #fff;
    padding: 55px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    padding-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding: 35px;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        height: 260px;
    }

    .diary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid .diary-card {
        flex-direction: column;
        height: auto;
    }

    .articles-grid .diary-image {
        width: 100%;
        height: 200px;
    }

    .articles-grid .diary-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 25px 0 20px;
    }

    .site-logo {
        font-size: 2.2rem;
    }

    .site-tagline {
        font-size: 0.95rem;
    }

    .main-navigation ul {
        justify-content: flex-start;
        gap: 4px;
    }

    .main-navigation ul li a {
        font-size: 0.88rem;
        padding: 6px 14px;
    }

    .content-area {
        padding: 25px 15px;
    }

    .hero-section {
        padding: 25px 20px;
        margin-bottom: 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .diary-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .travel-photo-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .travel-section,
    .photography-section {
        padding: 22px;
    }

    .section-subtitle-bar {
        font-size: 1.3rem;
    }

    .travel-item {
        gap: 12px;
    }

    .travel-thumbnail {
        width: 80px;
        height: 80px;
    }

    .photo-gallery {
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stats-section {
        padding: 30px 20px;
    }

    .article-detail {
        padding: 25px 20px;
    }

    .article-title-main {
        font-size: 1.6rem;
    }

    .article-hero-image {
        height: 220px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .filter-tabs {
        gap: 6px;
    }

    .filter-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}
