/* 基本样式重置 */
* {
    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;
}

a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

a:hover {
    color: #e74c3c;
}

ul, ol {
    list-style: none;
}

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

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

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

.logo {
    float: left;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #fff;
}

.logo .slogan {
    font-size: 14px;
    color: #ecf0f1;
}

#main-nav {
    float: right;
    margin-top: 10px;
}

#main-nav ul {
    display: flex;
}

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

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

#main-nav a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 清除浮动 */
.container:after {
    content: "";
    display: table;
    clear: both;
}

/* Banner样式 */
.banner {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('{模板路径}/static/picture/d1.jpg') no-repeat center center;
    background-size: cover;
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
}

.banner h2 {
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #c0392b;
}

/* 通用区块样式 */
.section {
    padding: 60px 0;
    background-color: #fff;
}

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

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

.section-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

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

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

/* 卡片样式 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.card {
    flex: 0 0 calc(25% - 30px);
    margin: 0 15px 30px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.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: 8px;
    color: #2c3e50;
}

.card-content p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.card-content .desc {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* 排行榜样式 */
.ranking-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.ranking-box {
    flex: 0 0 calc(50% - 30px);
    margin: 0 15px 30px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.ranking-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ranking-list li {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.ranking-list .rank {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    color: #555;
}

.ranking-list li:nth-child(1) .rank,
.ranking-list li:nth-child(2) .rank,
.ranking-list li:nth-child(3) .rank {
    background-color: #e74c3c;
    color: #fff;
}

.ranking-list .title {
    flex: 1;
    line-height: 30px;
}

.ranking-list .score {
    width: 50px;
    line-height: 30px;
    text-align: right;
    color: #e74c3c;
    font-weight: bold;
}

/* 新闻资讯样式 */
.news-container {
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

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

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

.news-meta {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.news-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* 页脚样式 */
#footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 0 0 25%;
    padding-right: 20px;
}

.footer-logo h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-nav,
.footer-category,
.footer-contact {
    flex: 0 0 25%;
    padding: 0 20px;
}

.footer-content h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-content h4:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #e74c3c;
}

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

.footer-content a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #fff;
}

.social-links {
    margin-top: 15px;
}

.social-link {
    display: inline-block;
    margin-right: 15px;
    color: #bdc3c7;
}

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

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .card {
        flex: 0 0 calc(33.333% - 30px);
    }
}

@media (max-width: 768px) {
    .logo {
        float: none;
        text-align: center;
        margin-bottom: 15px;
    }
    
    #main-nav {
        float: none;
        text-align: center;
    }
    
    #main-nav ul {
        justify-content: center;
    }
    
    .card {
        flex: 0 0 calc(50% - 30px);
    }
    
    .ranking-box {
        flex: 0 0 calc(100% - 30px);
    }
    
    .footer-logo,
    .footer-nav,
    .footer-category,
    .footer-contact {
        flex: 0 0 50%;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .banner h2 {
        font-size: 32px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .search-box button {
        border-radius: 4px;
        width: 100%;
        padding: 12px 0;
    }
    
    .card {
        flex: 0 0 calc(100% - 30px);
    }
    
    .footer-logo,
    .footer-nav,
    .footer-category,
    .footer-contact {
        flex: 0 0 100%;
    }
}
