/* 动态插画风格 - 雾霾蓝主题 */
:root {
    --primary: #7A9CC6;
    --secondary: #B3C7D6;
    --accent: #4A6FA5;
    --background: #E3EBF1;
    --text: #2D3B4E;
    --light: #F8FAFC;
    --shadow: 0 8px 24px rgba(122, 156, 198, 0.2);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

/* 动态背景效果 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background) 0%, #D6E3F0 100%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800"><path fill="%237A9CC6" fill-opacity="0.03" d="M400 800C179.2 800 0 620.8 0 400S179.2 0 400 0s400 179.2 400 400-179.2 400-400 400zm0-100c165.2 0 300-134.8 300-300S565.2 100 400 100 100 234.8 100 400s134.8 300 300 300z"/></svg>');
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, 10px) rotate(2deg); }
    50% { transform: translate(0, 20px) rotate(0deg); }
    75% { transform: translate(-10px, 10px) rotate(-2deg); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(122, 156, 198, 0.3);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 动态头部样式 */
header {
    background-color: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(8px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(122, 156, 198, 0.1);
    border-bottom: 1px solid rgba(122, 156, 198, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    position: relative;
}

.logo::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.logo:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 500;
    position: relative;
}

nav ul li a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

nav ul li a:hover::before {
    width: 60%;
}

/* 插画风格主要内容 */
.main-content {
    background-color: rgba(248, 250, 252, 0.9);
    border-radius: 16px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid rgba(122, 156, 198, 0.15);
    transition: var(--transition);
}

.main-content:hover {
    box-shadow: 0 12px 32px rgba(122, 156, 198, 0.25);
}

.section-title {
    font-size: 26px;
    margin-bottom: 30px;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

/* 动态卡片布局 */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.1);
    position: relative;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(122, 156, 198, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(122, 156, 198, 0.2);
}

.article-card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .card-image {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
    position: relative;
}

.card-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--secondary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--primary);
    margin-top: 15px;
}

/* 文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 34px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--primary);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-image:hover {
    transform: scale(1.02);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: var(--shadow);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 12px 24px;
    border-radius: 30px;
    background-color: white;
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
    transition: var(--transition);
    font-weight: 500;
}

.pagination a:hover {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 8px 16px rgba(122, 156, 198, 0.3);
}

/* 动态友情链接 */
.friend-links {
    background-color: white;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.friend-links:hover {
    box-shadow: 0 12px 32px rgba(122, 156, 198, 0.25);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 22px;
    text-align: center;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.friend-links-container a {
    padding: 10px 20px;
    background-color: var(--light);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.1);
}

.friend-links-container a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(122, 156, 198, 0.3);
}

/* 页脚样式 */
footer {
    background-color: var(--accent);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800"><path fill="white" fill-opacity="0.05" d="M400 800C179.2 800 0 620.8 0 400S179.2 0 400 0s400 179.2 400 400-179.2 400-400 400zm0-100c165.2 0 300-134.8 300-300S565.2 100 400 100 100 234.8 100 400s134.8 300 300 300z"/></svg>');
    z-index: 0;
}

.copyright {
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .article-gallery {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .main-content {
        padding: 25px;
    }
    
    .friend-links-container a {
        padding: 8px 16px;
    }
}