@layer utilities {
            :root {
                /* 默认蓝白主题 */
                --bg-color: #f4f8ff;
                --text-color: #0f2747;
                --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
                --border-color: rgba(37, 99, 235, 0.14);
                --primary-color: #2563eb;
                --secondary-color: #1d4ed8;
                --accent-color: #0ea5e9;
                --success-color: #10b981; /* emerald */
                --warning-color: #f59e0b; /* amber */
                --danger-color: #ef4444; /* red */
                --debug-color: #06b6d4; /* cyan */
                --dark-50: #f8fafc;
                --dark-100: #f1f5f9;
                --dark-200: #e2e8f0;
                --dark-300: #334155;
                --dark-400: #64748b;
                --dark-500: #94a3b8;
                --dark-600: #cbd5e1;
                --dark-700: #e2e8f0;
                --dark-800: #ffffff;
                --dark-900: #f8fbff;
                --dark-950: #f1f5f9;
            }
            
            .light-theme {
                /* 亮色蓝白主题 */
                --bg-color: #f4f8ff;
                --text-color: #0f2747;
                --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96));
                --border-color: rgba(37, 99, 235, 0.14);
                --dark-50: #f8fafc;
                --dark-100: #f1f5f9;
                --dark-200: #e2e8f0;
                --dark-300: #cbd5e1;
                --dark-400: #94a3b8;
                --dark-500: #64748b;
                --dark-600: #475569;
                --dark-700: #334155;
                --dark-800: #1e293b;
                --dark-900: #0f172a;
                --dark-950: #020617;
            }
            
            .content-auto {
                content-visibility: auto;
            }
            .backdrop-blur-xs {
                backdrop-filter: blur(2px);
            }
            .text-shadow {
                text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
            }
            /* 全局滑动条美化 */
            * {
                scrollbar-width: thin;
                scrollbar-color: var(--secondary-color) transparent;
            }
            
            /* WebKit 浏览器 */
            *::-webkit-scrollbar {
                width: 8px;
                height: 8px;
            }
            
            *::-webkit-scrollbar-track {
                background: linear-gradient(180deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
                border-radius: 4px;
                box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
            }
            
            .light-theme *::-webkit-scrollbar-track {
                background: linear-gradient(180deg, rgba(226, 232, 240, 0.6), rgba(203, 213, 225, 0.8));
                box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
            }
            
            *::-webkit-scrollbar-thumb {
                background: linear-gradient(180deg, var(--secondary-color), #2563eb);
                border-radius: 4px;
                border: 1px solid rgba(255, 255, 255, 0.1);
                transition: all 0.3s ease;
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
            }
            
            *::-webkit-scrollbar-thumb:hover {
                background: linear-gradient(180deg, #60a5fa, var(--secondary-color));
            }
            .log-glass-effect {
                background: var(--card-bg);
                backdrop-filter: blur(12px) saturate(180%);
                -webkit-backdrop-filter: blur(12px) saturate(180%);
                border: 1px solid var(--border-color);
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
                height: 85vh !important;
                max-height: 85vh;
                position: relative;
            }
            .light-theme .log-glass-effect {
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(0, 0, 0, 0.05);
            }
            .log-glass-effect::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: linear-gradient(to bottom, transparent, rgba(37, 99, 235, 0.05), transparent);
                pointer-events: none;
                z-index: 1;
            }
            .log-scroll-animation {
                animation: logScroll 0.3s ease-out;
            }
            @keyframes logScroll {
                0% { transform: translateY(5px); opacity: 0.7; }
                100% { transform: translateY(0); opacity: 1; }
            }
            .online-glass-effect {
                background: var(--card-bg);
                backdrop-filter: blur(12px) saturate(180%);
                -webkit-backdrop-filter: blur(12px) saturate(180%);
                border: 1px solid var(--border-color);
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
            }
            .light-theme .online-glass-effect {
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(0, 0, 0, 0.05);
            }
            .glass-effect {
                background: var(--card-bg);
                backdrop-filter: blur(12px) saturate(180%);
                -webkit-backdrop-filter: blur(12px) saturate(180%);
                border: 1px solid var(--border-color);
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
            }
            .light-theme .glass-effect {
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(0, 0, 0, 0.05);
            }
            #log {
                flex: 1;
                overflow-y: auto;
                min-height: 0;
                scrollbar-width: thin;
                scrollbar-color: var(--secondary-color) transparent;
                background: var(--card-bg);
            }
            #log::-webkit-scrollbar {
                width: 8px;
                height: 8px;
            }
            #log::-webkit-scrollbar-track {
                background: linear-gradient(180deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
                border-radius: 4px;
                box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
            }
            .light-theme #log::-webkit-scrollbar-track {
                background: linear-gradient(180deg, rgba(226, 232, 240, 0.6), rgba(203, 213, 225, 0.8));
                box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
            }
            #log::-webkit-scrollbar-thumb {
                background: linear-gradient(180deg, var(--secondary-color), #2563eb);
                border-radius: 4px;
                border: 1px solid rgba(255, 255, 255, 0.1);
                transition: all 0.3s ease;
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
            }
            #log::-webkit-scrollbar-thumb:hover {
                background: linear-gradient(180deg, #60a5fa, var(--secondary-color));
            }
            .glass-effect > div:last-child {
                height: 4rem;
                min-height: 4rem;
            }
            
            /* 蓝色主题的轻量阴影与交互效果 */
            .shadow-glow {
                box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
            }
            .gradient-text {
                background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                background-clip: text;
            }
            .input-glow:focus {
                box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 0 0 1px var(--secondary-color);
            }
            .light-theme .bg-dark-700 {
                background-color: rgba(226, 232, 240, 0.8);
                color: var(--text-color);
            }
            .light-theme .border-dark-600 {
                border-color: rgba(148, 163, 184, 0.5);
            }
            .light-theme .border-dark-700 {
                border-color: rgba(148, 163, 184, 0.3);
            }
            /* 白色主题下的顶部按钮样式 */
            .light-theme #theme-toggle {
                background-color: rgba(248, 250, 252, 0.9);
                color: var(--text-color);
                border: 1px solid rgba(148, 163, 184, 0.3);
            }
            .light-theme #theme-toggle:hover {
                background-color: rgba(241, 245, 249, 0.9);
            }
            .light-theme #logout-btn {
                background: linear-gradient(to right, rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 0.9));
                color: var(--text-color);
                border: 1px solid rgba(148, 163, 184, 0.3);
            }
            .light-theme #logout-btn:hover {
                background: linear-gradient(to right, rgba(241, 245, 249, 0.9), rgba(241, 245, 249, 0.9));
            }
            /* 白色主题下的搜索按钮样式 */
            .light-theme #toggle-search {
                background-color: rgba(248, 250, 252, 0.9);
                color: var(--text-color);
                border: 1px solid rgba(148, 163, 184, 0.3);
            }
            .light-theme #toggle-search:hover {
                background-color: rgba(241, 245, 249, 0.9);
            }
            .light-theme #search-container {
                animation: slideInRight 0.4s ease-out;
            }
            .light-theme #user-search {
                background-color: rgba(248, 250, 252, 0.9);
                color: var(--text-color);
                border: 1px solid rgba(148, 163, 184, 0.3);
            }
            .light-theme #clear-search {
                color: var(--dark-500);
            }
            .light-theme #clear-search:hover {
                color: var(--text-color);
            }
            /* 白色主题下的下拉框样式 */
            .light-theme #time-range,
            .light-theme #time-granularity {
                background-color: rgba(248, 250, 252, 0.9);
                color: var(--text-color);
                border: 1px solid rgba(148, 163, 184, 0.3);
            }
            .light-theme #time-range:focus,
            .light-theme #time-granularity:focus {
                border-color: var(--secondary-color);
                box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 0 0 1px var(--secondary-color);
            }
            .light-theme input#command {
                color: var(--text-color);
                background-color: rgba(226, 232, 240, 0.8);
            }
            .light-theme input#command::placeholder {
                color: var(--dark-500);
            }
            .light-theme .bg-dark-800\/50 {
                background-color: rgba(226, 232, 240, 0.6);
                border-color: rgba(148, 163, 184, 0.3);
                color: var(--text-color);
            }
            .light-theme .bg-dark-700\/30 {
                background-color: rgba(226, 232, 240, 0.4);
                border-color: rgba(148, 163, 184, 0.3);
                color: var(--text-color);
            }
            /* 白色主题下的容器标题样式 */
            .light-theme .bg-dark-800\/80 {
                background-color: rgba(226, 232, 240, 0.8);
                border-color: rgba(148, 163, 184, 0.3);
            }
            /* 白色主题下的容器标为黑色 */
            .light-theme .bg-dark-800\/80 h3,
            .light-theme .bg-dark-800\/80 h4 {
                color: #1e293b;
            }
            /* 白色主题下的文本样式 */
            .light-theme .text-dark-300 {
                color: var(--text-color);
            }
            .light-theme .text-dark-400 {
                color: var(--dark-600);
            }
            /* 其他地方的白色文本在白色主题下改为黑色 */
            .light-theme .text-white {
                color: var(--text-color);
            }
            /* 确保白色主题下的统计数字显示为黑色 */
            .light-theme #online-count,
            .light-theme #total-count {
                color: var(--text-color);
            }
            /* 白色主题下的按钮样式 */
            .light-theme .bg-dark-700 {
                background-color: rgba(226, 232, 240, 0.8);
                color: var(--text-color);
            }
            .light-theme .bg-dark-700:hover {
                background-color: rgba(203, 213, 225, 0.8);
                color: var(--text-color);
            }
            .light-theme .border-dark-600 {
                border-color: rgba(148, 163, 184, 0.5);
            }
            .light-theme .border-dark-700 {
                border-color: rgba(148, 163, 184, 0.3);
            }
        }

/* Console readability overrides: the dashboard is intentionally light and high-contrast. */
.light-theme {
    --bg-color: #eef5ff;
    --text-color: #17365d;
    --card-bg: #ffffff;
    --border-color: #d7e4f5;
}
.light-theme .glass-effect,
.light-theme .log-glass-effect,
.light-theme .online-glass-effect {
    background: #ffffff;
    border-color: #d7e4f5;
    box-shadow: 0 10px 28px rgba(30, 80, 140, 0.08);
}
.light-theme .bg-dark-800\/80,
.light-theme .bg-dark-800\/50 {
    background-color: #f3f7fc !important;
    color: #17365d !important;
}
.light-theme .bg-dark-700,
.light-theme .bg-dark-700\/50,
.light-theme .bg-dark-700\/30 {
    background-color: #edf3fa !important;
    color: #17365d !important;
}
.light-theme .text-white,
.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4 {
    color: #17365d !important;
}
.light-theme #online-count,
.light-theme #total-count {
    color: #0f56b3 !important;
    text-shadow: none;
}
.light-theme #log {
    background: #f8fbff;
    color: #29496e;
}
.light-theme #command {
    background: #edf3fa !important;
    color: #17365d !important;
    border: 1px solid #d7e4f5;
}
.light-theme #command::placeholder { color: #7890ac !important; }
.light-theme .log-filter-btn {
    color: #29496e !important;
    background: #e7f0fb !important;
}
.light-theme .log-filter-btn[data-level="all"] {
    background: #2563eb !important;
    color: #ffffff !important;
}
.light-theme #online-users-list > div {
    background: #f3f7fc !important;
    border: 1px solid #d7e4f5;
}
.light-theme .text-dark-300 { color: #29496e !important; }
.light-theme .text-dark-400,
.light-theme .text-dark-500 { color: #66809f !important; }

.console-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid #d7e4f5;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 18px rgba(30, 80, 140, 0.07);
    backdrop-filter: blur(14px);
    text-align: left;
}
.brand-mark {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}
.server-meta {
    display: none;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    background: #f5f9ff;
    padding: 0.55rem 0.75rem;
    color: #53708f;
    font-size: 0.72rem;
}
@media (min-width: 640px) {
    .server-meta { display: flex; }
}
.status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.meta-divider { width: 1px; height: 1rem; background: #d7e4f5; }
.icon-button,
.header-action {
    display: inline-flex;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    border: 1px solid #d7e4f5;
    background: #fff;
    color: #24517f;
    transition: 0.2s ease;
}
.icon-button { width: 2.35rem; }
.header-action { gap: 0.45rem; padding: 0 0.85rem; font-size: 0.8rem; font-weight: 600; }
.icon-button:hover,
.header-action:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.console-footer {
    margin-top: 1.5rem;
    border-top: 1px solid #d7e4f5;
    background: rgba(255, 255, 255, 0.82);
    text-align: left;
}
#online-users-list,
#online-users-list > div { text-align: left; }

/* 显式暗色主题，覆盖页面中固定的亮色工具类。 */
.dark-theme {
    --bg-color: #07111f;
    --text-color: #dbeafe;
    --card-bg: #0d1b2e;
    --border-color: #203a5d;
    background: #07111f !important;
    color: #dbeafe !important;
}
.dark-theme .console-header {
    border-color: #203a5d;
    background: rgba(7, 17, 31, 0.96);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.dark-theme .console-footer { border-color: #203a5d; background: #091525; }
.dark-theme .console-header h1,
.dark-theme .console-footer p,
.dark-theme .console-footer span,
.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4,
.dark-theme .text-white { color: #e8f2ff !important; }
.dark-theme .console-header p,
.dark-theme .console-footer .text-slate-500,
.dark-theme .console-footer .text-slate-400,
.dark-theme .text-dark-400,
.dark-theme .text-dark-500 { color: #8ea8c7 !important; }
.dark-theme .glass-effect,
.dark-theme .log-glass-effect,
.dark-theme .online-glass-effect {
    background: #0d1b2e;
    border-color: #203a5d;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}
.dark-theme .bg-dark-800\/80,
.dark-theme .bg-dark-800\/50 { background-color: #102139 !important; color: #dbeafe !important; }
.dark-theme .bg-dark-700,
.dark-theme .bg-dark-700\/50,
.dark-theme .bg-dark-700\/30 { background-color: #142944 !important; color: #dbeafe !important; }
.dark-theme .border-dark-600,
.dark-theme .border-dark-600\/50,
.dark-theme .border-dark-700,
.dark-theme .border-dark-700\/50 { border-color: #294667 !important; }
.dark-theme #log { background: #091525; color: #c7dbf2; }
.dark-theme #command,
.dark-theme #user-search,
.dark-theme #time-range,
.dark-theme #time-granularity {
    border-color: #294667 !important;
    background: #0b192a !important;
    color: #e8f2ff !important;
}
.dark-theme #command::placeholder,
.dark-theme #user-search::placeholder { color: #7690af !important; }
.dark-theme #online-users-list > div {
    border: 1px solid #203a5d;
    background: #102139 !important;
}
.dark-theme .server-meta { border-color: #294667; background: #102139; color: #a9c0da; }
.dark-theme .meta-divider { background: #294667; }
.dark-theme .icon-button,
.dark-theme .header-action { border-color: #294667; background: #102139; color: #bfdbfe; }
.dark-theme .icon-button:hover,
.dark-theme .header-action:hover { border-color: #3b82f6; background: #142944; color: #dbeafe; }
.dark-theme #online-count,
.dark-theme #total-count { color: #60a5fa !important; }

/* 卡片在悬停时保持原位，不缩放、不抬升、不增强阴影。 */
