/**
 * index.php 顶部导航栏样式 - 从 index.php 内联样式抽离
 * 包含：导航栏、用户下拉、响应式适配、深色模式
 */

/* ========== 顶部导航栏样式 ========== */
.site-header {
    background: linear-gradient(135deg, #6C5CE7 0%, #7c3aed 50%, #6C5CE7 100%);
    box-shadow: 0 2px 16px rgba(108, 92, 231, 0.35);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-left: -200px;
    width: calc(100% + 200px);
}
body.sidebar-collapsed .site-header {
    margin-left: 0;
    width: 100%;
}
.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: relative;
}

/* 左侧区域 - 移除汉堡菜单 */
.header-left {
    display: none;
}

/* 汉堡菜单按钮 - 移除 */
.hamburger-menu {
    display: none;
}

/* Logo - 左侧显示 */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s;
}
.site-logo:hover { transform: scale(1.02); }
.logo-img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.logo-icon { font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
.logo-text { display: flex; flex-direction: column; }
.site-name { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }
.site-slogan { font-size: 10px; opacity: 0.75; margin-top: 1px; font-weight: 400; }

/* 顶部书籍选择器和信息区域 */
.header-project-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 900px;
    margin: 0 20px;
}
.header-project-select {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.header-project-dropdown {
    width: 180px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-project-dropdown:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}
.header-project-dropdown option {
    background: #fff;
    color: #333;
}
.header-project-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.info-item {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}
.info-item strong {
    color: #fff;
    font-weight: 600;
    margin-left: 2px;
}
.header-btn-edit,
.header-btn-delete,
.header-btn-new {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}
.header-btn-edit:hover {
    background: rgba(59,130,246,0.3);
    border-color: rgba(59,130,246,0.5);
}
.header-btn-delete:hover {
    background: rgba(239,68,68,0.3);
    border-color: rgba(239,68,68,0.5);
}
.header-btn-new {
    font-size: 18px;
    font-weight: 600;
}
.header-btn-new:hover {
    background: rgba(16,185,129,0.3);
    border-color: rgba(16,185,129,0.5);
}

/* 移动端菜单按钮 - 默认隐藏 */
.mobile-menu-btn {
    display: none;
}

/* 移动端书籍选择器 - 默认隐藏 */
.mobile-project-select {
    display: none;
}

/* 左侧固定导航栏 */
.sidebar-nav {
    position: fixed;
    top: 56px;
    left: 0;
    width: 200px;
    height: calc(100vh - 56px);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    z-index: 100;
    padding: 20px 0;
    transition: left 0.3s ease;
}
.sidebar-nav.collapsed {
    left: -200px;
}

/* 侧边栏折叠按钮 */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 200px;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-left: -16px;
    margin-top: -16px;
}
.sidebar-toggle:hover {
    background: #ebebeb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.sidebar-nav.collapsed + .sidebar-toggle {
    left: 0;
    margin-left: 0;
}
.sidebar-toggle svg {
    width: 16px;
    height: 16px;
    color: #666;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.sidebar-nav.collapsed + .sidebar-toggle svg {
    transform: rotate(180deg);
}
.sidebar-toggle-text {
    display: none;
}

/* 导航菜单 - 左侧固定 */
.header-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

/* 导航项 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-item:hover {
    background: #f3f4f6;
    color: #374151;
}
.nav-item.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}
.nav-item svg,
.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 主内容区域 - 左侧留出导航栏空间 */
body {
    padding-left: 200px;
    transition: padding-left 0.3s ease;
}
body.sidebar-collapsed {
    padding-left: 0;
}

/* 遮罩层 - 移除 */
.nav-overlay {
    display: none;
}

/* 更多下拉菜单 - 隐藏 */
.nav-more {
    display: none;
}

/* 动画 */
@keyframes navDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 用户区域 - 右侧图标组 */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.btn-login {
    padding: 10px 24px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 10px;
    transition: all 0.25s;
}
.btn-login:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    transform: translateY(-1px);
}
.btn-register {
    padding: 10px 24px;
    background: #fff;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 用户信息 - 完整显示 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-level { cursor: pointer; transition: transform 0.2s; }
.user-level:hover { transform: scale(1.02); }
.level-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.level-badge.consume { background: rgba(255,255,255,0.25); color: #fff; backdrop-filter: blur(4px); }
.level-badge.writing { background: rgba(16,185,129,0.3); color: #fff; backdrop-filter: blur(4px); }
.level-icon { font-size: 14px; }
.level-name { font-size: 13px; }
.level-exp-bar {
    width: 50px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
}
.level-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.level-exp-text {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    min-width: 50px;
    text-align: right;
    white-space: nowrap;
}

.user-points {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: all 0.2s;
}
.user-points:hover { background: rgba(255,255,255,0.3); }
.points-label { font-size: 12px; color: rgba(255,255,255,0.9); }
.points-value { font-size: 14px; font-weight: 700; color: #fff; }

/* 签到按钮 - 完整显示 */
.checkin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.checkin-btn:hover { background: linear-gradient(135deg, #d97706, #ea580c); transform: translateY(-1px); }
.checkin-btn:disabled { cursor: default; transform: none; }
.checkin-btn.checked { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); font-weight: 400; }
.checkin-reward { font-size: 11px; opacity: 0.9; }

/* 用户下拉菜单 - 完整显示 */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.user-dropdown:hover { background: rgba(255,255,255,0.2); }
.user-name { font-weight: 500; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.admin-badge {
    padding: 2px 6px;
    background: rgba(251,191,36,0.25);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
}
.user-dropdown .dropdown-arrow { font-size: 10px; opacity: 0.7; transition: transform 0.2s; }
.user-dropdown.open .dropdown-arrow { transform: rotate(180deg); }

.user-dropdown .dropdown-menu.user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 160px;
    padding: 6px 0;
    z-index: 100;
    overflow: hidden;
}
.user-dropdown.open .dropdown-menu.user-menu { display: block; animation: navDropIn 0.2s ease; }
.menu-divider { height: 1px; background: #e5e7eb; margin: 4px 10px; }

.user-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}
.user-dropdown .dropdown-menu a:hover { background: #f3f4ff; color: #6C5CE7; }
.logout-btn {
    width: 100%;
    display: block;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    color: #dc2626;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.logout-btn:hover { background: #fef2f2; }

/* 移动端菜单按钮 - 隐藏 */
.mobile-menu-btn {
    display: none;
}

/* ========== 响应式适配 ========== */

/* 中等屏幕 1024px-1280px */
@media (max-width: 1280px) {
    .header-container { padding: 0 20px; }
    .header-right { right: 20px; gap: 12px; }
    .sidebar-nav { width: 180px; }
    .sidebar-nav.collapsed { left: -180px; }
    .sidebar-toggle { left: 180px; }
    body { padding-left: 180px; }
    body.sidebar-collapsed { padding-left: 0; }
    .site-header {
        margin-left: -180px;
        width: calc(100% + 180px);
    }
    body.sidebar-collapsed .site-header {
        margin-left: 0;
        width: 100%;
    }
}

/* 小屏幕 900px-1024px */
@media (max-width: 1024px) {
    .header-container { padding: 0 16px; height: 56px; }
    .header-right { right: 16px; gap: 10px; }
    .site-name { font-size: 18px; }
    .logo-img { width: 28px; height: 28px; }
    .sidebar-nav { width: 160px; top: 56px; height: calc(100vh - 56px); }
    .sidebar-nav.collapsed { left: -160px; }
    .sidebar-toggle { left: 160px; }
    body { padding-left: 160px; }
    body.sidebar-collapsed { padding-left: 0; }
    .site-header {
        margin-left: -160px;
        width: calc(100% + 160px);
    }
    body.sidebar-collapsed .site-header {
        margin-left: 0;
        width: 100%;
    }
}

/* 中等屏幕 1024px-1280px */
@media (max-width: 1280px) {
    .header-project-section {
        max-width: 700px;
    }
    .header-project-dropdown {
        width: 160px;
    }
    .header-project-info {
        gap: 12px;
    }
}

/* 平板 768px-900px - 隐藏侧边栏 */
@media (max-width: 900px) {
    .header-container { height: 52px; padding: 0 12px; }
    .header-right { gap: 8px; }
    body { padding-left: 0 !important; }
    .sidebar-nav { display: none; }
    .sidebar-toggle { display: none; }
    .header-project-section {
        margin: 0 12px;
        max-width: 500px;
        gap: 10px;
    }
    .header-project-select {
        gap: 6px;
    }
    .header-project-dropdown {
        width: 150px;
        font-size: 13px;
        padding: 6px 10px;
    }
    .header-project-info {
        gap: 10px;
    }
    .info-item {
        font-size: 11px;
    }
    /* 在平板上隐藏人物和大纲信息，只保留作者、类型、总字数 */
    .info-item:nth-child(4),
    .info-item:nth-child(5) {
        display: none;
    }
    .header-btn-edit,
    .header-btn-delete,
    .header-btn-new {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .user-dropdown, .checkin-btn, .user-points, .level-badge {
        font-size: 13px;
    }
    .level-exp-bar {
        width: 40px;
    }
    .level-exp-text {
        font-size: 10px;
        min-width: 40px;
    }
}

/* 手机 640px-768px */
@media (max-width: 768px) {
    .header-container { padding: 0 8px; height: 48px; }
    .header-right { gap: 6px; }
    .site-name { font-size: 14px; }
    .site-slogan { display: none; }
    .logo-img { width: 24px; height: 24px; }
    .btn-login, .btn-register { padding: 6px 10px; font-size: 12px; }
    .header-project-section {
        display: none;
    }
    .header-project-info {
        display: none;
    }
    /* 隐藏等级徽章 */
    .level-badge {
        display: none !important;
    }
    /* 隐藏签到相关 */
    .checkin-btn,
    #checkinMonthDays,
    #checkinCalendarPopup {
        display: none !important;
    }
    .user-dropdown, .user-points {
        font-size: 12px;
    }
    .user-dropdown .user-name {
        max-width: 50px;
    }
    .user-points {
        padding: 4px 8px;
    }
    .points-label {
        display: none;
    }
    /* 汉堡菜单按钮 */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.25);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }
    .mobile-menu-btn:hover {
        background: rgba(255,255,255,0.25);
    }
    .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
        color: #fff;
    }
    /* 移动端侧边栏 */
    .sidebar-nav {
        display: block !important;
        left: -100%;
        top: 0;
        width: 250px;
        height: 100vh;
        z-index: -9999;
        box-shadow: none;
        padding-top: 10px;
        visibility: hidden;
        transition: left 0.3s ease, z-index 0s 0.3s, visibility 0s 0.3s;
    }
    .sidebar-nav.mobile-open {
        left: 0;
        z-index: 1001;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        visibility: visible;
        transition: left 0.3s ease, z-index 0s 0s, visibility 0s 0s;
    }
    /* 移动端书籍选择器 */
    .mobile-project-select {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 10px;
    }
    .mobile-project-dropdown {
        width: 100%;
        padding: 8px 10px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        color: #333;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        margin-bottom: 8px;
    }
    .mobile-project-actions {
        display: flex;
        gap: 6px;
    }
    .mobile-btn-edit,
    .mobile-btn-delete,
    .mobile-btn-new {
        flex: 1;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
        background: #fff;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s;
    }
    .mobile-btn-edit:hover {
        background: #eff6ff;
        border-color: #3b82f6;
    }
    .mobile-btn-delete:hover {
        background: #fef2f2;
        border-color: #ef4444;
    }
    .mobile-btn-new {
        font-size: 18px;
        font-weight: 600;
    }
    .mobile-btn-new:hover {
        background: #f0fdf4;
        border-color: #10b981;
    }
    /* 隐藏桌面端折叠按钮 */
    .sidebar-toggle {
        display: none !important;
    }
    /* 遮罩层 */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }
    .nav-overlay.active {
        display: block;
    }
}

/* 小手机 <640px */
@media (max-width: 640px) {
    .header-container { padding: 0 6px; height: 44px; }
    .header-right { gap: 4px; }
    .site-logo { gap: 4px; }
    .site-name { font-size: 13px; }
    .site-slogan { display: none; }
    .logo-img { width: 20px; height: 20px; }
    .logo-icon { font-size: 20px; }
    .btn-login { display: none; }
    .btn-register { padding: 4px 8px; font-size: 11px; }
    .header-project-section {
        display: none;
    }
    .header-project-info {
        display: none;
    }
    /* 隐藏等级徽章 */
    .level-badge {
        display: none !important;
    }
    /* 隐藏签到相关 */
    .checkin-btn,
    #checkinMonthDays,
    #checkinCalendarPopup {
        display: none !important;
    }
    .user-dropdown {
        padding: 4px 6px;
        font-size: 11px;
    }
    .user-dropdown .user-name {
        max-width: 40px;
        font-size: 11px;
    }
    .admin-badge {
        display: none;
    }
    .user-points {
        padding: 3px 6px;
    }
    .points-value {
        font-size: 12px;
    }
    /* 汉堡菜单 */
    .mobile-menu-btn {
        width: 32px;
        height: 32px;
    }
    .mobile-menu-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ========== 深色模式 ========== */
body.dark-mode {
    background: #1a1a2e !important;
    color: #e0e0e0 !important;
}
body.dark-mode .site-header {
    background: linear-gradient(135deg, #2d1b69 0%, #1a1a2e 100%) !important;
    border-bottom-color: rgba(255,255,255,0.05) !important;
}
body.dark-mode .site-logo {
    color: #fff !important;
}
body.dark-mode .sidebar-nav {
    background: #16213e !important;
    border-right-color: #2a2a4a !important;
}
body.dark-mode .sidebar-toggle {
    background: #16213e !important;
    border-color: #2a2a4a !important;
}
body.dark-mode .sidebar-toggle:hover {
    background: #1f2937 !important;
}
body.dark-mode .sidebar-toggle svg {
    color: #9ca3af !important;
}
body.dark-mode .header-project-dropdown {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}
body.dark-mode .header-project-dropdown:hover {
    background: rgba(255,255,255,0.15) !important;
}
body.dark-mode .header-project-info .info-item {
    color: rgba(255,255,255,0.75) !important;
}
body.dark-mode .header-project-info .info-item strong {
    color: #fff !important;
}
body.dark-mode .header-btn-edit,
body.dark-mode .header-btn-delete,
body.dark-mode .header-btn-new {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
body.dark-mode .mobile-menu-btn {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
body.dark-mode .mobile-menu-btn:hover {
    background: rgba(255,255,255,0.15) !important;
}
body.dark-mode .mobile-project-select {
    border-bottom-color: #2a2a4a !important;
}
body.dark-mode .mobile-project-dropdown {
    background: #0f3460 !important;
    border-color: #2a2a4a !important;
    color: #e0e0e0 !important;
}
body.dark-mode .mobile-btn-edit,
body.dark-mode .mobile-btn-delete,
body.dark-mode .mobile-btn-new {
    background: #16213e !important;
    border-color: #2a2a4a !important;
    color: #e0e0e0 !important;
}
body.dark-mode .mobile-btn-edit:hover {
    background: #0a1a2e !important;
    border-color: #3b82f6 !important;
}
body.dark-mode .mobile-btn-delete:hover {
    background: #2e0a0a !important;
    border-color: #ef4444 !important;
}
body.dark-mode .mobile-btn-new:hover {
    background: #0a2e1a !important;
    border-color: #10b981 !important;
}
body.dark-mode .header-nav {
    background: transparent !important;
}
body.dark-mode .nav-item {
    color: #9ca3af !important;
}
body.dark-mode .nav-item:hover {
    background: #1f2937 !important;
    color: #a78bfa !important;
}
body.dark-mode .nav-item.active {
    background: #1a1a3e !important;
    color: #a78bfa !important;
}
body.dark-mode .main-container,
body.dark-mode .content-area {
    background: #1a1a2e !important;
}
body.dark-mode .card,
body.dark-mode .panel,
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background:white"],
body.dark-mode [style*="background: white"] {
    background: #16213e !important;
    color: #e0e0e0 !important;
}
body.dark-mode .sidebar,
body.dark-mode .left-panel,
body.dark-mode .right-panel {
    background: #16213e !important;
    border-color: #2a2a4a !important;
}
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
    border-color: #2a2a4a !important;
}
body.dark-mode .dropdown-menu {
    background: #16213e !important;
    border-color: #2a2a4a !important;
}
body.dark-mode .dropdown-menu a,
body.dark-mode .dropdown-menu button {
    color: #e0e0e0 !important;
}
body.dark-mode .dropdown-menu a:hover {
    background: #0f3460 !important;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
    color: #e0e0e0 !important;
}
body.dark-mode .nav-item {
    color: rgba(255,255,255,0.7) !important;
}
body.dark-mode .nav-item.active,
body.dark-mode .nav-item:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}
body.dark-mode [style*="background:#f8fafc"],
body.dark-mode [style*="background: #f8fafc"],
body.dark-mode [style*="background:#f3f4f6"],
body.dark-mode [style*="background: #f3f4f6"],
body.dark-mode [style*="background:#f0f0f0"] {
    background: #1a1a3e !important;
}
body.dark-mode [style*="color:#333"],
body.dark-mode [style*="color: #333"],
body.dark-mode [style*="color:#1a1a1a"] {
    color: #e0e0e0 !important;
}
body.dark-mode [style*="color:#666"],
body.dark-mode [style*="color: #666"],
body.dark-mode [style*="color:#888"] {
    color: #aaa !important;
}
body.dark-mode [style*="border:1px solid #ddd"],
body.dark-mode [style*="border:1px solid #e2e8f0"],
body.dark-mode [style*="border-bottom:1px solid #eee"] {
    border-color: #2a2a4a !important;
}
body.dark-mode .tab-btn {
    color: #aaa !important;
}
body.dark-mode .tab-btn.active {
    color: #a78bfa !important;
    border-color: #a78bfa !important;
}
body.dark-mode .footer {
    background: #0f0f23 !important;
    color: #888 !important;
}

/* ========== 深色模式 - 扩展覆盖（8.1修复） ========== */

/* --- 8.1.1 弹窗/模态框 --- */
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background:white"],
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background:#ffffff"],
body.dark-mode [style*="background: #ffffff"] {
    background: #16213e !important;
    color: #e0e0e0 !important;
}
body.dark-mode [style*="box-shadow:0 20px 60px"] {
    box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
}

/* --- 8.1.2 文字颜色覆盖 --- */
body.dark-mode [style*="color:#374151"],
body.dark-mode [style*="color: #374151"] {
    color: #d1d5db !important;
}
body.dark-mode [style*="color:#1f2937"],
body.dark-mode [style*="color: #1f2937"] {
    color: #e0e0e0 !important;
}
body.dark-mode [style*="color:#111827"],
body.dark-mode [style*="color: #111827"] {
    color: #f0f0f0 !important;
}
body.dark-mode [style*="color:#4b5563"],
body.dark-mode [style*="color: #4b5563"] {
    color: #b0b0b0 !important;
}
body.dark-mode [style*="color:#6b7280"],
body.dark-mode [style*="color: #6b7280"] {
    color: #9ca3af !important;
}
body.dark-mode [style*="color:#555"],
body.dark-mode [style*="color: #555"] {
    color: #bbb !important;
}
body.dark-mode [style*="color:#999"],
body.dark-mode [style*="color: #999"] {
    color: #888 !important;
}
body.dark-mode [style*="color:#1e293b"],
body.dark-mode [style*="color: #1e293b"] {
    color: #e0e0e0 !important;
}
body.dark-mode [style*="color:#334155"],
body.dark-mode [style*="color: #334155"] {
    color: #d0d0d0 !important;
}

/* --- 8.1.3 浅色背景区块 --- */
body.dark-mode [style*="background:#fafafa"],
body.dark-mode [style*="background: #fafafa"],
body.dark-mode [style*="background:#f9fafb"],
body.dark-mode [style*="background: #f9fafb"],
body.dark-mode [style*="background:#f1f5f9"],
body.dark-mode [style*="background: #f1f5f9"],
body.dark-mode [style*="background:#fefefe"],
body.dark-mode [style*="background: #fefefe"] {
    background: #1a1a3e !important;
    color: #e0e0e0 !important;
}
body.dark-mode [style*="background:#e5e7eb"],
body.dark-mode [style*="background: #e5e7eb"],
body.dark-mode [style*="background:#e2e8f0"],
body.dark-mode [style*="background: #e2e8f0"] {
    background: #2a2a4a !important;
}

/* --- 8.1.4 边框颜色 --- */
body.dark-mode [style*="border:1px solid #d1d5db"],
body.dark-mode [style*="border: 1px solid #d1d5db"],
body.dark-mode [style*="border:1px solid #e5e7eb"],
body.dark-mode [style*="border: 1px solid #e5e7eb"],
body.dark-mode [style*="border:1px solid #e2e8f0"],
body.dark-mode [style*="border: 1px solid #e2e8f0"],
body.dark-mode [style*="border:2px solid #e2e8f0"],
body.dark-mode [style*="border: 2px solid #e2e8f0"],
body.dark-mode [style*="border-bottom:1px solid #e2e8f0"],
body.dark-mode [style*="border-bottom: 1px solid #e2e8f0"],
body.dark-mode [style*="border-top:1px solid #e2e8f0"],
body.dark-mode [style*="border-top: 1px solid #e2e8f0"],
body.dark-mode [style*="border:1px solid #ddd"],
body.dark-mode [style*="border: 1px solid #ddd"],
body.dark-mode [style*="border-bottom:1px solid #eee"],
body.dark-mode [style*="border-bottom: 1px solid #eee"],
body.dark-mode [style*="border:1px dashed #e5e7eb"] {
    border-color: #2a2a4a !important;
}
body.dark-mode [style*="border-right:1px solid #e2e8f0"],
body.dark-mode [style*="border-left:1px solid #e2e8f0"] {
    border-color: #2a2a4a !important;
}

/* --- 8.1.5 按钮样式 --- */
body.dark-mode [style*="background:#f3f4f6"][style*="color:#374151"],
body.dark-mode [style*="background: #f3f4f6"][style*="color: #374151"],
body.dark-mode [style*="background:#e5e7eb"][style*="color:#374151"] {
    background: #2a2a4a !important;
    color: #d1d5db !important;
}
body.dark-mode button[style*="background:#f3f4f6"],
body.dark-mode button[style*="background: #f3f4f6"] {
    background: #2a2a4a !important;
    color: #d1d5db !important;
}
body.dark-mode button[style*="background:none"][style*="color:#6b7280"] {
    color: #9ca3af !important;
}

/* --- 8.1.7 状态提示区块 --- */
body.dark-mode [style*="background:#f0fdf4"],
body.dark-mode [style*="background: #f0fdf4"] {
    background: #0a2e1a !important;
    color: #6ee7b7 !important;
}
body.dark-mode [style*="background:#fef2f2"],
body.dark-mode [style*="background: #fef2f2"] {
    background: #2e0a0a !important;
    color: #fca5a5 !important;
}
body.dark-mode [style*="background:#eff6ff"],
body.dark-mode [style*="background: #eff6ff"] {
    background: #0a1a2e !important;
    color: #93c5fd !important;
}
body.dark-mode [style*="background:#fdf4ff"],
body.dark-mode [style*="background: #fdf4ff"] {
    background: #1a0a2e !important;
    color: #d8b4fe !important;
}
body.dark-mode [style*="background:#fffbeb"],
body.dark-mode [style*="background: #fffbeb"] {
    background: #2e1a0a !important;
    color: #fcd34d !important;
}
body.dark-mode [style*="background:#ecfdf5"],
body.dark-mode [style*="background: #ecfdf5"] {
    background: #0a2e1a !important;
}
body.dark-mode [style*="background:linear-gradient(135deg,#f0fdf4"],
body.dark-mode [style*="background: linear-gradient(135deg,#f0fdf4"] {
    background: #0a2e1a !important;
}
body.dark-mode [style*="border:1px solid #86efac"],
body.dark-mode [style*="border: 1px solid #86efac"],
body.dark-mode [style*="border:1px solid #bbf7d0"] {
    border-color: #166534 !important;
}
body.dark-mode [style*="border:1px solid #fecaca"],
body.dark-mode [style*="border: 1px solid #fecaca"] {
    border-color: #991b1b !important;
}
body.dark-mode [style*="border:1px solid #93c5fd"] {
    border-color: #1e40af !important;
}

/* --- 8.1.8 代码/预格式文本 --- */
body.dark-mode pre {
    background: #0f0f23 !important;
    color: #e0e0e0 !important;
}
body.dark-mode code {
    background: #1a1a3e !important;
    color: #a78bfa !important;
}

/* --- 通用深色模式补充 --- */
body.dark-mode label {
    color: #d1d5db !important;
}
body.dark-mode p {
    color: #c0c0c0 !important;
}
body.dark-mode .help-text,
body.dark-mode .form-group .help-text {
    color: #888 !important;
}
body.dark-mode table {
    color: #e0e0e0 !important;
}
body.dark-mode table th {
    background: #1a1a3e !important;
    color: #ccc !important;
    border-color: #2a2a4a !important;
}
body.dark-mode table td {
    border-color: #2a2a4a !important;
}
body.dark-mode hr {
    border-color: #2a2a4a !important;
}
body.dark-mode .btn-secondary,
body.dark-mode button.btn-secondary {
    background: #2a2a4a !important;
    color: #d1d5db !important;
    border-color: #3a3a5a !important;
}
body.dark-mode .menu-divider {
    background: #2a2a4a !important;
}
body.dark-mode ::placeholder {
    color: #666 !important;
}
body.dark-mode .nav-more-menu {
    background: #16213e !important;
}
body.dark-mode .nav-more-menu::before {
    border-bottom-color: #16213e !important;
}
body.dark-mode .nav-more-menu a {
    color: #d1d5db !important;
}
body.dark-mode .nav-more-menu a:hover {
    background: #0f3460 !important;
    color: #fff !important;
}
body.dark-mode .nav-more-menu a.active {
    color: #a78bfa !important;
    background: #1a1a3e !important;
}

/* ========== 深色模式 - 深度修复（8.1.9 内联样式全覆盖） ========== */

/* --- 缺失的文字颜色覆盖 --- */
body.dark-mode [style*="color:#444"],
body.dark-mode [style*="color: #444"] {
    color: #bbb !important;
}
body.dark-mode [style*="color:#1a1a2e"],
body.dark-mode [style*="color: #1a1a2e"] {
    color: #e0e0e0 !important;
}
body.dark-mode [style*="color:#dc2626"],
body.dark-mode [style*="color: #dc2626"] {
    color: #fca5a5 !important;
}
body.dark-mode [style*="color:#166534"],
body.dark-mode [style*="color: #166534"] {
    color: #6ee7b7 !important;
}
body.dark-mode [style*="color:#92400e"],
body.dark-mode [style*="color: #92400e"] {
    color: #fcd34d !important;
}
body.dark-mode [style*="color:#1e40af"],
body.dark-mode [style*="color: #1e40af"] {
    color: #93c5fd !important;
}
body.dark-mode [style*="color:#4338ca"],
body.dark-mode [style*="color: #4338ca"] {
    color: #a78bfa !important;
}
body.dark-mode [style*="color:#0369a1"],
body.dark-mode [style*="color: #0369a1"] {
    color: #7dd3fc !important;
}
body.dark-mode [style*="color:#10b981"],
body.dark-mode [style*="color: #10b981"] {
    color: #6ee7b7 !important;
}
body.dark-mode [style*="color:#64748b"],
body.dark-mode [style*="color: #64748b"] {
    color: #94a3b8 !important;
}
body.dark-mode [style*="color:#94a3b8"],
body.dark-mode [style*="color: #94a3b8"] {
    color: #94a3b8 !important;
}
body.dark-mode [style*="color:#a16207"],
body.dark-mode [style*="color: #a16207"] {
    color: #fbbf24 !important;
}
body.dark-mode [style*="color:#0f766e"],
body.dark-mode [style*="color: #0f766e"] {
    color: #5eead4 !important;
}
body.dark-mode [style*="color:#475569"],
body.dark-mode [style*="color: #475569"] {
    color: #b0b0b0 !important;
}
body.dark-mode [style*="color:#1d4ed8"],
body.dark-mode [style*="color: #1d4ed8"] {
    color: #93c5fd !important;
}
body.dark-mode [style*="color:#4f46e5"],
body.dark-mode [style*="color: #4f46e5"] {
    color: #a78bfa !important;
}
body.dark-mode [style*="color:#667eea"],
body.dark-mode [style*="color: #667eea"] {
    color: #a78bfa !important;
}
body.dark-mode [style*="color:#8b5cf6"],
body.dark-mode [style*="color: #8b5cf6"] {
    color: #c4b5fd !important;
}
body.dark-mode [style*="color:#ef4444"],
body.dark-mode [style*="color: #ef4444"] {
    color: #fca5a5 !important;
}
body.dark-mode [style*="color:#f59e0b"],
body.dark-mode [style*="color: #f59e0b"] {
    color: #fcd34d !important;
}
body.dark-mode [style*="color:#3b82f6"],
body.dark-mode [style*="color: #3b82f6"] {
    color: #93c5fd !important;
}

/* --- 缺失的背景颜色覆盖 --- */
body.dark-mode [style*="background:#fee2e2"],
body.dark-mode [style*="background: #fee2e2"] {
    background: #2e0a0a !important;
    color: #fca5a5 !important;
}
body.dark-mode [style*="background:#d1fae5"],
body.dark-mode [style*="background: #d1fae5"] {
    background: #0a2e1a !important;
    color: #6ee7b7 !important;
}
body.dark-mode [style*="background:#dcfce7"],
body.dark-mode [style*="background: #dcfce7"] {
    background: #0a2e1a !important;
    color: #6ee7b7 !important;
}
body.dark-mode [style*="background:#dbeafe"],
body.dark-mode [style*="background: #dbeafe"] {
    background: #0a1a2e !important;
    color: #93c5fd !important;
}
body.dark-mode [style*="background:#fef3c7"],
body.dark-mode [style*="background: #fef3c7"] {
    background: #2e1a0a !important;
    color: #fcd34d !important;
}
body.dark-mode [style*="background:#e0e7ff"],
body.dark-mode [style*="background: #e0e7ff"] {
    background: #1a0a2e !important;
    color: #c4b5fd !important;
}
body.dark-mode [style*="background:#fefce8"],
body.dark-mode [style*="background: #fefce8"] {
    background: #2e1a0a !important;
    color: #fcd34d !important;
}
body.dark-mode [style*="background:#fef9c3"],
body.dark-mode [style*="background: #fef9c3"] {
    background: #2e1a0a !important;
    color: #fcd34d !important;
}
body.dark-mode [style*="background:#f5f5f5"],
body.dark-mode [style*="background: #f5f5f5"] {
    background: #1a1a3e !important;
}
body.dark-mode [style*="background:#f5f7fa"],
body.dark-mode [style*="background: #f5f7fa"] {
    background: #1a1a3e !important;
}
body.dark-mode [style*="background:#eef2ff"],
body.dark-mode [style*="background: #eef2ff"] {
    background: #1a0a2e !important;
}
body.dark-mode [style*="background:#e0f2fe"],
body.dark-mode [style*="background: #e0f2fe"] {
    background: #0a1a2e !important;
    color: #7dd3fc !important;
}
body.dark-mode [style*="background:#f0f9ff"],
body.dark-mode [style*="background: #f0f9ff"] {
    background: #0a1a2e !important;
    color: #7dd3fc !important;
}
body.dark-mode [style*="background:#f8f9fa"],
body.dark-mode [style*="background: #f8f9fa"] {
    background: #1a1a3e !important;
}
body.dark-mode [style*="background:#fafaf9"],
body.dark-mode [style*="background: #fafaf9"] {
    background: #1a1a3e !important;
}

/* --- 缺失的边框颜色覆盖 --- */
body.dark-mode [style*="border:1px solid #fcd34d"],
body.dark-mode [style*="border: 1px solid #fcd34d"] {
    border-color: #854d0e !important;
}
body.dark-mode [style*="border:1px solid #bfdbfe"],
body.dark-mode [style*="border: 1px solid #bfdbfe"] {
    border-color: #1e40af !important;
}
body.dark-mode [style*="border:1px solid #93c5fd"],
body.dark-mode [style*="border: 1px solid #93c5fd"] {
    border-color: #1e40af !important;
}
body.dark-mode [style*="border:1px solid #bae6fd"],
body.dark-mode [style*="border: 1px solid #bae6fd"] {
    border-color: #0369a1 !important;
}
body.dark-mode [style*="border:1px solid #fde68a"],
body.dark-mode [style*="border: 1px solid #fde68a"] {
    border-color: #854d0e !important;
}
body.dark-mode [style*="border:1px solid #fbbf24"],
body.dark-mode [style*="border: 1px solid #fbbf24"] {
    border-color: #854d0e !important;
}
body.dark-mode [style*="border:2px solid #4f46e5"],
body.dark-mode [style*="border: 2px solid #4f46e5"] {
    border-color: #7c3aed !important;
}
body.dark-mode [style*="border:2px solid #10b981"],
body.dark-mode [style*="border: 2px solid #10b981"] {
    border-color: #059669 !important;
}
body.dark-mode [style*="border-bottom:2px solid #e2e8f0"],
body.dark-mode [style*="border-bottom: 2px solid #e2e8f0"] {
    border-color: #2a2a4a !important;
}
body.dark-mode [style*="border-bottom:1px solid #f0f0f0"],
body.dark-mode [style*="border-bottom: 1px solid #f0f0f0"] {
    border-color: #2a2a4a !important;
}
body.dark-mode [style*="border-bottom:1px solid #0f3460"] {
    border-color: #2a2a4a !important;
}
/* border-left 彩色边框保留原色，不覆盖 */
body.dark-mode [style*="border-left:2px solid #fcd34d"] {
    border-color: #854d0e !important;
}

/* --- 渐变背景覆盖 --- */
body.dark-mode [style*="background:linear-gradient(135deg,#f8fafc"],
body.dark-mode [style*="background: linear-gradient(135deg,#f8fafc"],
body.dark-mode [style*="background:linear-gradient(135deg, #f8fafc"] {
    background: linear-gradient(135deg, #1a1a3e, #16213e) !important;
}
body.dark-mode [style*="background:linear-gradient(135deg,#fefce8"],
body.dark-mode [style*="background: linear-gradient(135deg,#fefce8"],
body.dark-mode [style*="background:linear-gradient(135deg, #fefce8"] {
    background: linear-gradient(135deg, #2e1a0a, #1a1a3e) !important;
}
body.dark-mode [style*="background:linear-gradient(135deg,#eff6ff"],
body.dark-mode [style*="background: linear-gradient(135deg,#eff6ff"],
body.dark-mode [style*="background:linear-gradient(135deg, #eff6ff"] {
    background: linear-gradient(135deg, #0a1a2e, #16213e) !important;
}
body.dark-mode [style*="background:linear-gradient(135deg,#f0fdf4"],
body.dark-mode [style*="background: linear-gradient(135deg, #f0fdf4"] {
    background: linear-gradient(135deg, #0a2e1a, #16213e) !important;
}

/* --- 设置页标签栏深色模式 --- */
body.dark-mode .settings-tab {
    color: #aaa !important;
    background: transparent !important;
}
body.dark-mode .settings-tab.active,
body.dark-mode .settings-tab[style*="color:#4f46e5"] {
    color: #a78bfa !important;
    border-bottom-color: #a78bfa !important;
}
body.dark-mode [style*="border-bottom:2px solid #e2e8f0"][style*="background:#f8fafc"] {
    background: #1a1a3e !important;
    border-bottom-color: #2a2a4a !important;
}

/* --- 通用 catch-all：深色模式下所有浅色内联背景 --- */
body.dark-mode div[style*="background:#f"][style*="border:1px solid"],
body.dark-mode div[style*="background: #f"][style*="border:1px solid"] {
    border-color: #2a2a4a !important;
}

/* --- 角色/状态标签 --- */
body.dark-mode span[style*="background:#fef3c7"][style*="color:#92400e"] {
    background: #2e1a0a !important;
    color: #fcd34d !important;
}
body.dark-mode span[style*="background:#e0f2fe"][style*="color:#0369a1"] {
    background: #0a1a2e !important;
    color: #7dd3fc !important;
}
body.dark-mode span[style*="background:#dcfce7"][style*="color:#166534"] {
    background: #0a2e1a !important;
    color: #6ee7b7 !important;
}

/* --- 链接颜色 --- */
body.dark-mode a[style*="color:#667eea"],
body.dark-mode a[style*="color: #667eea"] {
    color: #a78bfa !important;
}
body.dark-mode a[style*="color:#1e40af"],
body.dark-mode a[style*="color: #1e40af"] {
    color: #93c5fd !important;
}

/* --- 表单内联样式 --- */
body.dark-mode input[style*="border:1px solid #ddd"],
body.dark-mode input[style*="border: 1px solid #ddd"] {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
    border-color: #2a2a4a !important;
}
body.dark-mode select[style*="border:1px solid #93c5fd"],
body.dark-mode select[style*="background:#fff"][style*="color:#1e293b"] {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
    border-color: #2a2a4a !important;
}
body.dark-mode input[style*="border:1px solid #fbbf24"] {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
    border-color: #854d0e !important;
}

/* --- 内联 color:#1e293b（深灰文字） --- */
body.dark-mode [style*="color:#1e293b"],
body.dark-mode [style*="color: #1e293b"] {
    color: #e0e0e0 !important;
}

/* --- 辅助面板/弹窗内联样式 --- */
body.dark-mode div[style*="background:#fff"][style*="border:1px solid #e2e8f0"] {
    background: #16213e !important;
    border-color: #2a2a4a !important;
    color: #e0e0e0 !important;
}
body.dark-mode div[style*="background:#fff"][style*="box-shadow"] {
    background: #16213e !important;
    color: #e0e0e0 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}

/* --- 批量删除栏 --- */
body.dark-mode div[style*="background:#1a1a2e"] {
    background: #0f0f23 !important;
}

/* --- 进度条/统计区域 --- */
body.dark-mode [style*="background:#e5e7eb"] {
    background: #2a2a4a !important;
}
body.dark-mode [style*="background:#f3f4f6"] {
    background: #1a1a3e !important;
}

/* ========== 深色模式 - 情节管理/码字区/全局补充（8.1.9续） ========== */

/* --- 紫色系浅色背景 --- */
body.dark-mode [style*="background:#faf5ff"],
body.dark-mode [style*="background: #faf5ff"] {
    background: #1a0a2e !important;
    color: #c4b5fd !important;
}
body.dark-mode [style*="background:#fdf4ff"],
body.dark-mode [style*="background: #fdf4ff"] {
    background: #1a0a2e !important;
    color: #d8b4fe !important;
}

/* --- 青色系浅色背景 --- */
body.dark-mode [style*="background:#ecfeff"],
body.dark-mode [style*="background: #ecfeff"] {
    background: #0a1a2e !important;
    color: #67e8f9 !important;
}
body.dark-mode [style*="background:#ecfdf5"],
body.dark-mode [style*="background: #ecfdf5"] {
    background: #0a2e1a !important;
}

/* --- 紫色系边框 --- */
body.dark-mode [style*="border:1px solid #e9d5ff"],
body.dark-mode [style*="border: 1px solid #e9d5ff"] {
    border-color: #7c3aed !important;
}
body.dark-mode [style*="border:1px solid #c4b5fd"],
body.dark-mode [style*="border: 1px solid #c4b5fd"] {
    border-color: #7c3aed !important;
}
body.dark-mode [style*="border:1px solid #e879f9"],
body.dark-mode [style*="border: 1px solid #e879f9"] {
    border-color: #a855f7 !important;
}

/* --- 青色系边框 --- */
body.dark-mode [style*="border:1px solid #a5f3fc"],
body.dark-mode [style*="border: 1px solid #a5f3fc"] {
    border-color: #0891b2 !important;
}

/* --- 缺失的文字颜色 --- */
body.dark-mode [style*="color:#7c3aed"],
body.dark-mode [style*="color: #7c3aed"] {
    color: #a78bfa !important;
}
body.dark-mode [style*="color:#0891b2"],
body.dark-mode [style*="color: #0891b2"] {
    color: #67e8f9 !important;
}
body.dark-mode [style*="color:#86198f"],
body.dark-mode [style*="color: #86198f"] {
    color: #d946ef !important;
}
body.dark-mode [style*="color:#14532d"],
body.dark-mode [style*="color: #14532d"] {
    color: #6ee7b7 !important;
}
body.dark-mode [style*="color:#1e3a5f"],
body.dark-mode [style*="color: #1e3a5f"] {
    color: #93c5fd !important;
}
body.dark-mode [style*="color:#78350f"],
body.dark-mode [style*="color: #78350f"] {
    color: #fbbf24 !important;
}

/* --- 情节管理：分组卡片深色模式 --- */
body.dark-mode .plot-group-card {
    background: #16213e !important;
    border-color: #2a2a4a !important;
}
body.dark-mode .plot-group-card[style*="background:#faf5ff"] {
    background: #1a0a2e !important;
}
body.dark-mode .plot-group-card[style*="background:#ecfeff"] {
    background: #0a1a2e !important;
}

/* --- 情节管理：事件卡片深色模式 --- */
body.dark-mode .plot-event-card {
    background: #16213e !important;
    border-color: #2a2a4a !important;
    color: #e0e0e0 !important;
}
body.dark-mode .plot-event-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* 事件卡片内的操作按钮 */
body.dark-mode .plot-event-card button[style*="background:#faf5ff"] {
    background: #1a0a2e !important;
    border-color: #7c3aed !important;
    color: #a78bfa !important;
}
body.dark-mode .plot-event-card button[style*="background:#eff6ff"] {
    background: #0a1a2e !important;
    border-color: #1e40af !important;
    color: #93c5fd !important;
}
body.dark-mode .plot-event-card button[style*="background:#f8fafc"] {
    background: #1a1a3e !important;
    border-color: #2a2a4a !important;
    color: #aaa !important;
}
body.dark-mode .plot-event-card button[style*="background:#fef2f2"] {
    background: #2e0a0a !important;
    border-color: #991b1b !important;
    color: #fca5a5 !important;
}

/* 事件卡片内分隔线 */
body.dark-mode .plot-event-card div[style*="border-top:1px solid #f0f0f0"] {
    border-top-color: #2a2a4a !important;
}

/* 空事件提示 */
body.dark-mode div[style*="background:#fff"][style*="text-align:center"][style*="color:#888"] {
    background: #16213e !important;
    color: #888 !important;
}

/* --- 封面生成区域 --- */
body.dark-mode div[style*="background:#fdf4ff"][style*="border:1px solid #e879f9"] {
    background: #1a0a2e !important;
    border-color: #a855f7 !important;
    color: #d8b4fe !important;
}
body.dark-mode div[style*="background:#faf5ff"][style*="border:1px solid #c4b5fd"] {
    background: #1a0a2e !important;
    border-color: #7c3aed !important;
}
body.dark-mode button[style*="background:#fdf4ff"][style*="color:#7c3aed"] {
    background: #1a0a2e !important;
    border-color: #7c3aed !important;
    color: #a78bfa !important;
}

/* --- 角色标签 --- */
body.dark-mode span[style*="background:#ecfeff"][style*="color:#0891b2"] {
    background: #0a1a2e !important;
    color: #67e8f9 !important;
    border-color: #0891b2 !important;
}

/* --- 封面建议区域 --- */
body.dark-mode div[style*="background:#e0f2fe"] {
    background: #0a1a2e !important;
    color: #7dd3fc !important;
}

/* --- logout按钮 hover 修复 --- */
body.dark-mode .logout-btn:hover {
    background: #2e0a0a !important;
}
