/* --- 暗黑模式样式补丁 --- */

/* 当 html 或 body 带有 data-bs-theme="dark" 时生效 */
[data-bs-theme="dark"] {
    /* 1. 全局背景覆盖 */
    --bs-body-bg: #121212; /* 甚至可以比默认的更深一点 */
    --bs-body-color: #e0e0e0;
}

[data-bs-theme="dark"] body {
    background-color: #121212;
}

/* 2. 侧边栏暗黑适配 */
[data-bs-theme="dark"] #sidebar-wrapper {
    background: #1e1e1e;
    border-right: 1px solid #333;
}

[data-bs-theme="dark"] .sidebar-link {
    color: #b0b0b0;
}

[data-bs-theme="dark"] .sidebar-link:hover,
[data-bs-theme="dark"] .sidebar-link.active {
    background-color: #2c2c2c;
    color: #00d2ff; /* 对应你的渐变色 */
}

/* 3. 游戏卡片暗黑适配 */
[data-bs-theme="dark"] .game-card {
    background: #252525;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .game-card .card-body {
    color: #fff;
}

/* 4. 搜索框在暗黑模式下的微调 */
/* 如果导航栏依然保持渐变色，搜索框可能不需要大改，但可以增加对比度 */
[data-bs-theme="dark"] .search-input {
    background: rgba(0, 0, 0, 0.2); /* 深色模式下降低背景亮度 */
}

[data-bs-theme="dark"] .search-input:focus {
    background: rgba(0, 0, 0, 0.4);
}

/* 5. 滚动条美化 (针对暗黑模式) */
[data-bs-theme="dark"] ::-webkit-scrollbar {
}
[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #121212;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #444;
}

[data-bs-theme="dark"] {
    --primary-gradient: linear-gradient(90deg, #1a2a6c 0%, #b21f1f 100%); /* 示例：更深邃的渐变 */
}