/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    background-color: #e53935;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c62828;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 60px;
    height: 3px;
    background-color: #e53935;
}

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
}

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

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #e53935;
}

.nav-links ul {
    display: flex;
}

.nav-links ul li {
    margin-left: 30px;
}

.nav-links ul li a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links ul li a:hover,
.nav-links ul li a.active {
    color: #e53935;
}

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

.search-bar input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    width: 200px;
}

.search-bar button {
    padding: 8px 15px;
    background-color: #e53935;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 轮播图 */
.hero-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin-top: 20px;
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
}

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

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.slide-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

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

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 漫画分类 */
.comic-categories {
    padding: 60px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-item {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 200px;
}

.category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-item:hover img {
    transform: scale(1.1);
}

.category-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    text-align: center;
    font-weight: bold;
}

/* 热门推荐 */
.featured-comics {
    padding: 60px 0;
    background-color: white;
}

.comics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.comic-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.comic-card:hover {
    transform: translateY(-5px);
}

.comic-cover {
    position: relative;
    height: 300px;
}

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

.comic-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e53935;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 14px;
}

.comic-info {
    padding: 15px;
}

.comic-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comic-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
}

.comic-chapter {
    color: #e53935;
    font-weight: 500;
}

/* 最新更新 */
.latest-updates {
    padding: 60px 0;
}

.updates-table {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.updates-table table {
    width: 100%;
    border-collapse: collapse;
}

.updates-table th, .updates-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.updates-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.update-comic {
    display: flex;
    align-items: center;
}

.update-comic img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 3px;
}

.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more button {
    background-color: white;
    color: #e53935;
    border: 1px solid #e53935;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.load-more button:hover {
    background-color: #e53935;
    color: white;
}

/* 热门排行 */
.popular-rankings {
    padding: 60px 0;
    background-color: white;
}

.tab-container {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 15px 30px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.tab-btn.active {
    background-color: #e53935;
    color: white;
}

.tab-content {
    display: none;
    padding: 30px;
}

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

.ranking-list {
    list-style: none;
}

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

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

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

.rank-number.top3 {
    background-color: #e53935;
}

.ranking-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 3px;
}

.ranking-info {
    flex: 1;
}

.ranking-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.ranking-stats {
    display: flex;
    color: #666;
}

.ranking-stats span {
    margin-right: 15px;
}

/* 订阅区域 */
.subscribe {
    padding: 60px 0;
    background-color: #e53935;
    color: white;
    text-align: center;
}

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

.subscribe p {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subscribe form {
    display: flex;
    justify-content: center;
}

.subscribe input {
    padding: 12px 20px;
    border: none;
    border-radius: 5px 0 0 5px;
    width: 300px;
}

.subscribe button {
    padding: 12px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.subscribe button:hover {
    background-color: #111;
}

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

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: #444;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #e53935;
}

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

.footer-col ul li a {
    color: #ddd;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #e53935;
}

.app-download a {
    display: block;
    background-color: #444;
    color: white;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.app-download a:hover {
    background-color: #e53935;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: #ddd;
    margin-left: 20px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e53935;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .comics-grid, .categories-grid, .footer-top {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .search-bar {
        display: none;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .comics-grid, .categories-grid, .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 20px;
    }
    
    .updates-table th:nth-child(2), .updates-table td:nth-child(2) {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-slider {
        height: 250px;
    }
    
    .comics-grid, .categories-grid, .footer-top {
        grid-template-columns: 1fr;
    }
    
    .updates-table th:nth-child(3), .updates-table td:nth-child(3),
    .updates-table th:nth-child(4), .updates-table td:nth-child(4) {
        display: none;
    }
}    