/* 全站共享导航样式：左侧树形导航 + 右侧内容区布局
   配色主题：深蓝渐变侧栏 + 琥珀金点缀 + 白色卡片内容区 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #eef2f8;
    color: #2c3e50;
}

/* ===== 左侧导航：深蓝渐变 ===== */
#site-nav {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1f3a63 0%, #2c5588 60%, #35699f 100%);
    overflow-y: auto;
    padding: 14px 0 24px;
    box-shadow: 2px 0 12px rgba(31, 58, 99, 0.18);
}

/* 侧栏滚动条 */
#site-nav::-webkit-scrollbar {
    width: 8px;
}
#site-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}
#site-nav::-webkit-scrollbar-track {
    background: transparent;
}

/* 树 */
.nav-list {
    list-style: none;
    padding-left: 0;
}

.nav-list .nav-list {
    padding-left: 16px;
}

/* 有子节点的分组标题 */
.node-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 8px;
    margin: 1px 8px;
    transition: background 0.15s, color 0.15s;
}

.node-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* 展开/折叠箭头 */
.node-toggle::before {
    content: "▾";
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    transition: transform 0.15s;
}

li.collapsed > .node-toggle::before {
    transform: rotate(-90deg);
}

li.collapsed > .nav-list {
    display: none;
}

/* 叶子节点 */
.node-leaf {
    display: block;
    padding: 7px 16px 7px 38px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-radius: 8px;
    margin: 1px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s, transform 0.15s;
}

.node-leaf:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateX(2px);
}

/* 当前页高亮：琥珀金 */
.node-leaf.active {
    background: linear-gradient(90deg, #ffc93c, #ffb52e);
    color: #1f3a63;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 197, 60, 0.35);
}

/* ===== 右侧内容区 ===== */
main {
    flex: 1;
    min-width: 0;
    padding: 36px 44px;
    overflow-y: auto;
    background:
        radial-gradient(1200px 400px at 90% -10%, rgba(255, 197, 60, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(53, 105, 159, 0.10), transparent 55%),
        #eef2f8;
}

/* 内容标题：装饰线 */
main h1 {
    font-size: 24px;
    color: #1f3a63;
    padding-bottom: 14px;
    margin-bottom: 26px;
    position: relative;
    letter-spacing: 1px;
}

main h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #2c5588, #ffc93c);
}

/* 内容卡片 */
main .content-placeholder {
    margin-top: 4px;
    min-height: 58vh;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e3eaf3;
    box-shadow: 0 6px 24px rgba(31, 58, 99, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8fa0b4;
    font-size: 15px;
}

main .content-placeholder::before {
    content: "📺";
    font-size: 42px;
    filter: grayscale(0.2);
}

/* ===== 台词（Transcript） ===== */
.transcript {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e3eaf3;
    box-shadow: 0 6px 24px rgba(31, 58, 99, 0.08);
    padding: 28px 32px 36px;
}

/* 场景标题 */
.scene-title {
    text-align: center;
    font-size: 13px;
    letter-spacing: 1px;
    color: #8fa0b4;
    font-weight: 600;
    margin: 34px 0 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scene-title::before,
.scene-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d5dde8);
}

.scene-title::after {
    background: linear-gradient(90deg, #d5dde8, transparent);
}

.scene-title:first-child {
    margin-top: 0;
}

/* 单个对话行 */
.line {
    display: flex;
    gap: 16px;
    padding: 6px 0;
    line-height: 1.75;
    font-size: 15px;
    color: #34495e;
}

.line:hover {
    background: #f7fafd;
    border-radius: 8px;
}

/* 角色名 */
.speaker {
    flex-shrink: 0;
    min-width: 150px;
    text-align: right;
    font-weight: 700;
    color: #2c5588;
    font-size: 13.5px;
    padding-top: 3px;
}

.speaker::after {
    content: "：";
    color: #8fa0b4;
    font-weight: 400;
}

/* 台词正文 */
.text {
    flex: 1;
    color: #2c3e50;
}

/* 行内容许换行（讲解卡占满整行） */
.line {
    flex-wrap: wrap;
}

/* 💡 讲解按钮 */
.note-btn {
    flex-shrink: 0;
    align-self: center;
    background: #f0f4fa;
    border: 1px solid #e3eaf3;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
    transition: transform 0.15s, opacity 0.15s, background 0.15s;
}

.note-btn:hover {
    opacity: 1;
    transform: scale(1.15);
    background: #e8f2fd;
}

.note-btn.open {
    opacity: 1;
    background: #e8f2fd;
    border-color: #2c5588;
}

/* 讲解卡 */
.note-card {
    flex-basis: 100%;
    margin: 8px 0 10px 166px;
    background: #fffbf0;
    border: 1px solid #f3e5b8;
    border-left: 4px solid #ffc93c;
    border-radius: 10px;
    padding: 12px 16px;
    animation: note-slide 0.18s ease-out;
}

@keyframes note-slide {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-item {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #4a5568;
}

.note-label {
    flex-shrink: 0;
    min-width: 74px;
    font-weight: 700;
    color: #b7791f;
}

.note-value {
    flex: 1;
}
