* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
}

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

/* 头部 */
.header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo a {
    color: #ff4757;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: #ff4757;
}

.search form {
    display: flex;
}

.search input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 200px;
    background: #2a2a2a;
    color: #e0e0e0;
}

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

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ff4757;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
    color: #aaa;
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff4757;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: transform 0.3s;
}

.hero-btn:hover {
    transform: translateY(-3px);
}

/* 区块 */
.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.section-header h2 {
    font-size: 24px;
}

.section-header a {
    color: #ff4757;
    text-decoration: none;
}

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

.comic-card {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
}

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

.comic-card a {
    text-decoration: none;
    color: inherit;
}

.comic-cover {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

.comic-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
}

.comic-info {
    padding: 12px;
}

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

.comic-info p {
    font-size: 12px;
    color: #888;
}

/* 列表形式 */
.comic-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

.list-item a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    padding: 12px;
}

.list-cover {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.list-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.list-info p {
    font-size: 13px;
    color: #888;
}

/* 排行 */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 8px;
}

.rank-num {
    width: 32px;
    height: 32px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.rank-num.top {
    background: #ff4757;
    color: white;
}

.rank-item a {
    flex: 1;
    text-decoration: none;
    color: #e0e0e0;
}

.rank-hits {
    font-size: 12px;
    color: #888;
}

/* 列表页布局 */
.list-layout {
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
}

.sidebar-box {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
}

.sidebar-box h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.sidebar-box ul {
    list-style: none;
}

.sidebar-box li {
    margin-bottom: 10px;
}

.sidebar-box a {
    display: block;
    padding: 6px 10px;
    text-decoration: none;
    color: #aaa;
    border-radius: 6px;
    transition: all 0.3s;
}

.sidebar-box a:hover,
.sidebar-box a.active {
    background: #ff4757;
    color: white;
}

.main-content {
    flex: 1;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 16px;
    background: #1a1a1a;
    text-decoration: none;
    color: #e0e0e0;
    border-radius: 6px;
}

.pagination a:hover {
    background: #ff4757;
}

.pagination .current {
    padding: 8px 16px;
    background: #ff4757;
    border-radius: 6px;
}

/* 详情页 */
.detail-page {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-cover {
    width: 260px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-cover img {
    width: 100%;
}

.detail-info {
    flex: 1;
}

.detail-info h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.meta span {
    background: #2a2a2a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #aaa;
}

.btn-start {
    display: inline-block;
    padding: 12px 30px;
    background: #ff4757;
    color: white;
    text-decoration: none;
    border-radius: 30px;
}

/* 章节列表 */
.chapter-section {
    margin-top: 30px;
}

.chapter-section h2 {
    margin-bottom: 15px;
}

.chapter-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.chapter-list li {
    background: #2a2a2a;
    border-radius: 8px;
}

.chapter-list li a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #e0e0e0;
}

.chapter-list li a:hover {
    color: #ff4757;
}

/* 相关推荐 */
.related-section {
    margin-top: 40px;
}

.related-section h2 {
    margin-bottom: 20px;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px;
    color: #888;
}

/* 页脚 */
.footer {
    background: #1a1a1a;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    border-top: 1px solid #333;
    color: #666;
}

/* 响应式 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .comic-cover {
        height: 190px;
    }
    
    .detail-header {
        flex-direction: column;
    }
    
    .detail-cover {
        width: 200px;
        margin: 0 auto;
    }
    
    .list-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}