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

:root {
    --primary: #e91e63;
    --secondary: #9c27b0;
    --accent: #ff4081;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --white: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

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

/* 顶部导航 */
.top-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo-area {
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    color: var(--white);
    display: flex;
    flex-direction: column;
}

.site-logo {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.site-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.main-nav {
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 5px 15px;
}

.search-input {
    border: none;
    background: transparent;
    color: var(--white);
    padding: 8px;
    width: 200px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s;
}

/* 主横幅 */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.banner-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
}

.banner-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.banner-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
}

/* 内容区域 */
.main-wrapper {
    padding: 50px 0;
}

.content-section {
    padding: 60px 0;
}

.bg-light {
    background: var(--light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.title-icon {
    font-size: 36px;
}

.more-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.more-link:hover {
    color: var(--secondary);
}

/* 漫画网格 */
.comics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.comic-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.comic-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.comic-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.comic-info {
    padding: 15px;
}

.comic-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.comic-rating {
    color: #ff9800;
    font-weight: bold;
}

/* 更新列表 */
.updates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-item {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.update-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.update-cover {
    width: 140px;
    height: 190px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.update-content {
    flex: 1;
}

.update-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text);
}

.update-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

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

/* 分类网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.category-item {
    background: var(--white);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.category-item h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text);
}

.category-item p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.category-count {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light);
    border-radius: 12px;
    font-size: 11px;
    color: var(--primary);
    font-weight: bold;
}

/* 排行榜 */
.ranking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 10px 25px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

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

.rank-item {
    background: var(--white);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.rank-item:hover {
    transform: translateX(5px);
}

.rank-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.rank-number.top1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.rank-number.top2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #333;
}

.rank-number.top3 {
    background: linear-gradient(135deg, #cd7f32, #e6a857);
    color: var(--white);
}

.rank-info {
    flex: 1;
}

.rank-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text);
}

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

/* 特色推荐 */
.featured-box {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    padding: 40px;
    color: var(--white);
}

.featured-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.featured-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.featured-list li {
    font-size: 16px;
    line-height: 1.8;
}

/* 页脚 */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 15px;
    color: var(--accent);
}

.footer-column p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

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

/* 返回顶部 */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
    }

    .search-container {
        display: none;
    }

    .banner-title {
        font-size: 32px;
    }

    .banner-subtitle {
        font-size: 16px;
    }

    .banner-stats {
        gap: 30px;
    }

    .section-title {
        font-size: 24px;
    }

    .comics-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .update-item {
        flex-direction: column;
    }

    .update-cover {
        width: 100%;
        height: 200px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-list {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 22px;
    }

    .banner-title {
        font-size: 24px;
    }

    .comics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

