/* 插画风格主题变量 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --background-color: #FFF8F0;
    --card-color: #FFFFFF;
    --text-color: #2F2F2F;
    --light-text: #6D6D6D;
    --shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 16px;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Neue', '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="M30,30 Q50,20 70,30 T90,50 Q80,70 70,70 T50,90 Q20,80 30,50 T30,30" fill="none" stroke="%23FFE66D" stroke-width="0.5" 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;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手绘风格头部 */
header {
    background-color: var(--card-color);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 3px dashed var(--accent-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 0 var(--accent-color);
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    padding: 8px 16px;
    border-radius: 50px;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-size: 18px;
}

nav ul li a:hover {
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
}

/* 主要内容区域 */
.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(--accent-color);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 100px;
    height: 100px;
    background-color: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    z-index: -1;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px dotted var(--secondary-color);
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: "✏️";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 24px;
}

/* 插画风格文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.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(--accent-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px dashed var(--accent-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;
    color: var(--text-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--light-text);
    margin-top: 15px;
    align-items: center;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50px;
    font-size: 12px;
    margin-bottom: 10px;
    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;
    left: -20px;
    top: -20px;
    font-size: 40px;
    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: 25px;
    color: var(--light-text);
    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(--accent-color);
}

.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: 2px solid var(--accent-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);
    color: var(--text-color);
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid var(--text-color);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    text-decoration: none;
}

/* 友情链接 */
.friend-links {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 3px dotted var(--secondary-color);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
    text-align: center;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.friend-links-container a {
    padding: 8px 20px;
    background-color: var(--accent-color);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.friend-links-container a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

/* 手绘风格页脚 */
footer {
    background-color: var(--primary-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: white;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background-color: var(--accent-color);
}

.copyright {
    font-size: 16px;
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .logo {
        font-size: 28px;
    }
}

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}