:root {
    --bg-color: #05080a;
    --surface-color: rgba(16, 22, 28, 0.7);
    --primary-color: #00f2ff;
    --secondary-color: #7000ff;
    --accent-color: #00ff88;
    --text-main: #e0e6ed;
    --text-dim: #94a3b8;
    --card-border: rgba(255, 255, 255, 0.1);
    --card-blur: 15px;
    --glow-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(112, 0, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.05) 0%, transparent 50%);
}

/* 标题字体 */
h1, h2, h3 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 背景网格特效 */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    margin-left: 300px;
    transition: margin-left 0.3s ease;
}

/* Hero 区域 - 现代化渐变 + 舒适布局 */
header {
    height: 28vh;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: 
        linear-gradient(135deg, rgba(0, 242, 255, 0.08) 0%, transparent 60%),
        linear-gradient(225deg, rgba(112, 0, 255, 0.08) 0%, transparent 60%);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, rgba(0, 242, 255, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, 
            rgba(0, 242, 255, 0.08) 0%, 
            rgba(112, 0, 255, 0.05) 50%, 
            transparent 100%);
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.3));
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 800px;
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

/* 章节样式 - 舒适间距 */
section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 2.5rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 2rem;
    position: relative;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.12) 0%, rgba(0, 242, 255, 0.02) 80%, transparent 100%);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.section-header::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.5);
    animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    from { 
        opacity: 0.7;
        box-shadow: 0 0 12px rgba(0, 242, 255, 0.5);
    }
    to { 
        opacity: 1;
        box-shadow: 0 0 20px rgba(0, 242, 255, 0.8);
    }
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* 卡片样式 - 玻璃拟态 + 增强视觉效果 */
.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(var(--card-blur));
    -webkit-backdrop-filter: blur(var(--card-blur));
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2), 
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 242, 255, 0.05) inset;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(0, 242, 255, 0.6);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.3), 
        0 8px 24px rgba(0, 242, 255, 0.15),
        0 0 0 1px rgba(0, 242, 255, 0.2) inset;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.08),
            transparent);
    transition: 0.6s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card:hover::after {
    opacity: 1;
}

.glass-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.3);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 网格布局 - 舒适间距 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* SVG 容器 - 增强视觉效果 */
.svg-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 32px;
    margin: 24px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed rgba(0, 242, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 4px 16px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.svg-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.svg-container:hover::before {
    opacity: 1;
}

.svg-container:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: 
        inset 0 4px 20px rgba(0, 0, 0, 0.5), 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 242, 255, 0.3);
}

/* SVG 样式增强 */
svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 6px rgba(0, 242, 255, 0.2));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover svg {
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.4));
    transform: scale(1.05);
}

/* SVG 元素动画 */
svg path, svg circle, svg rect, svg polygon {
    transition: all 0.4s ease;
}

.glass-card:hover svg path, 
.glass-card:hover svg circle, 
.glass-card:hover svg rect, 
.glass-card:hover svg polygon {
    stroke-width: 3;
    filter: brightness(1.2);
}

/* 文案增强 - 标准可读性 */
p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.9;
    letter-spacing: 0.3px;
}

strong {
    color: var(--accent-color);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

ul {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
    line-height: 1.9;
    font-size: 1.05rem;
}

ul li {
    margin-bottom: 0.8rem;
    position: relative;
}

ul li::marker {
    color: var(--primary-color);
}

.highlight-box {
    background: rgba(112, 0, 255, 0.1);
    border-left: 5px solid var(--secondary-color);
    padding: 1.8rem;
    margin: 1.8rem 0;
    border-radius: 0 16px 16px 0;
    box-shadow: 
        0 4px 20px rgba(112, 0, 255, 0.15), 
        0 2px 8px rgba(112, 0, 255, 0.08),
        0 0 0 1px rgba(112, 0, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.highlight-box:hover {
    background: rgba(112, 0, 255, 0.12);
    box-shadow: 
        0 6px 28px rgba(112, 0, 255, 0.2), 
        0 4px 12px rgba(112, 0, 255, 0.12),
        0 0 0 1px rgba(112, 0, 255, 0.2) inset;
    transform: translateX(4px);
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
    opacity: 0.9;
    box-shadow: 0 0 8px var(--secondary-color);
}

/* 代码框样式 - 增强视觉效果 */
.code-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 242, 255, 0.3);
    border-radius: 12px;
    padding: 1.8rem;
    margin: 1.8rem 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    color: var(--accent-color);
    overflow-x: auto;
    position: relative;
    box-shadow: 
        inset 0 4px 12px rgba(0, 0, 0, 0.5), 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 242, 255, 0.1) inset;
    line-height: 1.8;
    transition: all 0.3s ease;
}

.code-box:hover {
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 
        inset 0 4px 12px rgba(0, 0, 0, 0.5), 
        0 6px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 242, 255, 0.15);
}

.code-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

.code-box strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* 动画定义 - 已移除标题发光动画 */

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0, 242, 255, 0.05);
    z-index: 1000;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

/* 浮动装饰物 */
.decoration {
    position: absolute;
    z-index: -1;
    filter: blur(50px);
    opacity: 0.1;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(16, 22, 28, 0.85) 0%, rgba(16, 22, 28, 0.75) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 2px solid rgba(0, 242, 255, 0.2);
    padding: 2rem 1rem;
    z-index: 999;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 242, 255, 0.05);
}

.sidebar-header h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-shadow: 0 0 3px rgba(0, 242, 255, 0.15);
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 1rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.9rem 1.2rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    position: relative;
}

.sidebar-nav a:hover {
    color: var(--primary-color);
    background: rgba(0, 242, 255, 0.1);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 242, 255, 0.15);
}

.sidebar-nav a.active {
    color: var(--primary-color);
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.1), rgba(0, 242, 255, 0.02));
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 1px 6px rgba(0, 242, 255, 0.1);
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: rgba(0, 242, 255, 0.05);
    transition: width 0.3s ease;
    z-index: -1;
}

.sidebar-nav a:hover::before {
    width: 100%;
}

/* 返回顶部按钮 - 现代化设计 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(112, 0, 255, 0.2));
    backdrop-filter: blur(var(--card-blur));
    -webkit-backdrop-filter: blur(var(--card-blur));
    border: 2px solid rgba(0, 242, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4), 
        0 4px 12px rgba(0, 242, 255, 0.15),
        0 0 0 4px rgba(0, 242, 255, 0.05);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.4), rgba(112, 0, 255, 0.4));
    border-color: rgba(0, 242, 255, 0.7);
    transform: translateY(-8px) scale(1.1);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5), 
        0 8px 16px rgba(0, 242, 255, 0.25),
        0 0 0 6px rgba(0, 242, 255, 0.1);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 4px rgba(0, 242, 255, 0.5));
}

.back-to-top:hover svg {
    fill: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 80px 0;
    color: var(--text-dim);
    border-top: 2px solid var(--card-border);
    margin-top: 60px;
    font-size: 1rem;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }

    .container {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }
    
    .glass-card {
        padding: 1.8rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 50px;
        height: 50px;
    }
    
    p, ul {
        font-size: 1rem;
    }
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    background: var(--surface-color);
    backdrop-filter: blur(var(--card-blur));
    border: 1px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }
}
