/* 全局样式 */
:root {
    --primary-color: #6a5acd;
    --secondary-color: #9370db;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #fff;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px 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);
}

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

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

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

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.section-title h2 {
    font-size: 32px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title p {
    color: var(--light-text);
    font-size: 16px;
}

/* 头部样式 */
#header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

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

#nav ul {
    display: flex;
}

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

#nav a {
    color: var(--text-color);
    font-weight: 500;
}

#nav a:hover {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 轮播图样式 */
.banner {
    margin-top: 70px;
    padding: 0;
}

.swiper-container {
    width: 100%;
    height: 500px;
}

.swiper-slide {
    position: relative;
}

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

.slide-info {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: white;
    max-width: 500px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 4px;
}

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

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color);
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

/* 介绍部分样式 */
.intro {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.intro-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.intro-text {
    flex: 1;
}

.intro-text p {
    margin-bottom: 20px;
}

.intro-text ul {
    margin-left: 20px;
}

.intro-text li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.intro-text li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.intro-image {
    flex: 1;
}

.intro-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* 动漫列表样式 */
.anime-list {
    padding: 80px 0;
}

.anime-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

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

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

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

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

.card-image .episode, .card-image .status {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.card-info p {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--light-text);
    font-size: 12px;
}

/* 推荐部分样式 */
.recommend {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.recommend-content {
    display: flex;
    gap: 30px;
}

.featured-anime {
    flex: 2;
    display: flex;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-anime img {
    width: 40%;
    object-fit: cover;
}

.featured-info {
    padding: 30px;
    flex: 1;
}

.featured-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.rating {
    margin-bottom: 20px;
    font-size: 18px;
}

.rating span {
    color: var(--accent-color);
    font-weight: bold;
}

.desc {
    margin-bottom: 20px;
    color: var(--light-text);
}

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

.tags span {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.recommend-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommend-item {
    display: flex;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.recommend-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
}

.item-info {
    padding: 10px;
    flex: 1;
}

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

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

.score {
    color: var(--accent-color);
    font-weight: bold;
}

/* 资讯部分样式 */
.news {
    padding: 80px 0;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    display: flex;
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.news-image {
    width: 300px;
}

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

.news-content {
    padding: 30px;
    flex: 1;
}

.news-content h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

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

.news-excerpt {
    margin-bottom: 10px;
    color: var(--text-color);
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 500;
}

/* 排行榜样式 */
.ranking {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.ranking-tabs {
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tab-header {
    display: flex;
    background-color: var(--primary-color);
}

.tab {
    padding: 15px 30px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.tab.active {
    background-color: var(--secondary-color);
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

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

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 8px;
    transition: var(--transition);
}

.ranking-item:hover {
    transform: translateX(5px);
    background-color: #f0f0f0;
}

.rank {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

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

.anime-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
}

.info h4 {
    margin-bottom: 5px;
}

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

.views {
    font-size: 12px;
    color: var(--light-text);
    margin-top: 5px;
}

/* 社区部分样式 */
.community {
    padding: 80px 0;
}

.community-content {
    display: flex;
    gap: 30px;
}

.discussion-board {
    flex: 2;
}

.discussion-board h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.discussion-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.discussion-item {
    display: flex;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition);
}

.discussion-item:hover {
    background-color: #f0f0f0;
}

.user-avatar {
    margin-right: 20px;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.discussion-content {
    flex: 1;
}

.user-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.user-info h4 {
    font-size: 16px;
}

.time {
    color: var(--light-text);
    font-size: 12px;
}

.topic {
    font-weight: 500;
    margin-bottom: 10px;
}

.excerpt {
    color: var(--light-text);
    margin-bottom: 10px;
}

.discussion-meta {
    display: flex;
    gap: 20px;
    color: var(--light-text);
    font-size: 12px;
}

.view-more {
    display: block;
    margin: 30px auto 0;
    text-align: center;
    width: 200px;
}

.community-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.community-card {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
}

.community-card h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-list li {
    display: flex;
    align-items: center;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

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

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

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: var(--transition);
}

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

/* 文章部分样式 */
.articles {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.article-item h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

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

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

/* App下载部分样式 */
.app-download {
    padding: 80px 0;
}

.download-content {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    border-radius: 8px;
    overflow: hidden;
    color: white;
}

.download-info {
    flex: 1;
    padding: 40px;
}

.download-info h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.download-info p {
    margin-bottom: 20px;
}

.feature-list {
    margin-bottom: 30px;
}

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

.feature-list i {
    margin-right: 10px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

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

.btn-download:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

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

.qr-code img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.app-preview {
    flex: 1;
}

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

/* 页脚样式 */
#footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-logo {
    flex: 1;
}

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

.footer-links {
    flex: 3;
    display: flex;
    justify-content: space-between;
}

.link-group h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.link-group h3:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.link-group ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-group a {
    color: #adb5bd;
    transition: var(--transition);
}

.link-group a:hover {
    color: white;
}

.social-links a {
    display: flex;
    align-items: center;
}

.social-links i {
    margin-right: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: 12px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .recommend-content {
        flex-direction: column;
    }
    
    .community-content {
        flex-direction: column;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 200px;
    }
    
    .download-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    #header .container {
        flex-wrap: wrap;
    }
    
    #nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    #nav ul {
        justify-content: center;
    }
    
    .swiper-container {
        height: 300px;
    }
    
    .intro-content {
        flex-direction: column;
    }
    
    .featured-anime {
        flex-direction: column;
    }
    
    .featured-anime img {
        width: 100%;
        height: 200px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .link-group {
        width: 45%;
    }
}

@media (max-width: 576px) {
    .section-title h2 {
        font-size: 24px;
    }
    
    .anime-cards {
        grid-template-columns: 1fr;
    }
    
    .discussion-item {
        flex-direction: column;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .link-group {
        width: 100%;
    }
}