/* 基础样式 */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #FFFFFF;
    --bg-light: #F9F9F9;
    --bg-dark: #292F36;
    --border-color: #EEEEEE;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

ul, ol {
    list-style: none;
}

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

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

.section {
    padding: 60px 0;
}

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

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    padding-left: 15px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.more-link {
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    align-items: center;
}

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

.more-link::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.more-link:hover::after {
    transform: translateX(3px);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 头部导航 */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-container {
    flex: 0 0 180px;
}

.logo {
    display: block;
}

.logo-svg {
    width: 100%;
    height: auto;
}

.main-nav {
    flex: 1;
    margin: 0 20px;
}

.main-nav ul {
    display: flex;
    justify-content: center;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

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

.search-box input {
    width: 200px;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

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

/* 主横幅 */
.banner {
    position: relative;
    height: 500px;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 80%;
    max-width: 800px;
}

.banner h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner p {
    font-size: 18px;
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.banner-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
    animation: slider 15s infinite;
}

.slider-item:nth-child(1) {
    animation-delay: 0s;
}

.slider-item:nth-child(2) {
    animation-delay: 5s;
}

.slider-item:nth-child(3) {
    animation-delay: 10s;
}

@keyframes slider {
    0%, 33% { opacity: 1; }
    34%, 100% { opacity: 0; }
}

.slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* 热门推荐 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.comic-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.comic-cover {
    position: relative;
    padding-top: 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);
}

.comic-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: white;
}

.tag-hot {
    background-color: #FF6B6B;
}

.tag-adventure {
    background-color: #4ECDC4;
}

.tag-love {
    background-color: #FF8A5B;
}

.tag-youth {
    background-color: #6A0572;
}

.tag-fantasy {
    background-color: #5F4B8B;
}

.tag-cultivation {
    background-color: #42BFDD;
}

.tag-school {
    background-color: #00A8E8;
}

.tag-daily {
    background-color: #89C9B8;
}

.tag-urban {
    background-color: #5D576B;
}

.tag-supernatural {
    background-color: #E84855;
}

.tag-sci-fi {
    background-color: #3185FC;
}

.tag-mecha {
    background-color: #F46036;
}

.tag-horror {
    background-color: #2B2D42;
}

.tag-mystery {
    background-color: #5E548E;
}

.tag-martial {
    background-color: #D62828;
}

.comic-info {
    padding: 15px;
}

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

.comic-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.author {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

/* 最新更新 */
.update-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.update-item {
    display: flex;
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.update-cover {
    flex: 0 0 120px;
    height: 160px;
    overflow: hidden;
}

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

.update-item:hover .update-cover img {
    transform: scale(1.05);
}

.update-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

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

.update-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

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

.update-time, .update-chapter {
    margin-left: auto;
}

/* 分类推荐 */
.category-tabs {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tab-headers {
    display: flex;
    background-color: var(--bg-dark);
}

.tab-header {
    flex: 1;
    padding: 15px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.tab-header.active {
    background-color: var(--primary-color);
}

.tab-header:hover:not(.active) {
    background-color: rgba(255, 107, 107, 0.2);
}

.tab-contents {
    padding: 20px;
}

.tab-content {
    display: none;
}

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

/* APP下载 */
.app-download {
    background-color: var(--bg-dark);
    color: white;
    padding: 80px 0;
}

.app-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.app-info {
    flex: 1;
}

.app-info h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
}

.app-desc {
    font-size: 18px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

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

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

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

.icon-check::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
}

.app-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-android, .btn-ios {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-android {
    background-color: #3DDC84;
    color: white;
}

.btn-ios {
    background-color: white;
    color: var(--text-color);
}

.btn-android:hover {
    background-color: #2abe6e;
    color: white;
}

.btn-ios:hover {
    background-color: #f2f2f2;
}

.icon-android, .icon-apple {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-code img {
    width: 100px;
    height: 100px;
    margin-bottom: 8px;
}

.qr-code p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.app-preview {
    flex: 1;
    display: flex;
    justify-content: center;
}

.app-screenshot {
    max-height: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 精选文章 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.article-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

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

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

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

.article-excerpt {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* 排行榜 */
.rankings {
    background-color: var(--bg-light);
}

.ranking-tabs {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.ranking-list {
    padding: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.ranking-item:hover {
    background-color: var(--bg-light);
}

.ranking-number {
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    margin-right: 15px;
}

.ranking-item:nth-child(1) .ranking-number {
    background-color: #FFD700;
}

.ranking-item:nth-child(2) .ranking-number {
    background-color: #C0C0C0;
}

.ranking-item:nth-child(3) .ranking-number {
    background-color: #CD7F32;
}

.ranking-cover {
    flex: 0 0 80px;
    height: 110px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
}

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

.ranking-info {
    flex: 1;
}

.ranking-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: var(--text-lighter);
}

.views, .update, .score {
    color: var(--primary-color);
    font-weight: 500;
}

/* 用户评论 */
.testimonials {
    background-color: var(--bg-color);
}

.testimonial-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-item {
    flex: 0 0 calc(33.333% - 20px);
    background-color: var(--bg-light);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
}

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

.testimonial-content {
    text-align: center;
}

.testimonial-text {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: -30px;
    left: -10px;
}

.testimonial-author h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.testimonial-author p {
    font-size: 14px;
    color: var(--text-lighter);
}

/* 页脚 */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

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

.footer-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-column p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

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

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.copyright {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

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

.footer-links-bottom a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links-bottom a:hover {
    color: var(--primary-color);
}

.friend-links {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.friend-links h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.friend-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.friend-links a:hover {
    color: var(--primary-color);
}

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

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .main-nav {
        margin: 15px 0;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        margin-top: 15px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner h1 {
        font-size: 32px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .update-list {
        grid-template-columns: 1fr;
    }
    
    .app-content {
        flex-direction: column;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-item {
        flex: 0 0 calc(100% - 30px);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 0;
    }
    
    .banner {
        height: 300px;
    }
    
    .banner h1 {
        font-size: 24px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .comic-grid {
        grid-template-columns: 1fr;
    }
    
    .update-item {
        flex-direction: column;
    }
    
    .update-cover {
        width: 100%;
        height: 200px;
    }
    
    .app-buttons {
        flex-direction: column;
    }
    
    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ranking-number {
        margin-bottom: 10px;
    }
    
    .ranking-cover {
        width: 100%;
        height: 150px;
        margin-bottom: 10px;
    }
}
