/* 插画风格主题 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --background-color: #F7FFF7;
    --card-color: #FFFFFF;
    --text-color: #292F36;
    --shadow: 4px 4px 0px rgba(41, 47, 54, 0.2);
    --border-radius: 16px;
}

* {
    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: radial-gradient(circle at 10% 20%, rgba(255, 214, 214, 0.2) 0%, transparent 20%),
                      radial-gradient(circle at 90% 80%, rgba(206, 236, 255, 0.2) 0%, transparent 20%);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手绘风格头部 */
header {
    background-color: var(--card-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--text-color);
}

.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 var(--accent-color);
    letter-spacing: -1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

nav ul li a {
    padding: 8px 16px;
    border-radius: 50px;
    background-color: var(--accent-color);
    border: 2px solid var(--text-color);
    box-shadow: 2px 2px 0px var(--text-color);
}

nav ul li a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px var(--text-color);
    text-decoration: none;
}

/* 主要内容区域 */
.main-content {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 3px solid var(--text-color);
    position: relative;
    overflow: hidden;
}

.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 dashed var(--primary-color);
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: "✨";
    position: absolute;
    right: -30px;
    top: -10px;
}

/* 卡片式文章列表 */
.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;
    border: 3px solid var(--text-color);
    box-shadow: var(--shadow);
    position: relative;
}

.article-card:hover {
    transform: translate(-5px, -5px);
    box-shadow: 8px 8px 0px var(--text-color);
}

.article-card::before {
    content: "";
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--text-color);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    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(--text-color);
    margin-top: 15px;
    font-weight: 700;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 12px;
    margin-bottom: 10px;
    border: 2px solid var(--text-color);
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.article-detail::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.2;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-color);
    margin-bottom: 25px;
    flex-wrap: wrap;
    font-weight: 700;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border: 3px solid var(--text-color);
    box-shadow: var(--shadow);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border: 3px solid var(--text-color);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 50px;
    background-color: var(--accent-color);
    border: 3px solid var(--text-color);
    box-shadow: var(--shadow);
    font-weight: 700;
    transition: all 0.3s ease;
}

.pagination a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--text-color);
}

/* 友情链接 */
.friend-links {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 3px solid var(--text-color);
}

.friend-links h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 16px;
    background-color: var(--secondary-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--text-color);
    box-shadow: 2px 2px 0px var(--text-color);
}

.friend-links-container a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px var(--text-color);
}

/* 页脚样式 */
footer {
    background-color: var(--text-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: var(--background-color);
    border-top: 3px solid var(--primary-color);
}

.copyright {
    font-size: 16px;
    font-weight: 700;
}

/* 响应式设计 */
@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;
    }
}