* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-pink: #ff7eb9;
    --light-pink: #ffc2e0;
    --white: #ffffff;
    --light-gray: #f8f8f8;
    --text-dark: #333333;
    --shadow: 0 4px 12px rgba(255, 126, 185, 0.15);
    --hero-title-color: #ffffff;
    --hero-text-color: #f0f0f0;
    --hero-font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    --hero-text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1px;
    font-weight: bold;
    color: var(--primary-pink);
}

.logo i {
    margin-right: 8px;
    font-size: 28px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-pink);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-pink);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
}

.search-box {
    position: relative;
    margin-right: 20px;
}

.search-box input {
    padding: 8px 15px 8px 35px;
    border: 1px solid var(--light-pink);
    border-radius: 20px;
    outline: none;
    transition: all 0.3s;
    width: 180px;
}

.search-box input:focus {
    border-color: var(--primary-pink);
    width: 220px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-pink);
}

.user-actions button {
    background-color: var(--primary-pink);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.user-actions button:hover {
    background-color: var(--light-pink);
    color: var(--text-dark);
}

/* 主视觉区域 */
.hero {
    position: relative;
    margin-bottom: 50px;
    border-radius: 0 0 30px 30px;
    width: min(90%, 1200px);
    margin-inline: auto;
    overflow: hidden; /* 确保圆角生效 */
}

.hero-image {
    width: 100%;
    height: 300px; /* 根据需要调整高度 */
    object-fit: cover; /* 保持图片比例并覆盖整个区域 */
    display: block;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
}

.container {
    width: min(90%, 1200px);
    margin-inline: auto;
    padding-inline: 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: var(--hero-font-family);
    color: var(--hero-title-color);
    font-weight: 700;
    text-shadow: var(--hero-text-shadow);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-family: var(--hero-font-family);
    color: var(--hero-text-color);
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--primary-pink);
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* 内容区域 */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--primary-pink);
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-pink);
}

/* 文章区域 */
.article-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.main-article {
    flex: 2;
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-image {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 防止图片溢出 */
    border-radius: 8px; /* 可选：圆角 */
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：保持比例并覆盖整个区域 */
    display: block;
}

.article-content {
    padding: 30px;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.article-meta {
    display: flex;
    margin-bottom: 20px;
    color: #888;
    font-size: 0.9rem;
}

.article-meta span {
    margin-right: 20px;
}

.article-meta i {
    margin-right: 5px;
    color: var(--primary-pink);
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    color: var(--primary-pink);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.read-more:hover {
    transform: translateX(5px);
}

.sidebar {
    flex: 1;
}

.sidebar-widget {
    background-color: var(--white);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    color: var(--primary-pink);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-pink);
}

.popular-list {
    list-style: none;
}

.popular-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-list a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s;
    display: block;
}

.popular-list a:hover {
    color: var(--primary-pink);
}

.popular-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: var(--light-pink);
    color: var(--text-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag:hover {
    background-color: var(--primary-pink);
    color: white;
    cursor: pointer;
}

/* 页脚 */
footer {
    background-color: var(--white);
    padding: 40px 0;
    border-top: 1px solid var(--light-pink);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-column h3 {
    color: var(--primary-pink);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-pink);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--light-pink);
    border-radius: 50%;
    color: var(--primary-pink);
    transition: background-color 0.3s, color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-pink);
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 15px 0;
    }

    .nav-links {
        margin: 20px 0;
    }

    .nav-links li {
        margin: 0 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .article-container {
        flex-direction: column;
    }

    .search-box input {
        width: 150px;
    }
}