/* ======================================================================
   [0x1A2B] 全局变量与重置
   ====================================================================== */
:root {
    --bg-body: #000000;
    --bg-card: #0a0a0a;
    --bg-sidebar: #0d0d0d;
    --border-color: #444;
    --border-light: #555;
    --text-primary: #e0e0e0;
    --text-secondary: #aaa;
    --text-muted: #666;
    --shadow-color: rgba(0,0,0,0.6);
    --nav-bg: rgba(13,13,13,0.92);
    --input-bg: #141414;
    --input-border: #3a3a3a;
}
body.light-mode {
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #f8f9fa;
    --border-color: #ccc;
    --border-light: #bbb;
    --text-primary: #222;
    --text-secondary: #555;
    --text-muted: #999;
    --shadow-color: rgba(0,0,0,0.08);
    --nav-bg: rgba(255,255,255,0.95);
    --input-bg: #f0f0f0;
    --input-border: #ccc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    transition: background 0.3s, color 0.3s;
    padding-top: 60px;
}

/* ======================================================================
   [0x3C4D] 顶栏
   ====================================================================== */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}
/* 顶栏品牌文字（🌌 OC·世界）的样式随文字一起删了（2026-10-01）*/

/* ======================================================================
   [0x8E7F] 主题切换
   ====================================================================== */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: auto;   /* 顶栏品牌文字删掉后，靠它继续贴在最右边 */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px;
    cursor: pointer;
    position: relative;
    width: 64px;
    height: 34px;
    transition: background 0.3s, border-color 0.3s;
    user-select: none;
}
.theme-toggle .slider {
    position: absolute;
    left: 4px; top: 4px;
    width: 26px; height: 26px;
    background: #5b9aff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}
body.light-mode .theme-toggle .slider {
    transform: translateX(30px);
    background: #f9d71c;
}
.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
    position: absolute;
    font-size: 16px;
    transition: opacity 0.3s;
}
.theme-toggle .icon-moon { left: 8px; opacity: 1; }
.theme-toggle .icon-sun { right: 8px; opacity: 0.3; }
body.light-mode .theme-toggle .icon-moon { opacity: 0.3; }
body.light-mode .theme-toggle .icon-sun { opacity: 1; }

/* ======================================================================
   [0x5B9A] 主布局
   ====================================================================== */
.app {
    display: flex;
    height: calc(100vh - 60px);
    width: 100vw;
}

/* ======================================================================
   [0x9D4E] 侧边栏
   ====================================================================== */
.sidebar {
    /* [0x9D4E] 宽度跟着显示器走，不写死：约占屏幕 13.2%
       （1708px 宽的窗口上 ≈226px，原来固定 180px，大屏上侧栏显得太窄）。
       上下限是防极端：窄屏不至于被挤没，超宽屏不至于吃掉主内容。 */
    width: 13.2%;
    min-width: 150px;
    max-width: 340px;
    flex: 0 0 auto;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 40px clamp(14px, 1.2vw, 26px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    overflow-y: auto;
    transition: background 0.3s, border-color 0.3s;
}
/* 侧边栏顶部品牌 logo（🌌 OC·世界）的样式随文字一起删了（2026-10-01）*/

.nav-item {
    color: var(--text-secondary);
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid var(--border-color);
    text-align: left;
    font-family: inherit;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
}
.nav-item:hover {
    background: var(--bg-card);
    border-color: #7ec8ff;
    color: var(--text-primary);
}
.nav-item.active {
    background: #1a2a4a;
    border-color: #5b9aff;
    color: #5b9aff;
    box-shadow: 0 0 12px rgba(91, 154, 255, 0.15);
}
body.light-mode .nav-item.active {
    background: #e0ecff;
    color: #1a5bbf;
    border-color: #5b9aff;
}

/* ======================================================================
   [0x2F8B] 主内容区域
   ====================================================================== */
.main {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    padding: 20px 30px;
    background: var(--bg-body);
    transition: background 0.3s;
}

/* ======================================================================
   [0x6A0B] 滚动条 & 响应式
   ====================================================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
body.light-mode ::-webkit-scrollbar-thumb { background: #bbb; }

@media (max-width: 768px) {
    .sidebar { width: 120px; min-width: 120px; padding: 20px 12px; }
    .nav-item { font-size: 13px; padding: 8px 10px; }
    .topbar { padding: 0 16px; }
}
/* 「建议缩放：80%（Ctrl+滚轮）」提示的样式（.zoom-hint）随文字一起删了（2026-10-01）*/