/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

a {
    text-decoration: none;
    color: #e74c3c;
    transition: all 0.3s ease;
}

a:hover {
    color: #c0392b;
}

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

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.btn:hover {
    background-color: #c0392b;
    color: #fff;
}

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

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

.logo h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav ul li a {
    color: #ecf0f1;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav ul li a:hover {
    background-color: #34495e;
    color: #fff;
}

/* 轮播图样式 */
.banner {
    padding: 20px 0;
    background-color: #f9f9f9;
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.slide {
    position: relative;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slide-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: #fff;
}

.slide-info h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.slide-info p {
    font-size: 16px;
    opacity: 0.9;
}

/* 通用区块样式 */
.section {
    padding: 50px 0;
    background-color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section:nth-child(even) {
    background-color: #f9f9f9;
}

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

.section-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #e74c3c;
}

.section-header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* 卡片容器样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.card-content p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
    height: 45px;
    overflow: hidden;
}

/* 文章样式 */
.article {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 30px;
}

.article h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.article p {
    color: #34495e;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

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

.ranking-column h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
}

.ranking-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #e74c3c;
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 15px;
}

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

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

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

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

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

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

.rank-info p {
    font-size: 14px;
    color: #7f8c8d;
}

/* 编辑推荐样式 */
.recommendation-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.recommendation-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.recommendation-image {
    height: 100%;
}

.recommendation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommendation-content {
    padding: 20px;
}

.recommendation-content h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.star {
    color: #f1c40f;
    margin-right: 10px;
}

.score {
    color: #e74c3c;
    font-weight: bold;
}

.recommendation-desc {
    color: #34495e;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 底部样式 */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
}

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

.footer-logo {
    flex: 1;
}

.footer-logo p {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.footer-nav {
    flex: 2;
    display: flex;
    justify-content: space-around;
}

.footer-nav-column h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-nav-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #e74c3c;
}

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

.footer-nav-column ul li a {
    color: #bdc3c7;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-nav-column ul li a:hover {
    color: #e74c3c;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

.footer-bottom p {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 5px;
}

.footer-bottom a {
    color: #bdc3c7;
}

.footer-bottom a:hover {
    color: #e74c3c;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .recommendation-item {
        grid-template-columns: 1fr;
    }
    
    .recommendation-image {
        height: 250px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-nav-column {
        text-align: center;
    }
    
    .footer-nav-column h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .ranking-container {
        grid-template-columns: 1fr;
    }
    
    .slide img {
        height: 300px;
    }
    
    .slide-info h2 {
        font-size: 20px;
    }
    
    .slide-info p {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .main-nav ul {
        gap: 10px;
    }
    
    .main-nav ul li a {
        font-size: 14px;
        padding: 3px 8px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .slide img {
        height: 200px;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
}