:root {
    --bg-main: #0b0d14;
    --bg-card: #151822;
    --bg-glass: rgba(255,255,255,0.05);
    --red: #ff2a4e;
    --yellow: #ffd300;
    --blue: #0099ff;
    --white: #ffffff;
    --gray: #b0b8c4;
    --border-line: rgba(255,255,255,0.1);
    --warn-bg: rgba(255, 180, 0, 0.1);
    --code-bg: #10121a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.85;
}

/* 原版激进几何背景（完整保留，不删减动画） */
.bg-geo {
    position: fixed;
    z-index: -1;
    opacity: 0.55;
    pointer-events: none;
}
.bg-geo-1 {
    top: -20%;
    left: -15%;
    width: 60%;
    height: 70%;
    background: var(--red);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    animation: geoFloat1 7s ease-in-out infinite alternate;
}
.bg-geo-2 {
    bottom: -25%;
    right: -15%;
    width: 40%;
    height: 40%;
    background: var(--yellow);
    transform: rotate(25deg);
    animation: geoFloat2 8s ease-in-out infinite alternate;
}
@keyframes geoFloat1 {
    0% { transform: translate(0,0) rotate(0deg); }
    100% { transform: translate(30px,40px) rotate(8deg); }
}
@keyframes geoFloat2 {
    0% { transform: rotate(25deg) translate(0,0); }
    100% { transform: rotate(35deg) translate(-25px,-35px); }
}

/* 导航栏（原版毛玻璃） */
nav {
    width: 100%;
    padding: 22px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-line);
    background: rgba(11,13,20,0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
}
.nav-logo {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 2px;
}
.nav-menu a {
    color: var(--gray);
    text-decoration: none;
    margin-left: 32px;
    transition: 0.35s ease;
}
.nav-menu a:hover {
    color: var(--blue);
}
.nav-menu a.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

/* 文档主布局 左大纲+右内容 */
.doc-container {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 45px;
    max-width: 1250px;
    margin: 70px auto;
    padding: 0 35px;
}

/* 高级侧边大纲栏 */
.doc-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
    background: var(--bg-card);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
    padding: 32px 22px;
    transition: 0.4s;
}
.doc-sidebar h4 {
    font-size: 1.35rem;
    margin-bottom: 22px;
    border-left: 4px solid var(--blue);
    padding-left: 12px;
}
.anchor-item {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin: 14px 0;
    padding: 10px 12px;
    border-radius: 4px;
    border-left: 3px solid transparent;
    transition: 0.3s;
}
.anchor-item.active {
    color: var(--blue);
    background: rgba(0,153,255,0.08);
    border-left-color: var(--blue);
}
.anchor-item:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

/* 切角卡片（原版高级卡片） */
.cut-card {
    background: var(--bg-card);
    padding: 45px 38px;
    margin-bottom: 45px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
    position: relative;
    overflow: hidden;
    transition: 0.45s ease;
}
.cut-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 55px;
    height: 55px;
    border-top: 3px solid var(--red);
    border-left: 3px solid var(--red);
}
.cut-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(0,153,255,0.13);
}

/* 完整文档渲染组件 */
.doc-h2 {
    font-size: 1.9rem;
    margin: 35px 0 18px;
    scroll-margin-top: 130px;
    color: #fff;
}
.doc-p {
    color: var(--gray);
    margin-bottom: 18px;
    font-size: 1.08rem;
}
.doc-ul {
    color: var(--gray);
    padding-left: 25px;
    margin-bottom: 18px;
}
.doc-ul li {
    margin-bottom: 10px;
}
.doc-code {
    background: var(--code-bg);
    padding: 18px;
    border-radius: 6px;
    margin: 20px 0;
    color: #a0cfff;
    overflow-x: auto;
}
.doc-tip {
    background: rgba(0,153,255,0.09);
    border-left: 4px solid var(--blue);
    padding: 16px 22px;
    margin: 22px 0;
    color: var(--gray);
}
.doc-warn {
    background: var(--warn-bg);
    border-left: 4px solid var(--yellow);
    padding: 16px 22px;
    margin: 22px 0;
    color: #e5e0c8;
}
.doc-line {
    height: 1px;
    background: var(--border-line);
    margin: 35px 0;
}

/* 通用按钮 */
.btn {
    display: inline-block;
    margin-top: 22px;
    padding: 13px 32px;
    border: 2px solid var(--blue);
    color: var(--blue);
    text-decoration: none;
    transition: 0.35s ease;
}
.btn:hover {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 0 15px rgba(0,153,255,0.25);
}

/* 移动端完整适配 */
@media (max-width:768px) {
    .doc-container {
        grid-template-columns: 1fr;
    }
    .doc-sidebar {
        display: none;
    }
    nav {
        padding: 16px 22px;
    }
    .nav-menu a {
        margin-left: 16px;
    }
    .bg-geo {
        display: none;
    }
}
