/* ========================================
   章节页面样式
   ======================================== */

/* 章节导航 */
.chapter-nav {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.chapter-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    min-width: max-content;
    padding: 0 var(--spacing-sm);
}

.chapter-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    min-width: 80px;
}

.chapter-tab:hover {
    border-color: var(--color-accent);
    background: rgba(212, 175, 55, 0.1);
}

.tab-num {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: bold;
}

.tab-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.chapter-tab:hover .tab-title {
    color: var(--text-primary);
}

/* 章节主体 */
.chapters-main {
    padding: var(--spacing-lg) 0;
}

/* 章节文章 */
.chapter-article {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-article:last-of-type {
    border-bottom: none;
}

/* 章节头部 */
.chapter-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.1) 0%, 
        rgba(212, 175, 55, 0.02) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.chapter-number {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.chapter-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* 章节内容 */
.chapter-content {
    max-width: 800px;
    margin: 0 auto;
}

/* 故事段落 */
.story-section {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.story-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.story-section h3 i {
    color: var(--color-accent);
    font-size: 1.1rem;
}

.story-section p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: justify;
}

.story-section p:last-child {
    margin-bottom: 0;
}

.story-section strong {
    color: var(--color-accent);
}

/* 高亮段落 */
.highlight-section {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.2);
}

/* 灾难段落 */
.disaster-section {
    background: rgba(255, 107, 107, 0.05);
    border-color: rgba(255, 107, 107, 0.2);
}

/* 成功段落 */
.success-section {
    background: rgba(74, 222, 128, 0.05);
    border-color: rgba(74, 222, 128, 0.2);
}

/* 战斗段落 */
.battle-section {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

/* 最终段落 */
.final-section {
    background: linear-gradient(135deg, 
        rgba(125, 211, 252, 0.1) 0%, 
        rgba(212, 175, 55, 0.1) 100%);
    border-color: rgba(212, 175, 55, 0.3);
}

/* 引用框 */
blockquote {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--color-accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

blockquote p {
    margin: 0;
}

.quote-author {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-accent);
    font-style: normal;
}

.conflict-quote {
    border-left-color: #f97316;
    background: rgba(249, 115, 22, 0.1);
}

/* 游戏角色框 */
.game-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin: 1.5rem 0;
}

.game-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.game-box p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.role-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.role-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.role-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-card.dragon {
    background: rgba(139, 58, 98, 0.2);
    border: 1px solid rgba(139, 58, 98, 0.4);
}

.role-card.dragon i {
    color: var(--color-dragon);
}

.role-card.hero {
    background: rgba(70, 130, 180, 0.2);
    border: 1px solid rgba(70, 130, 180, 0.4);
}

.role-card.hero i {
    color: var(--color-hero);
}

.role-card.wizard {
    background: rgba(107, 76, 154, 0.2);
    border: 1px solid rgba(107, 76, 154, 0.4);
}

.role-card.wizard i {
    color: var(--color-wizard);
}

.role-card.princess {
    background: rgba(212, 165, 165, 0.2);
    border: 1px solid rgba(212, 165, 165, 0.4);
}

.role-card.princess i {
    color: var(--color-princess);
}

/* 结果框 */
.result-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.result-box i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-box strong {
    display: block;
    margin-bottom: 0.25rem;
}

.result-box p {
    font-size: 0.9rem;
    margin: 0;
}

.result-box.success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.result-box.success i {
    color: #4ade80;
}

.result-box.failure {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.result-box.failure i {
    color: #ff6b6b;
}

/* 预言框 */
.prophecy-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.prophecy-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-md);
}

.prophecy-item i {
    font-size: 1.2rem;
    color: #a855f7;
}

.prophecy-item span {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* 对比表格 */
.compare-table {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.compare-column {
    flex: 1;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
}

.compare-column.abyss {
    background: rgba(139, 58, 98, 0.15);
    border: 1px solid rgba(139, 58, 98, 0.3);
}

.compare-column.machine {
    background: rgba(70, 130, 180, 0.15);
    border: 1px solid rgba(70, 130, 180, 0.3);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.column-header i {
    font-size: 1.2rem;
}

.compare-column.abyss .column-header {
    color: var(--color-dragon);
}

.compare-column.machine .column-header {
    color: var(--color-hero);
}

.column-header h4 {
    font-size: 1rem;
    margin: 0;
}

.compare-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.compare-column li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-column li:last-child {
    border-bottom: none;
}

.compare-column li.risk {
    color: #ff6b6b;
}

.compare-vs {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-accent);
    padding: 0 0.5rem;
}

/* 信息框 */
.info-box {
    background: rgba(125, 211, 252, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    font-size: 1rem;
    color: var(--color-light);
    margin-bottom: 0.75rem;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-box li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 记忆框 */
.memory-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.memory-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
}

.memory-item.deleted {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    text-decoration: line-through;
    color: var(--text-muted);
}

.memory-item i {
    color: #ff6b6b;
}

/* 对话段落 */
.dialogue-section {
    margin: 1.5rem 0;
}

.dialogue {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid transparent;
}

.dialogue .speaker {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.dialogue .speaker.alain {
    color: var(--color-hero);
}

.dialogue .speaker.rene {
    color: var(--color-dragon);
}

.dialogue p {
    font-style: italic;
    margin: 0;
    font-size: 0.95rem;
}

/* 战斗网格 */
.battle-grid {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    margin: 1.5rem 0;
}

.battle-side {
    flex: 1;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.battle-side.hunters {
    background: rgba(70, 130, 180, 0.15);
    border: 1px solid rgba(70, 130, 180, 0.3);
}

.battle-side.society {
    background: rgba(139, 58, 98, 0.15);
    border: 1px solid rgba(139, 58, 98, 0.3);
}

.battle-side h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.combatant {
    font-size: 0.9rem;
    padding: 0.4rem 0;
    color: var(--text-secondary);
}

.battle-center {
    display: flex;
    align-items: center;
    font-size: 2rem;
    color: var(--color-accent);
}

.battle-result {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.battle-result p {
    margin: 0;
    color: #ff9e9e;
}

/* 结局网格 */
.aftermath-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.aftermath-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.aftermath-card .char {
    display: block;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.aftermath-card p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* 最终引用 */
.final-quote {
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.15) 0%, 
        rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.final-quote i {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.final-quote p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    text-align: center;
}

/* 章节结尾 */
.chapter-ending {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-lg);
}

.ending-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.ending-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.ending-cta {
    margin-top: var(--spacing-lg);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .chapter-tabs {
        justify-content: flex-start;
    }
    
    .chapter-title {
        font-size: 1.8rem;
    }
    
    .role-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compare-table {
        flex-direction: column;
    }
    
    .compare-vs {
        justify-content: center;
        padding: 0.5rem 0;
    }
    
    .battle-grid {
        flex-direction: column;
    }
    
    .battle-center {
        justify-content: center;
        padding: 0.5rem 0;
    }
    
    .aftermath-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 90px 0 30px;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .page-desc {
        font-size: 0.85rem;
        padding: 0 15px;
    }
    
    .chapters-nav {
        padding: 0.8rem 0;
    }
    
    .chapter-tabs {
        gap: 0.4rem;
        padding: 0 10px;
    }
    
    .chapter-tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .chapters-main {
        padding: 1.5rem 0;
    }
    
    .chapter-card {
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .chapter-header {
        padding: 1rem;
    }
    
    .chapter-number {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
    
    .chapter-title {
        font-size: 1.4rem;
        margin: 0.6rem 0 0.4rem;
    }
    
    .chapter-subtitle {
        font-size: 0.8rem;
    }
    
    .story-section {
        padding: 1rem;
    }
    
    .story-section h3 {
        font-size: 1rem;
        gap: 8px;
        margin-bottom: 0.8rem;
    }
    
    .story-section h3 i {
        font-size: 0.85rem;
    }
    
    .story-section p {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    /* 角色网格 */
    .role-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .role-card {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.8rem;
        text-align: left;
        padding: 0.8rem;
    }
    
    .role-card i {
        margin-bottom: 0;
        font-size: 1.1rem;
    }
    
    .role-card span {
        font-size: 0.85rem;
    }
    
    /* 对话框 */
    .dialog-box {
        padding: 1rem;
        margin: 0.8rem 0;
    }
    
    .dialog-speaker {
        font-size: 0.85rem;
    }
    
    .dialog-content {
        font-size: 0.9rem;
    }
    
    /* 预言列表 */
    .prophecy-list li {
        padding: 0.6rem 0.8rem;
        padding-left: 2rem;
        font-size: 0.85rem;
    }
    
    .prophecy-list li::before {
        left: 0.6rem;
        font-size: 0.7rem;
    }
    
    /* 对比表格 */
    .compare-table {
        flex-direction: column;
    }
    
    .compare-side {
        padding: 1rem;
    }
    
    .compare-side h4 {
        font-size: 0.95rem;
    }
    
    .compare-side li {
        font-size: 0.8rem;
    }
    
    .compare-vs {
        padding: 0.4rem 0;
        font-size: 1rem;
    }
    
    /* 战斗区域 */
    .battle-grid {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .battle-side {
        padding: 1rem;
    }
    
    .battle-side h4 {
        font-size: 0.9rem;
    }
    
    .combatant {
        font-size: 0.8rem;
    }
    
    .battle-center {
        justify-content: center;
        padding: 0.3rem 0;
        font-size: 1.5rem;
    }
    
    .battle-result {
        padding: 0.8rem;
    }
    
    .battle-result p {
        font-size: 0.85rem;
    }
    
    /* 结局网格 */
    .aftermath-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .aftermath-card {
        padding: 0.8rem;
    }
    
    .aftermath-card .char {
        font-size: 0.9rem;
    }
    
    .aftermath-card p {
        font-size: 0.8rem;
    }
    
    /* 最终引用 */
    .final-quote {
        padding: 1.2rem;
        margin: 1.2rem 0;
    }
    
    .final-quote i {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .final-quote p {
        font-size: 1rem;
    }
    
    /* 章节结尾 */
    .chapter-ending {
        padding: 1.5rem 0;
    }
    
    .ending-content h2 {
        font-size: 1.5rem;
    }
    
    .ending-content p {
        font-size: 0.9rem;
    }
    
    .ending-cta {
        margin-top: 1.5rem;
    }
}

/* 超小屏幕 */
@media (max-width: 360px) {
    .page-title {
        font-size: 1.4rem;
    }
    
    .chapter-title {
        font-size: 1.25rem;
    }
    
    .story-section {
        padding: 0.8rem;
    }
    
    .story-section h3 {
        font-size: 0.95rem;
    }
    
    .story-section p {
        font-size: 0.8rem;
    }
}
