/* css/legal.css - 法律中心公共样式 v3.1 */
:root {
    --bg-deep: #0a0e14;
    --bg-panel: #111820;
    --bg-card: rgba(18, 24, 33, 0.85);
    --gold: #C9A96E;
    --gold-dim: rgba(201, 169, 110, 0.25);
    --gold-glow: rgba(201, 169, 110, 0.12);
    --blue: #7EB8DA;
    --blue-dim: rgba(126, 184, 218, 0.2);
    --purple: #9B8EC4;
    --text-primary: #d6dce5;
    --text-secondary: #8a94a6;
    --text-dim: #5a6475;
    --border-subtle: rgba(201, 169, 110, 0.1);
    --border-medium: rgba(201, 169, 110, 0.22);
    --danger: #c75c5c;
    --success: #6b9e7a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body, html {
    min-height: 100vh;
    background-color: var(--bg-deep);
    background-image: radial-gradient(ellipse at 50% 0%, #131a24 0%, var(--bg-deep) 65%);
    color: var(--text-primary);
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,169,110,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,169,110,0.35); }

/* ====== 顶部导航 ====== */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 30px; max-width: 1280px; margin: 0 auto;
    border-bottom: 1px solid var(--border-subtle);
}
.topbar-brand {
    font-size: 1.1rem; font-weight: 600; letter-spacing: 1.5px;
    background: linear-gradient(90deg, var(--gold), #e0c98a);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    display: flex; align-items: center; gap: 10px;
}
.topbar-brand i { -webkit-text-fill-color: var(--gold); font-size: 1.25rem; }
.topbar-links { display: flex; gap: 18px; align-items: center; }
.topbar-links a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.88rem;
    transition: color 0.25s; display: inline-flex; align-items: center; gap: 5px;
}
.topbar-links a:hover { color: var(--gold); }
.topbar-links a.active { color: var(--gold); font-weight: 600; }

/* ====== 二级导航（四页互跳） ====== */
.legal-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 14, 20, 0.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle); padding: 0 30px;
}
.legal-nav-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; gap: 6px;
    overflow-x: auto; padding: 10px 0; scrollbar-width: none;
}
.legal-nav-inner::-webkit-scrollbar { display: none; }
.legal-nav a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 18px; border-radius: 24px;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.86rem; white-space: nowrap;
    border: 1px solid transparent; transition: all 0.25s;
}
.legal-nav a:hover { color: var(--gold); background: var(--gold-glow); border-color: var(--gold-dim); }
.legal-nav a.active {
    color: var(--bg-deep); background: linear-gradient(135deg, var(--gold), #d4b87a);
    border-color: var(--gold); font-weight: 600;
    box-shadow: 0 4px 16px rgba(201, 169, 110, 0.25);
}

/* ====== 主布局 ====== */
.legal-layout {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: 220px 1fr;
    gap: 40px; padding: 40px 30px 60px;
}
.toc-sidebar {
    position: sticky; top: 80px; align-self: start;
    max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 8px;
}
.toc-sidebar::-webkit-scrollbar { width: 3px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }
.toc-title {
    font-size: 0.72rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 16px; padding-left: 4px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 2px; }
.toc-list a {
    display: block; padding: 7px 12px;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.82rem; border-radius: 8px;
    border-left: 2px solid transparent;
    transition: all 0.2s; line-height: 1.4; cursor: pointer;
}
.toc-list a:hover { color: var(--text-primary); background: var(--gold-glow); }
.toc-list a.active {
    color: var(--gold); background: var(--gold-glow);
    border-left-color: var(--gold); font-weight: 600;
}

/* ====== 内容区 ====== */
.legal-content { min-width: 0; }
.legal-section-header {
    margin-bottom: 32px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.legal-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 12px; border-radius: 12px;
    font-size: 0.72rem; letter-spacing: 0.5px; margin-bottom: 14px;
}
.legal-badge.gold { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-dim); }
.legal-badge.blue { background: rgba(126,184,218,0.1); color: var(--blue); border: 1px solid var(--blue-dim); }
.legal-badge.purple { background: rgba(155,142,196,0.1); color: var(--purple); border: 1px solid rgba(155,142,196,0.2); }
.legal-title {
    font-size: 1.65rem; font-weight: 500; letter-spacing: 3px; margin-bottom: 8px;
    background: linear-gradient(90deg, var(--gold), #e0c98a);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.legal-title.blue {
    background: linear-gradient(90deg, var(--blue), #a0d0ea);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.legal-title.purple {
    background: linear-gradient(90deg, var(--purple), #b8acda);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.legal-subtitle { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }

.section-heading {
    display: flex; align-items: center; gap: 12px;
    margin: 40px 0 18px;
    scroll-margin-top: 90px;
}
.section-heading::before {
    content: ''; width: 3px; height: 22px;
    background: linear-gradient(180deg, var(--gold), #d4b87a);
    border-radius: 2px; box-shadow: 0 0 10px rgba(201,169,110,0.4);
    flex-shrink: 0;
}
.section-heading h3 {
    font-size: 1.05rem; font-weight: 600; color: var(--text-primary);
    letter-spacing: 0.5px;
}
.section-heading h4 {
    font-size: 0.92rem; font-weight: 600; color: var(--blue);
    letter-spacing: 0.5px;
}
.section-heading.blue::before { background: linear-gradient(180deg, var(--blue), #a0d0ea); box-shadow: 0 0 10px rgba(126,184,218,0.4); }

.content-paragraph {
    color: var(--text-secondary); font-size: 0.9rem;
    line-height: 1.9; margin-bottom: 14px;
}
.content-paragraph strong { color: var(--text-primary); font-weight: 600; }
.content-paragraph a { color: var(--blue); text-decoration: none; }
.content-paragraph a:hover { text-decoration: underline; }
.content-paragraph code {
    background: rgba(201,169,110,0.1); color: var(--gold);
    padding: 1px 6px; border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace; font-size: 0.85em;
}

.content-list { list-style: none; padding: 0; margin: 16px 0; }
.content-list li {
    position: relative; padding: 9px 0 9px 26px;
    color: var(--text-secondary); font-size: 0.9rem;
    line-height: 1.8;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.content-list li:last-child { border-bottom: none; }
.content-list li::before {
    content: ''; position: absolute; left: 6px; top: 18px;
    width: 5px; height: 5px;
    background: var(--gold); border-radius: 50%;
    box-shadow: 0 0 6px rgba(201,169,110,0.5);
}
.content-list li strong { color: var(--gold); font-weight: 600; }
.content-list li a { color: var(--blue); text-decoration: none; }
.content-list li a:hover { text-decoration: underline; }
.content-list li code {
    background: rgba(201,169,110,0.1); color: var(--gold);
    padding: 1px 6px; border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace; font-size: 0.85em;
}

.notice-box {
    padding: 18px 22px; border-radius: 10px; margin: 22px 0;
    border-left: 3px solid; font-size: 0.88rem; line-height: 1.85;
}
.notice-box.info { background: rgba(126,184,218,0.06); border-left-color: var(--blue); color: #a8cfe6; }
.notice-box.warning { background: rgba(201,169,110,0.06); border-left-color: var(--gold); color: #dcc89a; }
.notice-box.danger { background: rgba(199,92,92,0.07); border-left-color: var(--danger); color: #da9a9a; }
.notice-box.success { background: rgba(107,158,122,0.06); border-left-color: var(--success); color: #a0d4b0; }
.notice-box h4 {
    font-size: 0.92rem; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.notice-box.info h4 { color: var(--blue); }
.notice-box.warning h4 { color: var(--gold); }
.notice-box.danger h4 { color: #da9a9a; }
.notice-box.success h4 { color: #a0d4b0; }
.notice-box a { color: inherit; text-decoration: underline; }

.grid-2col {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; margin: 20px 0;
}
.grid-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 22px 18px; text-align: center;
}
.grid-card .gc-icon { font-size: 1.6rem; color: var(--gold); margin-bottom: 10px; }
.grid-card .gc-title { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 8px; font-weight: 600; }
.grid-card .gc-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.65; }

.term-list {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: 10px; padding: 6px 22px; margin: 18px 0;
}
.term-list .term-item {
    padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.88rem; line-height: 1.75; color: var(--text-secondary);
}
.term-list .term-item:last-child { border-bottom: none; }
.term-list .term-label { color: var(--gold); font-weight: 600; margin-right: 6px; }

/* ====== 页脚 ====== */
.footer {
    text-align: center; padding: 40px 30px 50px;
    border-top: 1px solid var(--border-subtle);
    max-width: 1280px; margin: 0 auto;
}
.footer-links-title { color: var(--text-dim); font-size: 0.78rem; margin-bottom: 14px; letter-spacing: 1.5px; }
.footer-links-grid {
    display: flex; justify-content: center; gap: 18px;
    flex-wrap: wrap; margin-bottom: 24px;
}
.footer-links-grid a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.84rem; padding: 7px 16px; border-radius: 20px;
    border: 1px solid var(--border-subtle);
    transition: all 0.25s;
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-links-grid a:hover {
    color: var(--gold); border-color: var(--gold-dim);
    background: var(--gold-glow); transform: translateY(-2px);
}
.footer-copyright {
    color: var(--text-dim); font-size: 0.76rem;
    line-height: 1.8; font-family: 'Courier New', monospace;
}
.footer-copyright a { color: var(--gold-dim); text-decoration: none; }
.footer-copyright a:hover { color: var(--gold); }

.version-panel {
    display: inline-block; margin: 22px auto 4px;
    text-align: left; max-width: 640px; width: 100%;
}
.version-summary {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 18px 9px 16px;
    background: linear-gradient(135deg, rgba(201,169,110,0.055) 0%, rgba(201,169,110,0.02) 100%);
    border: 1px solid rgba(201,169,110,0.16);
    border-radius: 100px; cursor: pointer; list-style: none;
    outline: none; font-size: 0.76rem; letter-spacing: 0.4px; user-select: none;
    transition: all 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.version-summary::-webkit-details-marker { display: none; }
.version-summary:hover {
    border-color: rgba(201,169,110,0.42);
    background: linear-gradient(135deg, rgba(201,169,110,0.1) 0%, rgba(201,169,110,0.04) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201,169,110,0.1);
}
.vs-tag {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--gold); font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-weight: 700; letter-spacing: 1.5px; font-size: 0.78rem;
}
.vs-tag i { font-size: 0.82em; opacity: 0.85; transition: transform 0.4s ease; }
.version-panel[open] .vs-tag i { transform: rotate(180deg); }
.vs-date {
    color: var(--text-dim); font-family: 'SF Mono', 'Consolas', monospace;
    padding-left: 12px; border-left: 1px solid rgba(201,169,110,0.14);
    letter-spacing: 0.6px; font-size: 0.72rem;
}
.vs-hint {
    color: var(--text-secondary); flex: 1; text-align: left;
    padding-left: 12px; font-size: 0.72rem; letter-spacing: 0.3px;
    opacity: 0.85; transition: opacity 0.3s;
}
.version-summary:hover .vs-hint { opacity: 1; }
.version-panel[open] .vs-hint { opacity: 0.55; }
.vs-chevron {
    color: var(--gold); font-size: 0.68rem; opacity: 0.7;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s;
    display: inline-flex; align-items: center;
}
.version-panel[open] .vs-chevron { transform: rotate(180deg); opacity: 1; }
.version-content {
    margin-top: 12px; padding-left: 4px;
    animation: versionReveal 0.42s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@keyframes versionReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.vc-title {
    display: flex; align-items: center; gap: 8px;
    padding: 0 0 12px 0; margin-bottom: 4px;
    color: var(--text-dim); font-size: 0.7rem;
    letter-spacing: 2px; text-transform: uppercase;
    font-family: 'SF Mono', 'Consolas', monospace;
}
.vc-title i { color: var(--gold); font-size: 0.85em; opacity: 0.75; }
.vc-list {
    list-style: none; padding: 14px 22px 14px 20px; margin: 0;
    background: rgba(201,169,110,0.025);
    border-left: 2px solid var(--gold); border-radius: 0 10px 10px 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px;
    position: relative;
}
.vc-list::before {
    content: ''; position: absolute; top: 0; left: -2px; bottom: 0; width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--gold) 15%, var(--gold) 85%, transparent 100%);
    border-radius: 2px; opacity: 0.85;
}
.vc-list li {
    position: relative; padding: 6px 0 6px 16px;
    color: var(--text-secondary); font-size: 0.74rem; line-height: 1.65;
    border-bottom: 1px solid rgba(255,255,255,0.028);
    letter-spacing: 0.15px;
}
.vc-list li:nth-last-child(-n+2) { border-bottom: none; }
.vc-list li::before {
    content: ''; position: absolute; left: 3px; top: 14px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 6px rgba(201,169,110,0.55); opacity: 0.75; transition: all 0.25s;
}
.vc-list li:hover { color: var(--text-primary); }
.vc-list li:hover::before { opacity: 1; box-shadow: 0 0 10px rgba(201,169,110,0.9); transform: scale(1.15); }

/* ====== 响应式 ====== */
@media (max-width: 1024px) {
    .legal-layout { grid-template-columns: 180px 1fr; gap: 28px; }
}
@media (max-width: 768px) {
    .topbar { padding: 14px 18px; flex-wrap: wrap; gap: 10px; }
    .topbar-brand { font-size: 0.95rem; }
    .topbar-links { gap: 12px; font-size: 0.82rem; }
    .legal-nav { padding: 0 14px; }
    .legal-nav a { padding: 7px 14px; font-size: 0.8rem; }
    .legal-layout {
        grid-template-columns: 1fr;
        padding: 24px 18px 40px; gap: 0;
    }
    .toc-sidebar {
        position: static; max-height: none; margin-bottom: 24px;
        display: flex; flex-wrap: wrap; gap: 6px; padding: 0;
    }
    .toc-title { width: 100%; margin-bottom: 8px; }
    .toc-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .toc-list li { margin: 0; }
    .toc-list a {
        padding: 5px 12px; font-size: 0.76rem;
        border-radius: 16px; border-left: none;
        border: 1px solid var(--border-subtle);
    }
    .toc-list a.active { border-color: var(--gold-dim); border-left: none; }
    .legal-title { font-size: 1.3rem; letter-spacing: 2px; }
    .content-paragraph, .content-list li { font-size: 0.85rem; }
    .footer-links-grid { gap: 8px; }
    .footer-links-grid a { padding: 5px 12px; font-size: 0.78rem; }
    .version-panel { margin-top: 18px; }
    .version-summary { padding: 8px 14px; gap: 10px; font-size: 0.72rem; }
    .vs-tag { font-size: 0.72rem; letter-spacing: 1.2px; }
    .vs-date { font-size: 0.68rem; padding-left: 10px; }
    .vs-hint { display: none; }
    .vc-list { grid-template-columns: 1fr; padding: 12px 16px; gap: 0; }
    .vc-list li { font-size: 0.72rem; padding: 5px 0 5px 14px; }
    .vc-list li::before { top: 13px; width: 4px; height: 4px; }
    .vc-list li:last-child { border-bottom: none; }
}
@media (max-width: 480px) {
    .topbar-links a span { display: none; }
    .topbar-links { gap: 14px; }
    .legal-title { font-size: 1.15rem; }
    .section-heading h3 { font-size: 0.95rem; }
}