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

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f8f8;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: #ff5e7d;
    color: #fff;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #ff3c62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 94, 125, 0.3);
}

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

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

.logo h1 {
    font-size: 24px;
    color: #ff5e7d;
    margin: 0;
}

nav ul {
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    font-weight: 500;
    color: #555;
    position: relative;
}

nav ul li a:hover {
    color: #ff5e7d;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff5e7d;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.search-box {
    display: flex;
}

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

.search-btn {
    background-color: #ff5e7d;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* 横幅区域 */
.banner {
    background: linear-gradient(135deg, #ff5e7d, #ff9671);
    padding: 80px 0;
    color: #fff;
    text-align: center;
}

.banner-content {
    max-width: 700px;
    margin: 0 auto;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner .btn {
    background-color: #fff;
    color: #ff5e7d;
    font-size: 18px;
    padding: 12px 30px;
}

.banner .btn:hover {
    background-color: #f0f0f0;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* 章节标题 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-title h2 {
    font-size: 24px;
    color: #333;
    position: relative;
    padding-left: 15px;
}

.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 70%;
    width: 4px;
    background-color: #ff5e7d;
    border-radius: 2px;
}

.more {
    color: #ff5e7d;
    font-size: 14px;
}

.more:hover {
    text-decoration: underline;
}

/* 漫画卡片网格 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

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

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

.comic-cover {
    position: relative;
    height: 0;
    padding-bottom: 140%;
    overflow: hidden;
}

.comic-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.update-badge, .hot-badge, .completed-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 94, 125, 0.9);
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.hot-badge {
    background-color: rgba(255, 69, 0, 0.9);
}

.completed-badge {
    background-color: rgba(76, 175, 80, 0.9);
}

.comic-info {
    padding: 15px;
}

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

.comic-info p {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
        display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tags {
    display: flex;
    flex-wrap: wrap;
}

.tags span {
    font-size: 12px;
    background-color: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 分类部分 */
.categories {
    padding: 60px 0;
    background-color: #fff;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-item {
    text-align: center;
    transition: all 0.3s ease;
}

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

.category-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid #ff5e7d;
}

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

.category-item h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.category-item p {
    font-size: 13px;
    color: #777;
}

/* 排行榜部分 */
.ranking {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.ranking-tabs {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

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

.tab-btn {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #fff;
    color: #ff5e7d;
    box-shadow: 0 2px 0 #ff5e7d;
}

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

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

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

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

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

.rank {
    font-size: 24px;
    font-weight: 700;
    color: #ff5e7d;
    width: 40px;
    text-align: center;
}

.ranking-item .comic-cover {
    width: 80px;
    height: 120px;
    padding-bottom: 0;
    margin: 0 15px;
}

.ranking-item .comic-info {
    flex: 1;
}

.stats {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.stats span {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
}

.stats i {
    margin-right: 5px;
}

/* 已完结作品部分 */
.completed-comics {
    padding: 60px 0;
    background-color: #fff;
}

/* APP下载部分 */
.app-download {
    padding: 60px 0;
    background: linear-gradient(135deg, #ff9671, #ff5e7d);
    color: #fff;
}

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

.app-info {
    flex: 1;
}

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

.app-info p {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.9;
}

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

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

.app-features li::before {
    content: '✓';
    display: inline-block;
    margin-right: 10px;
    color: #fff;
    font-weight: bold;
}

.download-btns {
    display: flex;
    gap: 15px;
}

.download-btns .btn {
    background-color: #fff;
    color: #ff5e7d;
}

.download-btns .btn:hover {
    background-color: #f0f0f0;
}

.app-qrcode {
    width: 150px;
    text-align: center;
    margin-left: 50px;
}

.app-qrcode img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.app-qrcode p {
    font-size: 14px;
}

/* 页脚部分 */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}

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

.footer-logo h3 {
    font-size: 24px;
    color: #ff5e7d;
    margin-bottom: 10px;
}

.footer-logo p {
    font-size: 14px;
    color: #ccc;
}

.footer-links {
    display: flex;
    gap: 50px;
}

.link-group h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #fff;
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group ul li a {
    font-size: 14px;
    color: #aaa;
}

.link-group ul li a:hover {
    color: #ff5e7d;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #888;
    font-size: 13px;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: #ff5e7d;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

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

.back-to-top:hover {
    background-color: #ff3c62;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .comic-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav {
        margin: 15px 0;
    }
    
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .app-qrcode {
        margin: 30px 0 0;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .comic-grid {
        grid-template-columns: 1fr;
    }
    
    .category-list {
        grid-template-columns: repeat(2, 1fr);
    }
}