/* ========================================
   大纲专用增强样式
   ======================================== */

/* 大纲容器 - 固定高度和滚动，宽度为页面一半 */
.outline-enhanced-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    font-size: 13px;
}

/* 自定义滚动条样式 */
.outline-enhanced-container::-webkit-scrollbar {
    width: 8px;
}

.outline-enhanced-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.outline-enhanced-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
}

.outline-enhanced-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* 大纲头部导航 */
.outline-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
}

.outline-nav-btn {
    padding: 8px 18px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.outline-nav-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-1px);
}

.outline-nav-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 时间线视图 */
.outline-timeline {
    position: relative;
    padding-left: 40px;
    padding-right: 0;
    padding-bottom: 10px;
}

.outline-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 20px;
    width: 3px;
    background: linear-gradient(to bottom, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 2px;
}

.outline-timeline-item {
    position: relative;
    margin-bottom: 18px;
    padding-left: 20px;
}

.outline-timeline-item:last-child {
    margin-bottom: 0;
}

.outline-timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 3px solid #6366f1;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    z-index: 1;
}

.outline-timeline-item:hover::before {
    transform: scale(1.3);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.15);
}

/* 阶段卡片增强 */
.outline-stage-enhanced {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 13px;
}

.outline-stage-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.outline-stage-enhanced:hover {
    border-color: #6366f1;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
    transform: translateX(4px);
}

.outline-stage-enhanced:hover::before {
    opacity: 1;
}

/* 阶段头部 */
.outline-stage-header-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.outline-stage-number-enhanced {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.outline-stage-title-enhanced {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    flex: 1;
    min-width: 120px;
}

.outline-stage-chapters-enhanced {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.outline-stage-act {
    font-size: 11px;
    color: #8b5cf6;
    background: #f3e8ff;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* 阶段主体 */
.outline-stage-body-enhanced {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.outline-stage-summary {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    border-radius: 8px;
    border-left: 3px solid #6366f1;
    font-size: 13px;
}

.outline-stage-summary strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

/* 高潮点标签增强 */
.outline-highlight-tag-enhanced {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 4px 4px 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%);
    color: #854d0e;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(253, 224, 71, 0.3);
    transition: all 0.2s ease;
}

.outline-highlight-tag-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(253, 224, 71, 0.4);
}

/* 关键事件列表 */
.outline-key-events {
    margin: 10px 0;
    padding: 10px;
    background: #fafbfc;
    border-radius: 8px;
    font-size: 12px;
}

.outline-key-events ul {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
}

.outline-key-events li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 12px;
}

.outline-key-events li::before {
    content: '⚡';
    position: absolute;
    left: 4px;
    top: 0;
    font-size: 12px;
}

/* 冲突循环卡片 */
.outline-conflict-card {
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    font-size: 12px;
}

.outline-conflict-card p {
    margin: 4px 0;
    font-size: 12px;
}

.outline-conflict-card strong {
    color: #991b1b;
    font-size: 12px;
}

/* 卖点展示 */
.outline-selling-point {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    margin: 4px 4px 4px 0;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #1e40af;
}

.outline-selling-point::before {
    content: '💎';
    font-size: 12px;
}

/* 幕结构标记 */
.outline-act-marker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #6b21a8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 章节细纲折叠面板 */
.outline-chapters-accordion {
    margin-top: 20px;
    border-top: 2px solid #e2e8f0;
    padding-top: 16px;
}

.outline-chapter-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.outline-chapter-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.outline-chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(90deg, #fafbfc 0%, #ffffff 100%);
}

.outline-chapter-header:hover {
    background: #f8f9fa;
}

.outline-chapter-number {
    font-size: 13px;
    font-weight: 700;
    color: #6366f1;
    min-width: 60px;
}

.outline-chapter-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.outline-chapter-toggle {
    font-size: 18px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.outline-chapter-item.expanded .outline-chapter-toggle {
    transform: rotate(180deg);
}

.outline-chapter-body {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.outline-chapter-item.expanded .outline-chapter-body {
    padding: 16px;
    max-height: 1000px;
}

/* 章节详情 */
.outline-chapter-detail {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.outline-chapter-detail p {
    margin: 8px 0;
}

.outline-chapter-detail strong {
    color: #1e293b;
    font-weight: 600;
}

/* 统计面板 */
.outline-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
}

.outline-stat-item {
    text-align: center;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.outline-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
    display: block;
    margin-bottom: 4px;
}

.outline-stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 暗黑模式 */
[data-theme="dark"] .outline-enhanced-container {
    background: linear-gradient(to bottom, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] .outline-stage-enhanced,
[data-theme="dark"] .outline-chapter-item {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .outline-stage-title-enhanced,
[data-theme="dark"] .outline-chapter-title {
    color: #f1f5f9;
}

[data-theme="dark"] .outline-stage-summary,
[data-theme="dark"] .outline-key-events,
[data-theme="dark"] .outline-chapter-header {
    background: #1e293b;
}

[data-theme="dark"] .outline-stat-item {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

/* 响应式 */
@media (max-width: 768px) {
    .outline-enhanced-container {
        padding: 16px;
    }

    .outline-timeline {
        padding-left: 30px;
    }

    .outline-stage-header-enhanced {
        flex-direction: column;
        align-items: flex-start;
    }

    .outline-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
