/* 插画风格主题 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --background-color: #F7FFF7;
    --card-color: #FFFFFF;
    --text-color: #292F36;
    --border-radius: 16px;
    --shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    --hand-drawn-border: 2px dashed var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Neue', cursive, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="3" fill="%23FF6B6B" opacity="0.2"/><circle cx="50" cy="50" r="2" fill="%234ECDC4" opacity="0.2"/><circle cx="80" cy="30" r="4" fill="%23FFE66D" opacity="0.2"/></svg>');
    background-size: 200px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
    font-weight: 700;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline wavy;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手绘风格头部 */
header {
    background-color: var(--card-color);
    padding: 25px 0;
    margin-bottom: 30px;
    border-bottom: var(--hand-drawn-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    position: relative;
    display: inline-block;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    transform: skewX(-15deg);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-wrap: wrap;
}

nav ul li a {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: var(--accent-color);
    color: var(--text-color);
    box-shadow: var(--shadow);
    border: 2px solid var(--text-color);
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* 主要内容区域 - 手绘卡片 */
.main-content {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    border: 2px solid var(--text-color);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    border-radius: 50%;
    z-index: -1;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px dotted var(--primary-color);
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '✏️';
    position: absolute;
    right: -35px;
    top: 0;
}

/* 插画风格文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.article-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 2px solid var(--text-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.1);
}

.article-card::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    border-radius: 50%;
    z-index: -1;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--text-color);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 15px;
}

/* 分类标签 - 手绘风格 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--text-color);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--primary-color);
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-color);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 3px solid var(--text-color);
}

.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: -5px;
    color: var(--secondary-color);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border: 2px solid var(--text-color);
    box-shadow: var(--shadow);
}

/* 手绘风格分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 30px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--text-color);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* 友情链接 - 便利贴风格 */
.friend-links {
    background-color: var(--accent-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 40px 0;
    box-shadow: var(--shadow);
    border: 2px solid var(--text-color);
    position: relative;
    transform: rotate(1deg);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 22px;
    text-decoration: underline wavy var(--primary-color);
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: var(--card-color);
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--text-color);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 手绘风格页脚 */
footer {
    background-color: var(--primary-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: var(--hand-drawn-border);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background-color: var(--primary-color);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.copyright {
    font-size: 14px;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        gap: 10px;
    }
    
    .friend-links {
        transform: rotate(0deg);
    }
}