/* 插画风格全局样式 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --background-color: #FFF8F0;
    --text-color: #3D3D3D;
    --light-color: #FFFFFF;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --hand-drawn-border: 2px solid var(--text-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Neue', cursive, 'Segoe UI', Tahoma, Geneva, Verdana, 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"><path d="M10,10 Q15,5 20,10 T30,10 T40,10 T50,10 T60,10 T70,10 T80,10 T90,10" stroke="%23FF6B6B" fill="none" stroke-width="0.5" opacity="0.2"/></svg>');
}

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;
    text-decoration-style: wavy;
    text-decoration-color: var(--accent-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手绘风格按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-sm);
    border: var(--hand-drawn-border);
    font-weight: 700;
    box-shadow: var(--shadow);
    position: relative;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px) rotate(2deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* 头部样式 - 插画风格 */
header {
    background-color: var(--light-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: var(--hand-drawn-border);
}

.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 0 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: 20px;
    background-color: var(--light-color);
    border: var(--hand-drawn-border);
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: rotate(-3deg);
}

/* 主要内容区域 */
.main-content {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: var(--hand-drawn-border);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 50%;
    z-index: -1;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px dashed var(--primary-color);
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: "✨";
    position: absolute;
    right: 0;
    top: 0;
}

/* 卡片式文章列表 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: var(--hand-drawn-border);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.article-card::after {
    content: "";
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    z-index: -1;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: var(--hand-drawn-border);
}

.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;
    flex-wrap: wrap;
    gap: 10px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
    border: var(--hand-drawn-border);
    font-weight: 700;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.article-header::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--primary-color);
    text-shadow: 2px 2px 0 var(--accent-color);
}

.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: var(--hand-drawn-border);
}

.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-sm);
    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(--light-color);
    border: var(--hand-drawn-border);
    transition: all 0.3s;
    font-weight: 700;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(-3deg);
}

/* 友情链接 */
.friend-links {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: var(--hand-drawn-border);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 16px;
    background-color: var(--light-color);
    border-radius: 20px;
    font-size: 14px;
    border: var(--hand-drawn-border);
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: rotate(3deg);
}

/* 页脚样式 */
footer {
    background-color: var(--light-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    border-top: var(--hand-drawn-border);
}

.copyright {
    font-size: 14px;
    color: var(--text-color);
}

/* 响应式设计 */
@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;
    }
    
    .main-content {
        padding: 20px;
    }
}

/* 插画风格装饰元素 */
.decorative-dots {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, var(--primary-color) 20%, transparent 20%);
    background-size: 10px 10px;
    opacity: 0.1;
    z-index: -1;
}

.decorative-dots-1 {
    top: 10%;
    left: 5%;
}

.decorative-dots-2 {
    bottom: 10%;
    right: 5%;
}

/* 动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}