/* 动态插画风格 - 米白主题 */
:root {
    --cream-white: #f8f4e9;
    --warm-beige: #e8d8c3;
    --soft-brown: #c3a38a;
    --accent-orange: #ff7e5f;
    --dark-charcoal: #33312e;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--cream-white);
    color: var(--dark-charcoal);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 动态背景元素 */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 126, 95, 0.08);
    filter: blur(30px);
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10%, 15%) rotate(5deg); }
    50% { transform: translate(5%, 10%) rotate(-5deg); }
    75% { transform: translate(15%, 5%) rotate(3deg); }
}

/* 链接样式 */
a {
    text-decoration: none;
    color: var(--dark-charcoal);
    transition: var(--transition);
    position: relative;
}

a:hover {
    color: var(--accent-orange);
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-orange);
    transition: var(--transition);
}

a:hover::after {
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 插画风格头部 */
header {
    background-color: rgba(248, 244, 233, 0.9);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(195, 163, 138, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-orange);
    display: flex;
    align-items: center;
}

.logo::before {
    content: '✏️';
    margin-right: 10px;
    font-size: 24px;
}

/* 导航菜单 */
nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
}

nav ul li a:hover {
    background-color: var(--accent-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.3);
}

/* 主要内容区域 */
.main-content {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(195, 163, 138, 0.1);
    border: 1px solid rgba(195, 163, 138, 0.1);
    transition: var(--transition);
}

.main-content:hover {
    box-shadow: 0 15px 40px rgba(195, 163, 138, 0.15);
    transform: translateY(-5px);
}

.section-title {
    font-size: 26px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--warm-beige);
    position: relative;
    color: var(--dark-charcoal);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background-color: var(--accent-orange);
}

/* 插画卡片式文章列表 */
.illustrated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.illustrated-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(195, 163, 138, 0.1);
    border: 1px solid rgba(195, 163, 138, 0.1);
    position: relative;
}

.illustrated-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 15px 30px rgba(195, 163, 138, 0.2);
}

.illustrated-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,126,95,0.05) 100%);
    z-index: 1;
}

.card-illustration {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(195, 163, 138, 0.1);
}

.card-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
    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(--soft-brown);
    margin-top: 15px;
}

/* 分类标签 */
.category-label {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--warm-beige);
    color: var(--dark-charcoal);
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.category-label:hover {
    background-color: var(--accent-orange);
    color: white;
    transform: scale(1.05);
}

/* 文章详情页样式 */
.illustrated-article {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--dark-charcoal);
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-orange);
    border-radius: 2px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--soft-brown);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-illustration {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(195, 163, 138, 0.2);
    border: 1px solid rgba(195, 163, 138, 0.2);
}

.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: 8px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(195, 163, 138, 0.1);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 12px 25px;
    border-radius: 30px;
    background-color: var(--warm-beige);
    color: var(--dark-charcoal);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.pagination a:hover {
    background-color: var(--accent-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.3);
}

.pagination a::before {
    content: '←';
    margin-right: 8px;
}

.pagination a:nth-child(2)::before {
    content: '';
    margin-right: 0;
    margin-left: 8px;
}

.pagination a:nth-child(2)::after {
    content: '→';
}

/* 友情链接 */
.friend-links {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(195, 163, 138, 0.1);
    border: 1px solid rgba(195, 163, 138, 0.1);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-charcoal);
    font-size: 22px;
    display: flex;
    align-items: center;
}

.friend-links h3::before {
    content: '🔗';
    margin-right: 10px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 10px 20px;
    background-color: var(--warm-beige);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.friend-links-container a:hover {
    background-color: var(--accent-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.3);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-charcoal);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: var(--warm-beige);
    border-top: 1px solid rgba(195, 163, 138, 0.2);
}

.copyright {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .illustrated-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .main-content {
        padding: 25px;
    }
}

/* 动态装饰元素 */
.decorative-element {
    position: absolute;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: -1;
    animation: float 15s infinite ease-in-out;
}

.deco-1 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 0 L100 50 L50 100 L0 50 Z" fill="%23ff7e5f"/></svg>');
    top: 10%;
    left: 5%;
}

.deco-2 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="%23c3a38a"/></svg>');
    top: 70%;
    right: 10%;
}

.deco-3 {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 50 Q25 0 50 50 T100 50" fill="%23e8d8c3"/></svg>');
    bottom: 10%;
    left: 20%;
}