/* 
 * WebNav - Dark Mode Theme
 * ------------------------
 * A modern, clean, and slightly lighter dark theme with glassmorphism effects.
 */

body.dark-theme {
    background-color: #23262b !important;
    color: #e0e0e0;
}

/* --- General Components --- */
.dark-theme .sidebar-menu,
.dark-theme .main-content,
.dark-theme .navbar.user-info-navbar,
.dark-theme .logo-env,
.dark-theme .sidebar-menu-inner {
    background: linear-gradient(180deg, rgba(60, 63, 70, 0.75) 0%, rgba(50, 52, 58, 0.7) 100%) !important;
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- Logo Area --- */
.dark-theme .logo-env {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.dark-theme .logo-env:hover {
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

/* --- Typography --- */
.dark-theme,
.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4, .dark-theme h5, .dark-theme h6,
.dark-theme .logo-text a,
.dark-theme .main-menu a .title,
.dark-theme .user-info-menu a > span,
.dark-theme .xe-user-name strong,
.dark-theme #jinrishici-sentence {
    color: #e0e0e0 !important;
}

/* 今日诗词图标夜间模式白色 */
.dark-theme .menu-item .fa-solid.fa-message {
    color: #ffffff !important;
}

.dark-theme a {
    color: #BECFE3; /* A pleasant blue for links */
}

.dark-theme a:hover {
    color: #a5c6fa;
}

.dark-theme .text-gray,
.dark-theme .xe-comment p {
    color: #adb5bd !important; /* Lighter gray for descriptions */
}

/* --- Sidebar Menu --- */
.dark-theme .sidebar-menu .main-menu a {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.dark-theme .sidebar-menu .main-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.dark-theme .sidebar-menu .main-menu li.active > a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.dark-theme .sidebar-menu .main-menu ul li a {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Header Navigation --- */
.dark-theme .user-info-navbar {
    background: linear-gradient(135deg, rgba(45, 47, 50, 0.95) 0%, rgba(40, 42, 45, 0.9) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .menu-item a {
    background: transparent !important;
    border: none !important;
    color: #e0e0e0;
}

.dark-theme .menu-item a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* --- Link Cards --- */
.dark-theme .xe-widget.xe-conversations {
    background: rgba(60, 63, 70, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .xe-widget.xe-conversations:hover {
    background: rgba(70, 73, 78, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Search Area --- */
.dark-theme #search-text {
    background: rgba(60, 63, 70, 0.7) !important;
    backdrop-filter: blur(10px);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme #search-text:focus {
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

.dark-theme .s-type-list {
    background: rgba(60, 63, 70, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .s-type-list:before {
    border-bottom-color: rgba(60, 63, 70, 0.7);
}

.dark-theme .s-type-list label:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.dark-theme .search-group {
    background: rgba(50, 52, 58, 0.65) !important;
}

.dark-theme .search-type li label {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.dark-theme .search-type input:checked + label,
.dark-theme .search-type input:hover + label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff;
}

/* --- Content Cards --- */
.dark-theme .box2 {
    background: rgba(60, 63, 70, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .box2:hover {
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.dark-theme .panel-body {
    background: rgba(60, 63, 70, 0.7) !important;
    backdrop-filter: blur(10px);
    color: #e0e0e0;
}

.dark-theme .panel-body h4,
.dark-theme .panel-body p {
    color: #e0e0e0;
}

/* --- Footer --- */
.dark-theme footer.main-footer {
    background: rgba(50, 52, 58, 0.65) !important;
    backdrop-filter: blur(10px);
}

/* --- Bulletin Box --- */
.dark-theme #bulletin_box {
    background: rgba(60, 63, 70, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 
 * Specific overrides for text with hardcoded dark colors that are
 * unreadable in dark mode. We leave others (like Baidu's blue) alone.
 */
.dark-theme label[for="type-git"] span,
.dark-theme label[for="type-git1"] span,
.dark-theme label[for="type-links"] span {
    color: #e0e0e0 !important;
}

.dark-theme .xe-user-name strong {
    color: #e0e0e0 !important;
}

/* --- Scrollbar --- */
.dark-theme ::-webkit-scrollbar-thumb {
    background-color: #4a5568;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background-color: #667eea;
}

.dark-theme .type-text,
.dark-theme .search-type,
.dark-theme .search-type li,
.dark-theme .search-type li label,
.dark-theme .search-group {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.dark-theme .type-text {
    color: #e0e0e0 !important;
} 