/* ==================== Chapter Page Styles ==================== */
/* 篇章页面样式 */

body {
    padding-top: 70px;
}

/* Chapter Hero - 篇章Hero */
.chapter-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.chapter-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cyber-gradient-subtle);
    opacity: 0.3;
}

.chapter-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.chapter-hero h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    font-weight: 300;
}

.chapter-hero .subtitle {
    font-size: 1.3rem;
    color: var(--accent-warm-dark);
    margin-bottom: 2rem;
    font-weight: 300;
}

.chapter-hero .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Chapter Navigation - 篇章导航 */
.chapter-nav {
    position: sticky;
    top: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 900;
    padding: 1rem 0;
}

.chapter-nav .container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.chapter-nav-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.chapter-nav-item:hover {
    color: var(--accent-warm-dark);
    background: var(--bg-secondary);
}

.chapter-nav-item.active {
    color: var(--text-primary);
    background: var(--accent-warm);
    font-weight: 600;
    border: 2px solid var(--cyber-blue);
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.4),
        inset 0 0 15px rgba(232, 200, 114, 0.3);
}

.chapter-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--cyber-gradient);
}

/* Subchapter - 子章节 */
.subchapter {
    padding: 60px 0;
    background: var(--bg-primary);
}

.subchapter:nth-child(even) {
    background: var(--bg-secondary);
}

.subchapter-content {
    max-width: 900px;
    margin: 0 auto;
}

.subchapter-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.subchapter-image {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(61, 43, 31, 0.1);
}

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

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

.subchapter-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.subchapter-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.subchapter-text p {
    margin-bottom: 1.5rem;
}

/* Tool Section - 工具区 */
.tool-section {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(61, 43, 31, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tool-section:hover {
    border-color: var(--accent-warm);
    box-shadow: 0 8px 30px rgba(61, 43, 31, 0.15);
}

.tool-section.expanded {
    border-color: var(--cyber-blue);
    box-shadow: 
        0 8px 30px rgba(61, 43, 31, 0.15),
        0 0 20px rgba(0, 240, 255, 0.2);
}

.tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.tool-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-icon {
    font-size: 1.5rem;
}

.tool-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.tool-status.developing {
    background: linear-gradient(135deg, #FFE082, #FFD54F);
    color: var(--text-primary);
}

.tool-status.ready {
    background: linear-gradient(135deg, #81C784, #66BB6A);
    color: white;
}

.tool-preview {
    min-height: 200px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tool-coming-soon {
    text-align: center;
    color: var(--text-muted);
}

.tool-coming-soon span {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.tool-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Chapter Footer - 篇章底部导航 */
.chapter-footer {
    background: var(--gradient-section);
    padding: 4rem 0;
    margin-top: 4rem;
}

.chapter-footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Summary Section - 总结区 */
.summary-section {
    padding: 60px 0;
    background: var(--bg-primary);
    text-align: center;
}

.summary-section .container {
    max-width: 700px;
}

.summary-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.summary-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.summary-questions {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(61, 43, 31, 0.08);
}

.summary-questions h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.summary-questions ul {
    text-align: left;
    padding-left: 2rem;
}

.summary-questions li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 767px) {
    .chapter-hero h1 {
        font-size: 2rem;
    }
    
    .chapter-nav .container {
        gap: 1rem;
    }
    
    .chapter-nav-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .subchapter-header {
        grid-template-columns: 1fr;
    }
    
    .subchapter-image {
        height: 200px;
    }
    
    .tool-actions {
        flex-direction: column;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .chapter-hero h1 {
        font-size: 2.3rem;
    }
    
    .subchapter-header {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 1024px) {
    .chapter-hero h1 {
        font-size: 3rem;
    }
    
    .subchapter-header {
        grid-template-columns: 1fr 2fr;
    }
    
    .subchapter-image {
        height: 350px;
    }
}
