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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f5f7fa;
}

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

a:hover {
    color: #2980b9;
}

ul, ol {
    list-style: none;
}

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

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

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

.header-top {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: #333;
    font-size: 20px;
    font-weight: bold;
}

.logo svg {
    margin-right: 10px;
}

.logo span {
    color: #3498db;
}

.search-box {
    width: 300px;
}

.search-box form {
    display: flex;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #3498db;
}

.main-nav {
    background-color: #3498db;
}

.main-nav ul {
    display: flex;
    justify-content: space-between;
}

.main-nav li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.main-nav li a:hover {
    background-color: #2980b9;
}

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

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

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

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

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    z-index: 2;
}

.slide-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.slider-controls {
    position: relative;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.prev, .next {
    position: absolute;
    top: -200px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #3498db;
}

/* 模块通用样式 */
.module {
    padding: 50px 0;
    background-color: #fff;
}

.module:nth-child(even) {
    background-color: #f5f7fa;
}

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

.module-header h1, .module-header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.module-header h1:after, .module-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #3498db;
}

.subtitle {
    color: #777;
    font-size: 16px;
}

/* 卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

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

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

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

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

.card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background-color: #3498db;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.card-content {
    padding: 20px;
}

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

.card-content p {
    color: #777;
    margin-bottom: 15px;
    font-size: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 13px;
    color: #888;
}

.btn-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background-color: #2980b9;
    color: #fff;
}

/* 专题推荐样式 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.topic-item {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.topic-item.reverse {
    flex-direction: row-reverse;
}

.topic-image {
    flex: 0 0 40%;
    overflow: hidden;
}

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

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

.topic-content {
    flex: 0 0 60%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.topic-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.topic-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.topic-tags span {
    padding: 5px 12px;
    background-color: #e1f0fa;
    color: #3498db;
    border-radius: 20px;
    font-size: 12px;
}

/* 排行榜样式 */
.ranking-tabs {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-header {
    display: flex;
    background-color: #f5f7fa;
    border-bottom: 1px solid #eee;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab.active {
    background-color: #fff;
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

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

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

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

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

.rank-image {
    width: 80px;
    height: 120px;
    overflow: hidden;
    border-radius: 5px;
    margin-right: 20px;
}

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

.rank-info {
    flex: 1;
}

.rank-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.rank-info p {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

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

.score {
    color: #f39c12;
    font-weight: bold;
    margin-right: 15px;
}

.views {
    color: #888;
    font-size: 13px;
}

.btn-play {
    padding: 8px 20px;
    background-color: #3498db;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-play:hover {
    background-color: #2980b9;
    color: #fff;
}

/* 文章样式 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-item.reverse {
    flex-direction: row-reverse;
}

.article-image {
    flex: 0 0 30%;
    overflow: hidden;
}

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

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

.article-content {
    flex: 0 0 70%;
    padding: 30px;
}

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

.article-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* APP下载样式 */
.app-download {
    background-color: #3498db;
    color: #fff;
    padding: 70px 0;
}

.app-content {
    display: flex;
    align-items: center;
}

.app-info {
    flex: 0 0 50%;
    padding-right: 30px;
}

.app-info h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.app-desc {
    font-size: 18px;
    margin-bottom: 30px;
}

.app-features {
    margin-bottom: 30px;
}

.app-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-icon {
    margin-right: 10px;
    font-size: 18px;
}

.app-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-download {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    background-color: #fff;
    color: #3498db;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background-color: #f1f1f1;
    color: #2980b9;
}

.download-icon {
    margin-right: 10px;
    font-size: 20px;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
}

.app-image {
    flex: 0 0 50%;
    text-align: center;
}

.app-image img {
    max-width: 80%;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 友情链接样式 */
.friend-links {
    padding: 40px 0;
    background-color: #f5f7fa;
}

.friend-links h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
}

.links-container ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.links-container li, .links-container a {
    color: #666;
    transition: all 0.3s ease;
}

.links-container li:hover, .links-container a:hover {
    color: #3498db;
}

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

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

.footer-logo {
    flex: 0 0 100%;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.footer-logo svg {
    margin-right: 10px;
}

.footer-logo span {
    font-size: 20px;
    font-weight: bold;
}

.footer-nav {
    flex: 0 0 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-nav-col {
    flex: 0 0 23%;
    margin-bottom: 20px;
}

.footer-nav-col h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #3498db;
}

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

.footer-nav-col ul li a {
    color: #bdc3c7;
    transition: all 0.3s ease;
}

.footer-nav-col ul li a:hover {
    color: #3498db;
}

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

.copyright {
    margin-bottom: 15px;
}

.copyright p {
    color: #bdc3c7;
    font-size: 14px;
    margin-bottom: 5px;
}

.footer-statement {
    color: #95a5a6;
    font-size: 13px;
    max-width: 800px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .card-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topic-item, .article-item {
        flex-direction: column;
    }
    
    .topic-item.reverse, .article-item.reverse {
        flex-direction: column;
    }
    
    .topic-image, .article-image {
        flex: 0 0 100%;
        height: 250px;
    }
    
    .topic-content, .article-content {
        flex: 0 0 100%;
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .app-info, .app-image {
        flex: 0 0 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .footer-nav-col {
        flex: 0 0 48%;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav li {
        flex: 0 0 50%;
        text-align: center;
    }
    
    .slider {
        height: 300px;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .footer-nav-col {
        flex: 0 0 100%;
    }
}

@media (max-width: 576px) {
    .header-top .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .main-nav li {
        flex: 0 0 100%;
    }
    
    .slider {
        height: 250px;
    }
    
    .slide-content h2 {
        font-size: 22px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .module-header h1, .module-header h2 {
        font-size: 26px;
    }
    
    .app-buttons {
        flex-direction: column;
    }
}
