/* 全局样式 */
:root {
    --primary-color: #ff6b81;
    --secondary-color: #7d5fff;
    --accent-color: #ff9ff3;
    --text-color: #333;
    --light-text: #777;
    --bg-color: #fff;
    --bg-light: #f9f9f9;
    --border-color: #eee;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 头部样式 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 24px;
    margin: 0;
}

#main-nav ul {
    display: flex;
}

#main-nav li {
    margin-left: 20px;
}

#main-nav a {
    color: var(--text-color);
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
}

#main-nav a:hover, #main-nav a.active {
    color: var(--primary-color);
    background-color: rgba(255, 107, 129, 0.1);
}

/* 横幅区域 */
.banner {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #fff, #ffebef);
    position: relative;
    overflow: hidden;
}

.banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-content {
    flex: 1;
    padding-right: 50px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--light-text);
}

.banner-buttons {
    display: flex;
    gap: 15px;
}

.banner-image {
    flex: 1;
    max-width: 500px;
}

.banner-image img {
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.banner-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 区块通用样式 */
.section {
    padding: 80px 0;
}

.section.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.section-header p {
    font-size: 18px;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
}

.card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.card-content p {
    color: var(--light-text);
    margin-bottom: 15px;
}

/* 排行榜样式 */
.ranking-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.ranking-column h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
}

.ranking-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.ranking-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 15px;
}

.ranking-list li:nth-child(1) .rank {
    background-color: gold;
    color: #333;
}

.ranking-list li:nth-child(2) .rank {
    background-color: silver;
    color: #333;
}

.ranking-list li:nth-child(3) .rank {
    background-color: #cd7f32;
    color: white;
}

.rank-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.rank-info img {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
    margin-right: 15px;
}

.rank-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.rank-info p {
    font-size: 14px;
    color: var(--light-text);
}

/* 分类样式 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-item {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
}

.category-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category-item h3 {
    font-size: 20px;
    margin: 15px 0 5px;
}

.category-item p {
    color: var(--light-text);
    margin-bottom: 15px;
    padding: 0 15px;
}

.category-item .btn {
    margin-bottom: 20px;
}

/* 文章样式 */
.article-list {
    max-width: 800px;
    margin: 0 auto;
}

.article-item {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
    border-bottom: none;
}

.article-item h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.article-meta {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 页脚样式 */
#footer {
    background-color: #333;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-logo a {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    display: inline-block;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    flex: 2;
}

.footer-column {
    flex: 1;
    min-width: 150px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .banner-content h2 {
        font-size: 36px;
    }
    
    .banner-content p {
        font-size: 18px;
    }
    
    .section-header h2 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    #header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    #main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #main-nav li {
        margin: 5px;
    }
    
    .banner .container {
        flex-direction: column;
    }
    
    .banner-content {
        padding-right: 0;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .banner-buttons {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .banner-content h2 {
        font-size: 28px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .card-grid, .ranking-container, .category-grid {
        grid-template-columns: 1fr;
    }
}
