    :root {
        --bg: #f5f7fa;
        --card: #ffffff;
        --accent: #4f46e5;
        --muted: #6b7280;
        --border: #e5e7eb;
        --sidebar-width: 220px;
        --border-radius: 12px;
    }

    body {
        background: #dfdff5;
        margin: 0;
    }

    /* 顶部导航条 */
    .topbar {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }

    .topbar .left {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .topbar img {
        height: 36px;
        width: 36px;
        border-radius: 8px;
        background: #F38AB5;
        border-radius: 50%;
    }

    .topbar h1 {
        font-size: 18px;
        margin: 0;
        font-weight: 600;
    }

    .menu-btn {
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--accent);
        padding: 5px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -245px;
        /* 初始隐藏 */
        /* width: var(--sidebar-width); */
        width: 200px;
        height: 100%;
        background: var(--card);
        border-right: 1px solid var(--border);
        border-radius: 0 8px 8px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
        z-index: 200;
    }
    #menuTitle {
    flex-shrink: 0;
    margin-bottom: 12px;
    }

    #menuContainer {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 12px; /* 给滚动容器底部留空，防止内容被遮挡 */
    box-sizing: border-box;
    }

    /* 保证菜单项底部有间距 */
    .menu a:last-child,
    .submenu a.submenu-item:last-child {
    margin-bottom: 12px;
    }
    .sidebar.active {
        left: 0;
    }

    .sidebar h2 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 20px;
        color: #111827;
    }

    .menu a {
        display: block;
        padding: 10px 12px;
        margin-bottom: 6px;
        border: 1px solid var(--border);
        text-decoration: none;
        color: #111827;
        border-radius: 8px;
        font-size: 14px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .menu a:hover {
        background: #eef2ff;
        color: var(--accent);
    }

    .menu a.active {
        background: var(--accent);
        color: white;
        font-weight: 600;
    }

    /* 遮罩层，用于点击关闭 */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 150;
    }

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .menu a.has-submenu {
        cursor: pointer;
        position: relative;
        padding-right: 24px;
        /* 给右边留空间显示箭头 */
    }

    .menu a.has-submenu::after {
        content: "◀";
        /* 默认向左箭头 */
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        transition: transform 0.3s ease;
    }

    .menu a.has-submenu.active::after {
        content: "▼";
        /* 展开时向下箭头 */
        transform: translateY(-50%);
    }

    .submenu {
        margin-left: 16px;
        border-left: 2px solid var(--border);
        padding-left: 10px;
        display: none;
        flex-direction: column;
    }

    .submenu a.submenu-item {
        display: block;
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 6px;
        margin-bottom: 6px;
        color: #111827;
        text-decoration: none;
    }

    .submenu a.submenu-item.active {
        background: var(--accent);
        color: white;
        font-weight: 600;
    }

    .submenu a.submenu-item:hover {
        background: #eef2ff;
        color: var(--accent);
    }