/* 插画风格浆果红色调主题 */
:root {
    --berry-primary: #B8324B;
    --berry-secondary: #E84A5F;
    --berry-light: #FF847C;
    --berry-accent: #FECEA8;
    --berry-dark: #2A363B;
    --berry-bg: #FFF5F5;
    --hand-drawn-border: 2px dashed var(--berry-primary);
    --sketch-shadow: 4px 4px 0 var(--berry-accent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Neue', 'Marker Felt', 'Segoe UI', cursive, sans-serif;
}

body {
    background-color: var(--berry-bg);
    color: var(--berry-dark);
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(254, 206, 168, 0.2) 0%, transparent 20%);
}

a {
    text-decoration: none;
    color: var(--berry-primary);
    position: relative;
}

a:hover {
    color: var(--berry-secondary);
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--berry-secondary);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手绘风格头部 */
header {
    background-color: white;
    padding: 25px 0;
    border-bottom: var(--hand-drawn-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--sketch-shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--berry-primary);
    text-shadow: 2px 2px 0 var(--berry-accent);
    letter-spacing: 1px;
    font-family: 'Comic Neue', cursive;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    background-color: rgba(254, 206, 168, 0.3);
    border: 1.5px solid var(--berry-primary);
}

nav ul li a:hover {
    background-color: var(--berry-primary);
    color: white;
}

/* 主要内容区域 - 手绘卡片风格 */
.main-content {
    background-color: white;
    padding: 30px;
    margin: 40px 0;
    border-radius: 15px;
    border: var(--hand-drawn-border);
    box-shadow: var(--sketch-shadow);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23B8324B"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></svg>');
    background-size: contain;
    opacity: 0.1;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px dotted var(--berry-light);
    color: var(--berry-primary);
    font-family: 'Comic Neue', cursive;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--berry-primary), transparent);
}

/* 插画风格文章网格 */
.illustration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.illustration-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 2px solid var(--berry-primary);
    position: relative;
}

.illustration-card:hover {
    transform: rotate(-2deg) scale(1.03);
}

.illustration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background-color: var(--berry-primary);
}

.card-illustration {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px dashed var(--berry-light);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--berry-dark);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--berry-secondary);
    margin-top: 15px;
    font-weight: 600;
}

/* 分类标签 - 手绘风格 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--berry-accent);
    color: var(--berry-dark);
    border-radius: 15px;
    font-size: 14px;
    margin-bottom: 15px;
    border: 1.5px solid var(--berry-primary);
    font-weight: 600;
}

/* 文章详情页样式 */
.illustration-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(--berry-primary);
    font-family: 'Comic Neue', cursive;
    text-shadow: 2px 2px 0 var(--berry-accent);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--berry-secondary);
    margin-bottom: 25px;
    flex-wrap: wrap;
    font-weight: 600;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    border: var(--hand-drawn-border);
    box-shadow: var(--sketch-shadow);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
}

.article-content p {
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.article-content p::before {
    content: '✏️';
    position: absolute;
    left: -10px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    border: var(--hand-drawn-border);
}

/* 分页导航 - 手绘按钮 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 30px;
    background-color: var(--berry-accent);
    color: var(--berry-dark);
    border: 2px solid var(--berry-primary);
    transition: all 0.3s;
    font-weight: 600;
}

.pagination a:hover {
    background-color: var(--berry-primary);
    color: white;
    transform: rotate(-3deg);
}

/* 友情链接 - 手绘便签风格 */
.friend-links {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0;
    border: var(--hand-drawn-border);
    box-shadow: var(--sketch-shadow);
    position: relative;
}

.friend-links::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--berry-accent);
    border-radius: 50%;
    z-index: -1;
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--berry-primary);
    font-size: 24px;
    font-family: 'Comic Neue', cursive;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: var(--berry-accent);
    border-radius: 20px;
    font-size: 14px;
    border: 1.5px solid var(--berry-primary);
    font-weight: 600;
}

.friend-links-container a:hover {
    background-color: var(--berry-primary);
    color: white;
}

/* 页脚样式 - 手绘波浪线 */
footer {
    background-color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 2px dashed var(--berry-primary);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,32,66.2,0.15,129.56-16.88,182-48.32,58.44-35.86,114.84-98.29,172-98.29,57.52,0,110.18,62.24,172,62.24,57.12,0,102.43-31.76,158-31.76,57.12,0,100.88,31.76,158,31.76,57.12,0,102.43-31.76,158-31.76,57.12,0,100.88,31.76,158,31.76V0Z" opacity=".25" fill="%23B8324B"></path></svg>');
    background-size: 100% 100%;
}

.copyright {
    font-size: 16px;
    color: var(--berry-dark);
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .illustration-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        gap: 15px;
    }
}