/* 插画风格全局样式 */
:root {
    --primary-color: #a4c3b2; /* 抹茶拿铁绿 */
    --secondary-color: #cce3de;
    --accent-color: #6b9080;
    --background-color: #f6fff8;
    --card-color: #ffffff;
    --text-color: #2b2d42;
    --light-text: #5e6e5e;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --illustration-bg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f6fff8"/><path d="M0,50 Q25,30 50,50 T100,50" stroke="%23a4c3b2" fill="none" stroke-width="0.5"/><path d="M0,60 Q25,40 50,60 T100,60" stroke="%23a4c3b2" fill="none" stroke-width="0.5"/><path d="M0,70 Q25,50 50,70 T100,70" stroke="%23a4c3b2" fill="none" stroke-width="0.5"/></svg>');
}

* {
    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);
    background-image: var(--illustration-bg);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-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;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.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);
    font-family: 'Comic Neue', cursive;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    background-color: var(--card-color);
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* 插画风格主要内容 */
.main-content {
    background-color: var(--card-color);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    transform: rotate(45deg);
    z-index: -1;
    opacity: 0.3;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px dashed var(--primary-color);
    color: var(--accent-color);
    font-family: 'Comic Neue', cursive;
    position: relative;
}

.section-title::after {
    content: "✏️";
    position: absolute;
    right: 0;
    top: 0;
}

/* 手绘卡片风格 */
.illustration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.illustration-card {
    background-color: var(--card-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
    position: relative;
}

.illustration-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.illustration-card::after {
    content: "";
    position: absolute;
    bottom: -15px;
    right: 10px;
    width: 90%;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    filter: blur(10px);
    z-index: -1;
    transition: all 0.3s ease;
}

.illustration-card:hover::after {
    transform: scale(0.95);
    opacity: 0.7;
}

.card-illustration {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px dashed var(--primary-color);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Comic Neue', cursive;
}

.card-excerpt {
    color: var(--light-text);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 15px;
    font-weight: 600;
}

/* 分类标签 */
.category-label {
    display: inline-block;
    padding: 3px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: 700;
    border: 1px solid var(--accent-color);
}

/* 文章详情页 */
.illustration-article {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-color);
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
    position: relative;
}

.illustration-article::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed var(--primary-color);
    border-radius: 8px;
    pointer-events: none;
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-title {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--accent-color);
    font-family: 'Comic Neue', cursive;
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: rotate(-1deg);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--light-text);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 3px solid var(--primary-color);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
}

.article-content {
    line-height: 1.8;
    font-size: 18px;
}

.article-content p {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 2px solid var(--secondary-color);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid var(--primary-color);
}

/* 手绘风格分页 */
.illustration-pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.illustration-pagination a {
    padding: 10px 20px;
    border-radius: 30px;
    background-color: var(--card-color);
    border: 2px solid var(--primary-color);
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.illustration-pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
    text-decoration: none;
}

/* 友情链接 */
.friend-links {
    background-color: var(--card-color);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-color);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 24px;
    font-family: 'Comic Neue', cursive;
    text-align: center;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.friend-links-container a {
    padding: 8px 20px;
    background-color: var(--secondary-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* 手绘风格页脚 */
footer {
    background-color: var(--card-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -5px 10px rgba(0,0,0,0.05);
}

.copyright {
    font-size: 14px;
    color: var(--light-text);
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .illustration-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .illustration-article {
        padding: 30px 20px;
    }
}

/* 手绘风格装饰元素 */
.decorative-circle {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px dashed var(--primary-color);
    opacity: 0.3;
    z-index: -1;
}

.decorative-circle-1 {
    top: 10%;
    left: 5%;
}

.decorative-circle-2 {
    bottom: 15%;
    right: 5%;
    width: 150px;
    height: 150px;
}