/* 青春风格全局样式 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --background-color: #F7FFF7;
    --card-color: #FFFFFF;
    --text-color: #292F36;
    --light-text: #6B7A8F;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: var(--primary-color);
    color: white;
}

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(--secondary-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 青春风格头部 */
header {
    background-color: var(--card-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav ul li a {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s;
    transform: translateX(-50%);
}

nav ul li a:hover::after {
    width: 60%;
}

/* 青春风格主要内容 */
.main-content {
    background-color: var(--card-color);
    border-radius: var(--radius);
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent-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-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .card-image {
    transform: scale(1.05);
}

.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;
}

.card-excerpt {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--light-text);
    margin-top: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 青春风格文章详情 */
.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;
    position: relative;
    display: inline-block;
}

.article-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--light-text);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

/* 青春风格分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 18px;
    border-radius: 50%;
    background-color: var(--card-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* 青春风格友情链接 */
.friend-links {
    background-color: var(--card-color);
    border-radius: var(--radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.friend-links h3 {
    margin-bottom: 20px;
    font-size: 22px;
    position: relative;
}

.friend-links h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 16px;
    background-color: var(--background-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.friend-links-container a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* 青春风格页脚 */
footer {
    background-color: var(--text-color);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    color: white;
}

.copyright {
    font-size: 14px;
}

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-element {
    animation: float 3s ease-in-out infinite;
}

/* 响应式设计 */
@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;
    }
    
    .pagination a {
        padding: 8px 14px;
    }
}