/* 青春风格主题 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --light-color: #F7FFF7;
    --dark-color: #292F36;
    --text-color: #333;
    --card-bg: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #F7F7F7;
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

a:hover {
    color: var(--dark-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 青春风格头部 */
header {
    background-color: var(--light-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin-right: 10px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav ul li a {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    background-color: transparent;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 主要内容区域 */
.main-content {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.main-content:hover {
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
    color: var(--dark-color);
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* 青春风格文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-top: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
}

.card-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* 文章详情页 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.article-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: #666;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 20px;
    border-radius: 30px;
    background-color: white;
    border: 2px solid var(--secondary-color);
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* 友情链接 */
.friend-links {
    background-color: var(--light-color);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 20px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 15px;
    background-color: white;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--secondary-color);
    color: var(--dark-color);
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: white;
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式设计 */
@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: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
}

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.article-card:hover {
    animation: float 1.5s ease-in-out infinite;
}