/* Chapter Hero Styles */
.chapter-hero {
    margin-top: 0; /* 移除原来的margin-top */
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 28.125%; /* 32:9 的宽高比，原来的一半 */
    overflow: hidden;
}

.chapter-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.chapter-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chapter-hero-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 2rem;
    text-align: center;
    z-index: 2;
}

.chapter-title {
    font-family: 'Impact', sans-serif;
    font-size: 3.5rem;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.chapter-subtitle {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Manga Content Styles */
.manga-content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.manga-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.manga-page {
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.manga-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.manga-image:hover {
    transform: scale(1.02);
}

/* Chapter Navigation */
.chapter-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.nav-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.nav-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,215,0,0.2);
}

/* Loading Animation for Images */
.manga-image.loading {
    min-height: 400px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chapter-hero {
        padding-bottom: 75%; /* 移动端使用4:3比例 */
    }

    .chapter-title {
        font-size: 2.5rem;
    }

    .chapter-subtitle {
        font-size: 1.2rem;
    }

    .chapter-navigation {
        flex-direction: column;
        align-items: center;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    .manga-content {
        margin: 2rem auto;
    }

    .manga-container {
        gap: 2rem;
    }
}

/* Image Viewer Mode */
.manga-image.fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    width: auto;
    z-index: 1000;
    cursor: zoom-out;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* SEO Content Styles */
.chapter-seo-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Headings */
.chapter-seo-content h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin: 2rem 0;
    font-family: 'Impact', sans-serif;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.chapter-seo-content h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin: 2.5rem 0 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
}

.chapter-seo-content h4 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

/* Content Blocks */
.chapter-seo-content div {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.chapter-seo-content p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
}

/* Lists */
.chapter-seo-content ul {
    margin: 1rem 0 1.5rem 2rem;
    list-style-type: disc;
}

.chapter-seo-content li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #444;
}

/* Content Sections */
.chapter-highlights,
.art-analysis,
.story-analysis,
.reading-guide,
.community-impact,
.technical-details,
.series-context,
.chapter-analysis,
.art-highlights,
.world-building,
.reading-tips {
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chapter-seo-content div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Emphasis and Links */
.chapter-seo-content strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.chapter-seo-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.chapter-seo-content a:hover {
    border-bottom-color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chapter-seo-content {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .chapter-seo-content h2 {
        font-size: 2rem;
    }

    .chapter-seo-content h3 {
        font-size: 1.5rem;
        padding-left: 0.8rem;
    }

    .chapter-seo-content h4 {
        font-size: 1.2rem;
    }

    .chapter-seo-content p,
    .chapter-seo-content li {
        font-size: 1rem;
    }

    .chapter-seo-content div {
        padding: 1rem;
    }
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.5rem 0;
    margin-top: 80px; /* 与header的高度相同 */
    border-bottom: 1px solid #eee;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #666;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #ccc;
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

.breadcrumb-item.active {
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.3rem 0;
    }
    
    .breadcrumb-container {
        padding: 0 1rem;
    }
    
    .breadcrumb-list {
        font-size: 0.8rem;
    }
}