/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.section-anchor {
    display: block;
    scroll-margin-top: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    color: #ff6b6b;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff6b6b;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    width: 200px;
}

.search-bar button {
    background: none;
    border: none;
    margin-left: -30px;
    cursor: pointer;
    color: #666;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 25px;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #666;
    margin: 4px 0;
    transition: all 0.3s;
}

.menu-toggle:hover span {
    background-color: #ff6b6b;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 30px;
}

.carousel-caption h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: white;
}

/* 轮播图控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
    z-index: 10;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

/* 热门推荐样式 */
.hot-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    color: #333;
}

.view-all {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 14px;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.comic-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comic-cover {
    position: relative;
    padding-top: 133%;
    overflow: hidden;
}

.comic-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comic-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-type {
    background-color: #ff6b6b;
    color: white;
}

.tag-popular {
    background-color: #ffd93d;
    color: #333;
}

.tag-status {
    background-color: #6bcf7f;
    color: white;
}

.comic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
}

.comic-card:hover .comic-overlay {
    opacity: 1;
    visibility: visible;
}

.comic-overlay-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.comic-overlay-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comic-info {
    padding: 15px;
}

.comic-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.comic-author {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.comic-stats {
    font-size: 12px;
    color: #ff6b6b;
}

/* 分类导航样式 */
.category-nav {
    margin-top: 40px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-nav h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.category-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: space-around;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-item:hover {
    background-color: #fff5f5;
    transform: translateY(-3px);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #ff6b6b;
    font-size: 20px;
    transition: all 0.3s;
}

.category-item:hover .category-icon {
    background-color: #ff6b6b;
    color: white;
}

.category-item span {
    font-size: 14px;
    color: #666;
    transition: color 0.3s;
}

.category-item:hover span {
    color: #ff6b6b;
}

/* 热门推荐样式 */
.comics-section {
    margin-top: 40px;
}

.comics-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.comics-section .section-header h2 {
    font-size: 24px;
    color: #333;
}

.comics-section .section-header a {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 14px;
}

.comics-section .comics-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

/* 分类样式 */
.category-section {
    margin-top: 40px;
}

.category-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.category-tab:hover,
.category-tab.active {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 20px;
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
}

/* 信息数据板块样式 */
.stats-section {
    margin-top: 40px;
    background-color: #fff5f5;
    background-image: radial-gradient(circle, #ffccd5 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 8px;
    padding: 40px 20px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.stats-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.stats-header h1:hover {
    color: #ff6b6b;
}

.stats-desc {
    font-size: 14px;
    color: #999;
    transition: color 0.3s ease;
}

.stats-desc:hover {
    color: #666;
}

.stats-numbers {
    display: flex;
    gap: 80px;
    margin-bottom: 30px;
    animation: slideIn 0.8s ease-out 0.4s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    display: block;
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: default;
}

.stat-value:hover {
    transform: scale(1.2);
    color: #ff6b6b;
}

.stat-label {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
    display: block;
    transition: color 0.3s ease;
}

.stat-label:hover {
    color: #ff6b6b;
}

.stats-tag-list {
    display: flex;
    gap: 12px;
    animation: bounceIn 0.6s ease-out 0.6s both;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.stats-tag-primary {
    background-color: #9b59b6;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stats-tag-primary:hover {
    transform: translateY(-3px);
    background-color: #8e44ad;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.stats-tag-secondary {
    background-color: white;
    color: #666;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stats-tag-secondary:hover {
    transform: translateY(-3px);
    background-color: #f8f8f8;
    border-color: #9b59b6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 用户评论区样式 */
.comments-section {
    margin-top: 40px;
}

.comment-count {
    color: #999;
    font-size: 14px;
}

.comments-list {
    margin-top: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 24px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.like-btn,
.reply-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.like-btn:hover,
.reply-btn:hover {
    color: #ff6b6b;
}

.like-btn.liked {
    color: #ff6b6b;
}

.comment-form {
    margin-top: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-form h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-comment-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-comment-btn:hover {
    background-color: #ff5252;
}

/* 移动端底部下载按钮 */
.mobile-download-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 10px 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-download-info {
    display: flex;
    flex-direction: column;
}

.mobile-download-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mobile-download-desc {
    font-size: 12px;
    color: #999;
}

.mobile-download-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.mobile-download-btn:hover {
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-download-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
    
    .footer {
        padding-bottom: 70px;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .search-bar {
        display: none;
    }

    .carousel-item img {
        height: 250px;
    }

    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .comics-section .comics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-list {
        gap: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .category-item {
        min-width: 80px;
        padding: 10px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .category-item span {
        font-size: 12px;
    }

    .stats-numbers {
        gap: 40px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stats-tag-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    a {
        transition: none !important;
    }

    .category-item,
    .category-icon,
    .comic-card,
    .comic-overlay,
    .category-tab,
    .stat-value,
    .stat-label,
    .stats-tag-primary,
    .stats-tag-secondary,
    .like-btn,
    .reply-btn,
    .submit-comment-btn,
    .mobile-download-btn {
        transition: none !important;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-tabs {
        gap: 10px;
    }

    .category-tab {
        padding: 6px 15px;
        font-size: 12px;
    }
}
