﻿:root {
    --bg: #f5f3ef;
    --surface: #ffffff;
    --accent: #2a6f5b;
    --accent-glow: rgba(42,111,91,0.08);
    --text-primary: #1a1a1a;
    --text-secondary: #555550;
    --text-muted: #8a8a82;
    --border: #e2dfd8;
    --border-light: #edeae4;
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-w: 230px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
        pointer-events: none;
        z-index: 9999;
    }

/* ========== Layout ========== */
.page-wrap {
    max-width: 1100px;
    margin: 10px auto 0 auto;
    /*padding: 28px 32px 64px;*/
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 140px;
}

.sidebar-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.nav-group {
    border-bottom: 1px solid var(--border-light);
}

    .nav-group:last-child {
        border-bottom: none;
    }

/* ---- 模块标题（可点击折叠/展开） ---- */
.nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    background: none;
    border: none;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

    .nav-group-toggle:hover {
        background: var(--accent-glow);
        color: var(--accent);
    }

    .nav-group-toggle .arrow {
        font-size: 10px;
        color: var(--text-muted);
        transition: transform 0.25s ease;
        display: inline-block;
    }

.nav-group.collapsed .arrow {
    transform: rotate(-90deg);
}

/* ---- 子链接容器 ---- */
.nav-links-wrap {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-group.collapsed .nav-links-wrap {
    max-height: 0 !important;
}

/* ---- 单个链接 ---- */
.nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 20px 9px 32px;
    background: none;
    border: none;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    position: relative;
    text-decoration: none;
}

    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: var(--accent);
        border-radius: 0 3px 3px 0;
        transition: height 0.25s ease;
    }

    .nav-link:hover {
        color: var(--accent);
        background: var(--accent-glow);
    }

    /* ---- 选中状态：手动给链接加 active 类即可 ---- */
    .nav-link.active {
        color: var(--accent);
        font-weight: 600;
        background: var(--accent-glow);
    }

        .nav-link.active::before {
            height: 18px;
        }

    .nav-link i {
        margin-left: 4px;
    }

        .nav-link i::before {
            content: "↗";
            width: 12px;
            font-size: 12px;
            line-height: inherit;
        }

    /* ========== Main Content ========== */
    .main-area {
        flex: 1;
        min-width: 0;
    }

/* ---- Hero Banner ---- */
.page-hero {
    background: linear-gradient(135deg, #1e3a2f 0%, #2a5a47 50%, #1e3a2f 100%);
    border-radius: var(--radius);
    padding: 30px 34px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

    .page-hero::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -12%;
        width: 240px;
        height: 240px;
        background: radial-gradient(circle, rgba(42,111,91,0.3) 0%, transparent 70%);
        border-radius: 50%;
    }

    .page-hero h1 {
        font-family: 'Noto Serif SC', serif;
        font-size: 23px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 4px;
        position: relative;
        z-index: 1;
    }

    .page-hero p {
        font-size: 13px;
        color: rgba(255,255,255,0.5);
        position: relative;
        z-index: 1;
        margin: 0;
    }

.content-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    overflow: hidden;
}
.card-header {
    padding: 15px 24px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fafaf8 0%, #f7f5f0 100%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-icon {
    width: 26px;
    height: 26px;
    background: var(--accent-glow);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent);
    border: 1px solid rgba(42,111,91,0.1);
    flex-shrink: 0;
}

.card-header h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px 28px 32px;
}
/* ========== Responsive ========== */
@media (max-width: 820px) {
    .page-wrap {
        flex-direction: column;
        padding: 20px 16px 48px;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .page-hero {
        padding: 22px 20px;
    }

        .page-hero h1 {
            font-size: 19px;
        }

    .card-body {
        padding: 18px 18px 24px;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-tags {
        justify-content: center;
    }
    .inner-panel {
        padding: 20px 18px 24px;
    }

        .inner-panel .card-grid {
            grid-template-columns: 1fr;
        }

    .inner-tab {
        font-size: 12px;
        padding: 10px 8px;
    }
    .license-img {
        max-width: 100%;
    }
}
