 :root {
    --bg: #0d0d0f;
    --card: rgba(255, 255, 255, 0.04);
    --blur: blur(14px);
    --grad: linear-gradient(135deg, #6a5af9, #7357ff, #8f6aff);
 }

  body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: #fff;
    display: flex;
    height: 100vh;
    overflow: hidden;

  }

  .base-back-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 12px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.base-back-btn:hover {
    opacity: 1;
}

.base-back-btn .base-back-icon {
    width: 22px;
    height: 22px;
    display: block;
}
  /* ---------------- 顶部栏 ---------------- */
  .base-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 2000;
  }

  .base-header .menu-btn {
    font-size: 26px;
    cursor: pointer;
    margin-right: 12px;
  }

  .base-header .logo {
    font-size: 20px;
    font-weight: bold;
  }
/*-----------------遮罩------------------------*/

.base-sidebar-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    background: rgba(0,0,0,0.0); /* 完全透明，可根据需要改成 0.2 */
    display: none;
    z-index: 1400; /* 比主内容高，比 sidebar(1500) 低 */
}

/* 当 sidebar 展开时显示蒙层 */
.base-sidebar.opened + .base-sidebar-overlay {
    display: block;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .base-sidebar-overlay {
        top: 0;
        height: 100vh;
    }
}


  /* ---------------- 侧边栏 ---------------- */

.base-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 80px;
    height: calc(100vh - 56px);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: var(--blur);
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    z-index: 1500;

    display: flex;
    flex-direction: column;
}

/* 展开时宽度 */
.base-sidebar.opened {
    width: 240px;
}

/* 手机端抽屉模式 */
@media (max-width: 768px) {
  .base-sidebar {
    transform: translateX(-100%);
    width: 240px;
    z-index: 3000;
  }
  .base-sidebar.opened {
    transform: translateX(0);
  }
}

/* ------- 可滚动内容区域 ------- */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden; /* 🔥 防止左右滚动条 */
    padding-top: 20px;
}

/* 隐藏滚动条（可选） */
.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ------- 底部固定备案区 ------- */
.sidebar-footer {
    padding: 10px 12px;
    font-size: 12px;
    display: none; /* 🔥 默认隐藏 */
    align-items: center;
    gap: 6px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
    white-space: nowrap;
}

.sidebar-footer a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
}

.sidebar-footer a:hover {
    opacity: 1;
}

/* 🔥侧边栏展开时才显示备案号 */
.base-sidebar.opened .sidebar-footer {
    display: flex;
}

/* 固定备案图标 */
.beian-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* 你的原菜单样式保持不动 */
.base-sidebar .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 6px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}
.base-sidebar .menu-item:hover {
    background: var(--grad);
}
.base-sidebar .menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    font-size: 25px;
}
.base-sidebar .menu-title {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}
.base-sidebar.opened .menu-title {
    opacity: 1;
}

 /* ----------------------------------------------------------- */


  #baseMain {
    flex: 1;
    margin-top: 56px;
    margin-left: 80px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    transition: margin-left 0.3s;
  }

  .base-sidebar.opened ~ main#baseMain {
    margin-left: 240px;
  }

  @media (max-width: 768px) {
    #baseMain {
      margin-left: 0;
    }
    .base-sidebar.opened ~ main#baseMain {
      margin-left: 0;
    }
  }
