/* 插画风格全局样式 */
:root {
    --primary-color: #a4c639;  /* 抹茶拿铁绿 */
    --secondary-color: #d4a373; /* 奶油焦糖 */
    --accent-color: #6b8e23;   /* 橄榄绿 */
    --light-color: #f8f4e9;    /* 奶油纸色 */
    --dark-color: #4a3a2f;     /* 深咖啡 */
    --shadow: 0 4px 8px rgba(74, 58, 47, 0.15);
    --illustration-border: 2px dashed var(--dark-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Neue', cursive, 'Segoe UI', Tahoma, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-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,10 Q50,5 70,10 T90,30 Q95,50 90,70 T70,90 Q50,95 30,90 T10,70 Q5,50 10,30 T30,10" fill="none" stroke="%23d4a373" stroke-width="0.5" opacity="0.2"/></svg>');
}

a {
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: var(--primary-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手绘风格头部 */
header {
    background-color: var(--light-color);
    padding: 25px 0;
    border-bottom: var(--illustration-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 0 rgba(74, 58, 47, 0.1);
    font-family: 'Pacifico', cursive;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    background-color: rgba(164, 198, 57, 0.2);
    border: 1px solid var(--primary-color);
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(-2deg);
}

/* 插画风格主要内容 */
.main-content {
    background-color: white;
    padding: 30px;
    margin: 30px 0;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: var(--illustration-border);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px dotted var(--secondary-color);
    color: var(--dark-color);
    font-family: 'Patrick Hand', cursive;
    position: relative;
}

.section-title::after {
    content: "✏️";
    position: absolute;
    right: 0;
    bottom: -5px;
    font-size: 20px;
}

/* 手绘风格文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: var(--illustration-border);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 10px 20px rgba(74, 58, 47, 0.2);
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(164,198,57,0.1) 0%, rgba(212,163,115,0.1) 100%);
    z-index: -1;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: var(--illustration-border);
    filter: sepia(20%);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Patrick Hand', cursive;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--secondary-color);
    margin-top: 15px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 3px 12px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.article-header::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--dark-color);
    font-family: 'Patrick Hand', cursive;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 30px;
    border: var(--illustration-border);
    box-shadow: var(--shadow);
    filter: sepia(15%);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
}

.article-content p {
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.article-content p::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 24px;
    line-height: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    border: var(--illustration-border);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 30px;
    background-color: rgba(164, 198, 57, 0.2);
    border: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* 友情链接 */
.friend-links {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: var(--illustration-border);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 22px;
    font-family: 'Patrick Hand', cursive;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: rgba(212, 163, 115, 0.2);
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--secondary-color);
}

.friend-links-container a:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* 手绘风格页脚 */
footer {
    background-color: var(--dark-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: var(--illustration-border);
    color: var(--light-color);
}

.copyright {
    font-size: 14px;
    font-family: 'Patrick Hand', cursive;
}

/* 响应式设计 */
@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: 15px;
    }
}

/* 插画风格装饰元素 */
.decorative-circle {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px dashed var(--secondary-color);
    opacity: 0.3;
    z-index: -1;
}

.decorative-circle-1 {
    top: 10%;
    left: 5%;
}

.decorative-circle-2 {
    bottom: 15%;
    right: 5%;
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.article-card:hover {
    animation: float 1.5s ease-in-out infinite;
}