/* 喜庆风格全局样式 */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --dark-color: #c0392b;
    --light-color: #fef5e7;
    --text-color: #333;
    --accent-color: #f1c40f;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.7;
    background-image: linear-gradient(to bottom, rgba(254, 245, 231, 0.9), rgba(254, 245, 231, 0.9)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="10" y="50" font-family="Arial" font-size="40" fill="rgba(231, 76, 60, 0.05)">福</text></svg>');
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--dark-color);
    transform: translateY(-2px);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 喜庆头部样式 */
header {
    background-color: var(--primary-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 4px solid var(--accent-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 10px;
    border-radius: var(--border-radius);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    color: white;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

nav ul li a:hover {
    background-color: white;
    color: var(--primary-color);
    transform: scale(1.05);
}

nav ul li a::before {
    content: "❀";
    margin-right: 8px;
    font-size: 14px;
}

/* 灯笼装饰元素 */
.lantern {
    position: absolute;
    width: 40px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50% 50% 10px 10px;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.7);
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.lantern::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: -5px;
    left: 15px;
}

/* 主要内容区域 */
.main-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid rgba(231, 76, 60, 0.2);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="10" y="60" font-family="Arial" font-size="60" fill="rgba(231, 76, 60, 0.1)">囍</text></svg>');
    opacity: 0.3;
}

.section-title {
    font-size: 26px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--secondary-color);
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "✨";
    position: absolute;
    right: -30px;
    top: 0;
}

/* 卡片式文章列表 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.article-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.1);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 20px rgba(231, 76, 60, 0.2);
}

.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;
    border-bottom: 1px solid rgba(231, 76, 60, 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(--text-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--primary-color);
    margin-top: 15px;
}

/* 分类标签 */
.category-tag {
    display: inline-block;
    padding: 3px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
    padding: 20px;
    background-color: rgba(231, 76, 60, 0.05);
    border-radius: var(--border-radius);
    border: 1px dashed var(--primary-color);
}

.article-title {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    flex-wrap: wrap;
    font-weight: bold;
}

.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 white;
    outline: 2px solid var(--secondary-color);
}

.article-content {
    line-height: 1.9;
    font-size: 17px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 25px;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.pagination a:hover {
    background-color: var(--dark-color);
    transform: scale(1.05);
}

.pagination a::before {
    content: "←";
    margin-right: 8px;
}

.pagination a:last-child::before {
    content: "";
    margin-right: 0;
}

.pagination a:last-child::after {
    content: "→";
    margin-left: 8px;
}

/* 友情链接 */
.friend-links {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.friend-links h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 22px;
    display: flex;
    align-items: center;
}

.friend-links h3::before {
    content: "🔗";
    margin-right: 10px;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-links-container a {
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    transition: var(--transition);
}

.friend-links-container a:hover {
    background-color: var(--dark-color);
    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;
    width: 100%;
    height: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color), var(--primary-color));
}

.copyright {
    font-size: 14px;
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .section-title::after {
        display: none;
    }
}