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

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f6fa;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff6b6b;
}

ul, li {
    list-style: none;
}

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

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

/* 头部导航 */
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;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

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

.icon-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

h1 {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

nav ul {
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

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

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

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

.search-box input {
    width: 200px;
    height: 36px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 18px 0 0 18px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #ff6b6b;
    width: 250px;
}

.search-btn {
    height: 36px;
    padding: 0 15px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 0 18px 18px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #ff5252;
}

/* 轮播图 */
.banner {
    padding: 30px 0;
}

.banner-wrapper {
    position: relative;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
}

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

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

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

.banner-dots {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #ff6b6b;
}

/* 公共标题样式 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-left: 4px solid #ff6b6b;
    padding-left: 15px;
}

.section-title h2 {
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

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

.more:hover {
    color: #ff6b6b;
}

/* 热门推荐 */
.hot-recommend {
    padding: 30px 0;
    background-color: #fff;
    margin-bottom: 20px;
}

.comic-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.comic-card {
    width: calc(16.666% - 20px);
    margin: 0 10px 20px;
    transition: transform 0.3s ease;
}

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

.comic-cover {
    position: relative;
    height: 200px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

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

.tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
}

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

.comic-info p {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

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

.stars {
    color: #ffb400;
    font-size: 12px;
}

.score {
    font-size: 14px;
    font-weight: bold;
    color: #ff6b6b;
}

/* 最新更新 */
.latest-update {
    padding: 30px 0;
    background-color: #fff;
    margin-bottom: 20px;
}

.update-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.update-item {
    width: calc(25% - 20px);
    margin: 0 10px 20px;
    display: flex;
    background-color: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.update-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.update-cover {
    width: 80px;
    height: 120px;
    flex-shrink: 0;
}

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

.update-info {
    flex: 1;
    padding: 10px;
    position: relative;
}

.update-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.update-info p {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.time {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    color: #999;
}

/* 分类推荐 */
.category-recommend {
    padding: 30px 0;
    background-color: #fff;
    margin-bottom: 20px;
}

.category-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab.active {
    color: #ff6b6b;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff6b6b;
}

.category-content {
    display: none;
}

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

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

.comic-item {
    transition: transform 0.3s ease;
}

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

.comic-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comic-item h4 {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* APP下载 */
.app-download {
    padding: 50px 0;
    background-color: #fff;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: #fff;
}

.download-content {
    display: flex;
    align-items: center;
}

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

.download-info h2 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.download-info p {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

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

.icon-check {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

.icon-check::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 4px;
    border-left: 2px solid #ff6b6b;
    border-bottom: 2px solid #ff6b6b;
    transform: translate(-50%, -70%) rotate(-45deg);
}

.download-buttons {
    display: flex;
    margin-bottom: 30px;
}

.android-btn, .ios-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 50px;
    background-color: #fff;
    color: #ff6b6b;
    border-radius: 25px;
    margin-right: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.android-btn:hover, .ios-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

.icon-android, .icon-apple {
    margin-right: 8px;
    font-size: 18px;
}

.qrcode {
    text-align: center;
}

.qrcode img {
    width: 120px;
    height: 120px;
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.download-image {
    flex: 1;
    text-align: center;
}

.download-image img {
    max-height: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 漫画资讯 */
.comic-news {
    padding: 30px 0;
    background-color: #fff;
    margin-bottom: 20px;
}

.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.news-image {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    position: relative;
    padding-bottom: 25px;
}

.news-content h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.news-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 12px;
    color: #999;
}

/* 排行榜 */
.ranking {
    padding: 30px 0;
    background-color: #fff;
    margin-bottom: 20px;
}

.ranking-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.ranking-content {
    display: none;
}

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

.rank-list {
    display: flex;
    flex-direction: column;
}

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

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

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

.rank-item:nth-child(n+4) .rank-num {
    background-color: #999;
}

.rank-cover {
    width: 80px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 5px;
    overflow: hidden;
}

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

.rank-info {
    flex: 1;
}

.rank-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.rank-info p {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.rank-tags {
    display: flex;
}

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

.rank-score {
    width: 50px;
    text-align: center;
}

.rank-score span {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b6b;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-top {
    display: flex;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-right: 50px;
}

.footer-logo svg {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.footer-logo span {
    font-size: 20px;
    font-weight: bold;
}

.footer-nav {
    display: flex;
    flex: 1;
    justify-content: space-between;
}

.footer-nav-group h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-nav-group h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #ff6b6b;
}

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

.footer-nav-group ul li a {
    color: #b4bcc8;
    transition: color 0.3s ease;
}

.footer-nav-group ul li a:hover {
    color: #ff6b6b;
}

.footer-qrcode {
    text-align: center;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.footer-qrcode p {
    font-size: 12px;
    color: #b4bcc8;
}

.footer-middle {
    margin-bottom: 30px;
}

.friendly-links h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
}

.link-list a {
    color: #b4bcc8;
    margin-right: 15px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.link-list a:hover {
    color: #ff6b6b;
}

.other-links {
    margin-top: 20px;
    color: #b4bcc8;
}

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

.footer-bottom p {
    margin-bottom: 10px;
    color: #b4bcc8;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
        padding: 0 20px;
    }
    
    .comic-card {
        width: calc(20% - 20px);
    }
    
    .update-item {
        width: calc(33.333% - 20px);
    }
    
    .comic-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .comic-card {
        width: calc(25% - 20px);
    }
    
    .update-item {
        width: calc(50% - 20px);
    }
    
    .comic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .download-content {
        flex-direction: column;
    }
    
    .download-info {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-nav {
        flex-wrap: wrap;
    }
    
    .footer-nav-group {
        width: 50%;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .comic-card {
        width: calc(33.333% - 20px);
    }
    
    .update-item {
        width: 100%;
    }
    
    .comic-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 180px;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .comic-card {
        width: calc(50% - 20px);
    }
    
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-nav-group {
        width: 100%;
    }
}
