/* 玻璃拟态效果 - 优化版 */
.glass {
    background: rgba(255, 255, 255, 0.2);
    /* 移除模糊效果以减少GPU占用 */
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.1);
}
.glass-dark {
    background: rgba(15, 23, 42, 0.6);
    /* 移除模糊效果以减少GPU占用 */
    border: 1px solid rgba(56, 189, 248, 0.15);
    box-shadow: 0 4px 16px 0 rgba(2, 132, 199, 0.15);
}
.glass-dark-low {
    background: rgba(15, 23, 42, 0.3);
    /* 透明度比glass-dark更低 */
    border: 1px solid rgba(56, 189, 248, 0.1);
    box-shadow: 0 2px 8px 0 rgba(2, 132, 199, 0.1);
}

/* 浅色主题玻璃拟态效果 */
.glass-light {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 4px 16px 0 rgba(59, 130, 246, 0.15);
}

.glass-light-low {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 2px 8px 0 rgba(59, 130, 246, 0.1);
}

/* 修复TailwindCSS preflight对按钮背景透明样式的影响 */
button.glass,
button.glass-dark,
button.glass-dark-low,
button.glass-light,
button.glass-light-low {
    background-color: inherit;
    background-image: none;
}

/* 建筑物选择器样式 */
#building-selector {
    appearance: none; /* 移除默认下拉箭头 */
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>"); /* 自定义下拉箭头 */
    background-repeat: no-repeat;
    background-position: right 5px center;
    padding-right: 25px; /* 为下拉箭头留出空间 */
}

#building-selector option {
    background-color: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 8px;
}

/* 隐藏滚动条但保留功能 */
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow: hidden;
    /* 使用静态SVG背景替代动画SVG背景，减少GPU占用 */
    background: url('../assets/tech_background_static.svg') center/cover no-repeat fixed;
    min-height: 100vh;
    color: var(--text-primary);
}
body::-webkit-scrollbar {
    display: none;
}
/* 设备图标悬停效果 - 优化版 */
.device-icon {
    /* 减少过渡时间，简化效果 */
    transition: all 0.1s ease;
}
.device-icon:hover {
    /* 减少变换幅度，移除阴影效果 */
    transform: translateY(-2px);
}
/* 拖动时的样式 - 优化版 */
.sortable-ghost {
    opacity: 0.6; /* 提高不透明度，减少GPU计算 */
}
.sortable-chosen {
    transform: scale(1.02); /* 减少变换幅度 */
}
/* 侧边栏导航样式 */
.sidebar {
    width: 250px;
    height: 100vh;
    transition: all 0.3s ease;
}
.sidebar.collapsed {
    width: 70px;
}
.sidebar.collapsed .menu-text {
    display: none;
}
.sidebar.collapsed .logo-text {
    display: none;
}
/* 内容区域样式 */
.content-area {
    width: calc(100% - 250px);
    transition: all 0.3s ease;
}
.content-area.expanded {
    width: calc(100% - 70px);
}
/* 导航菜单样式 - 优化版 */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.1s ease;
}
.nav-link:hover {
    background-color: rgba(56, 189, 248, 0.1);
}
.nav-link.active {
    background-color: rgba(56, 189, 248, 0.2);
    border-right: 3px solid #38bdf8;
}

/* ========== 设备卡片和动画样式 ========== */

/* 设备卡片 */
.device-card {
    width: calc(16.666% - 8px); /* 6列布局，每列之间有间隙 */
    margin: 0 4px 8px 4px;
    float: left;
    display: flex;
    flex-direction: column;
    height: 150px; /* 增加高度以适应更高的动画区域 */
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* 设备图标样式 */
.device-card img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* 设备卡片紧凑版 */
.compact-card {
    width: calc(16.666% - 8px);
    height: 150px;
}

/* 超小字体 */
.text-2xs {
    font-size: 0.65rem;
    line-height: 1rem;
}

/* 设备图表渐变背景 */
.device-chart-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* 使用100%高度填充整个容器 */
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    background: transparent; /* 移除背景色 */
}

/* 波浪动画容器 */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 波浪效果 */
.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    bottom: 0; /* 改为0，使波浪从底部开始 */
    left: 0;
    opacity: 0.9;
    background-position: bottom;
    background-repeat: repeat-x;
    background-size: 50% 100% !important; /* 修改为100%高度 */
}

/* 第一个波浪 - 蓝色渐变 */
.wave-1.gradient-normal {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M800 56.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v143.1h800v-143.1z' fill='url(%23gradient-blue)'/%3E%3Cdefs%3E%3ClinearGradient id='gradient-blue' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(14,165,233,0.7)'/%3E%3Cstop offset='50%25' style='stop-color:rgba(56,189,248,0.5)'/%3E%3Cstop offset='100%25' style='stop-color:rgba(14,165,233,0.7)'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    animation: wave-animation-1 8s linear infinite;
    z-index: 1;
}

/* 第一个波浪 - 黄色渐变 */
.wave-1.gradient-warning {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M800 56.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v143.1h800v-143.1z' fill='url(%23gradient-yellow)'/%3E%3Cdefs%3E%3ClinearGradient id='gradient-yellow' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(245,158,11,0.7)'/%3E%3Cstop offset='50%25' style='stop-color:rgba(251,191,36,0.5)'/%3E%3Cstop offset='100%25' style='stop-color:rgba(245,158,11,0.7)'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    animation: wave-animation-1 5s linear infinite;
    z-index: 1;
}

/* 第一个波浪 - 红色渐变 */
.wave-1.gradient-alarm {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M800 56.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v143.1h800v-143.1z' fill='url(%23gradient-red)'/%3E%3Cdefs%3E%3ClinearGradient id='gradient-red' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(220,38,38,0.7)'/%3E%3Cstop offset='50%25' style='stop-color:rgba(248,113,113,0.5)'/%3E%3Cstop offset='100%25' style='stop-color:rgba(220,38,38,0.7)'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    animation: wave-animation-1 3s linear infinite;
    z-index: 1;
}

/* 第二个波浪 - 蓝色渐变 */
.wave-2.gradient-normal {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M800 76.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v123.1h800v-123.1z' fill='url(%23gradient-blue-light)'/%3E%3Cdefs%3E%3ClinearGradient id='gradient-blue-light' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(56,189,248,0.6)'/%3E%3Cstop offset='50%25' style='stop-color:rgba(125,211,252,0.4)'/%3E%3Cstop offset='100%25' style='stop-color:rgba(56,189,248,0.6)'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    animation: wave-animation-2 10s linear infinite;
    z-index: 2;
}

/* 第二个波浪 - 黄色渐变 */
.wave-2.gradient-warning {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M800 76.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v123.1h800v-123.1z' fill='url(%23gradient-yellow-light)'/%3E%3Cdefs%3E%3ClinearGradient id='gradient-yellow-light' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(251,191,36,0.6)'/%3E%3Cstop offset='50%25' style='stop-color:rgba(253,224,71,0.4)'/%3E%3Cstop offset='100%25' style='stop-color:rgba(251,191,36,0.6)'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    animation: wave-animation-2 7s linear infinite;
    z-index: 2;
}

/* 第二个波浪 - 红色渐变 */
.wave-2.gradient-alarm {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'%3E%3Cpath d='M800 76.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v123.1h800v-123.1z' fill='url(%23gradient-red-light)'/%3E%3Cdefs%3E%3ClinearGradient id='gradient-red-light' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:rgba(248,113,113,0.6)'/%3E%3Cstop offset='50%25' style='stop-color:rgba(252,165,165,0.4)'/%3E%3Cstop offset='100%25' style='stop-color:rgba(248,113,113,0.6)'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    animation: wave-animation-2 5s linear infinite;
    z-index: 2;
}

/* 波浪动画 */
@keyframes wave-animation-1 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes wave-animation-2 {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* 设备类型特定动画效果 */

/* 温度计动画 - temperature */
@keyframes temperature-rise {
    0% { height: 30%; }
    50% { height: 70%; }
    100% { height: 30%; }
}

.device-type-temperature .device-chart-gradient {
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-type-temperature .temperature-container {
    position: relative;
    width: 8px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.device-type-temperature .temperature-level {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, #ff4d4d, #ff9966);
    animation: temperature-rise 4s ease-in-out infinite;
}

.device-type-temperature .temperature-bulb {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 66, 66, 0.7);
}

/* 烟雾动画 - smoke */
@keyframes smoke-rise {
    0% { 
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    100% { 
        transform: translateY(-40px) scale(1.5);
        opacity: 0;
    }
}

.device-type-smoke .smoke-container {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-around;
}

.device-type-smoke .smoke-particle {
    width: 10px;
    height: 10px;
    background: rgba(200, 200, 200, 0.6);
    border-radius: 50%;
    opacity: 0;
    animation: smoke-rise 3s ease-out infinite;
}

.device-type-smoke .smoke-particle:nth-child(1) {
    animation-delay: 0s;
}

.device-type-smoke .smoke-particle:nth-child(2) {
    animation-delay: 0.8s;
}

.device-type-smoke .smoke-particle:nth-child(3) {
    animation-delay: 1.6s;
}

.device-type-smoke .smoke-particle:nth-child(4) {
    animation-delay: 2.4s;
}

/* 气体动画 - gas */
@keyframes gas-bubble {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}

.device-type-gas .gas-container {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
}

.device-type-gas .gas-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(144, 238, 144, 0.5);
    animation: gas-bubble 3s ease-in-out infinite;
}

.device-type-gas .gas-bubble:nth-child(1) {
    width: 30px;
    height: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.device-type-gas .gas-bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 30%;
    animation-delay: 0.5s;
}

.device-type-gas .gas-bubble:nth-child(3) {
    width: 15px;
    height: 15px;
    left: 70%;
    animation-delay: 1s;
}

/* 火焰动画 - fire */
@keyframes fire-flicker {
    0% { transform: scale(0.9) rotate(-1deg); }
    25% { transform: scale(1.1) rotate(1deg); }
    50% { transform: scale(0.9) rotate(0deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
    100% { transform: scale(0.9) rotate(-1deg); }
}

.device-type-fire .fire-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    display: flex;
    justify-content: center;
}

.device-type-fire .fire-flame {
    width: 30px;
    height: 40px;
    background: linear-gradient(to top, #ff4500, #ff8c00);
    border-radius: 50% 50% 20% 20% / 40% 40% 60% 60%;
    animation: fire-flicker 2s ease-in-out infinite;
}

/* 水压动画 - water (默认波浪效果增强) */
.device-type-water .wave-container {
    opacity: 0.9;
}

/* 湿度动画 - humidity */
@keyframes humidity-drop {
    0% { transform: translateY(-15px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(30px); opacity: 0; }
}

.device-type-humidity .humidity-container {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-around;
}

.device-type-humidity .humidity-drop {
    width: 8px;
    height: 12px;
    background: rgba(125, 211, 252, 0.7);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: humidity-drop 2.5s linear infinite;
}

.device-type-humidity .humidity-drop:nth-child(1) {
    animation-delay: 0s;
}

.device-type-humidity .humidity-drop:nth-child(2) {
    animation-delay: 0.8s;
}

.device-type-humidity .humidity-drop:nth-child(3) {
    animation-delay: 1.6s;
}

/* 门禁动画 - door */
@keyframes door-swing {
    0% { transform: rotate(0deg); transform-origin: left; }
    50% { transform: rotate(-30deg); transform-origin: left; }
    100% { transform: rotate(0deg); transform-origin: left; }
}

.device-type-door .door-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-type-door .door-frame {
    width: 30px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.device-type-door .door-panel {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 36px;
    background: rgba(56, 189, 248, 0.5);
    transform-origin: left;
    animation: door-swing 5s ease-in-out infinite;
}

/* 按钮动画 - button */
@keyframes button-press {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

.device-type-button .button-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-type-button .button-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.7);
    animation: button-press 3s ease-in-out infinite;
}

/* 默认设备类型动画 - 脉冲效果 */
@keyframes default-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

.default-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.default-pulse {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(94, 234, 212, 0.6);
    animation: default-pulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(94, 234, 212, 0.4);
}

/* 删除不再需要的渐变背景类 */
.gradient-normal, .gradient-warning, .gradient-alarm {
    background: transparent;
}

/* 设备类型图表 */
.device-type-chart {
    height: 80px; /* 增加高度与JS中保持一致 */
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}

/* 数值更新闪烁效果 */
.value-update {
    animation: value-flash 1s;
}

@keyframes value-flash {
    0% {
        color: inherit;
    }
    20% {
        color: white;
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    }
    100% {
        color: inherit;
    }
}

/* 响应式布局 */
@media (max-width: 1280px) {
    .device-card {
        width: calc(20% - 8px); /* 5列布局 */
    }
}

@media (max-width: 1024px) {
    .device-card {
        width: calc(25% - 8px); /* 4列布局 */
    }
}

@media (max-width: 768px) {
    .device-card {
        width: calc(33.333% - 8px); /* 3列布局 */
    }
}

@media (max-width: 640px) {
    .device-card {
        width: calc(50% - 8px); /* 2列布局 */
    }
}

/* 设备名称样式 */
.device-card .text-xs.text-gray-300.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
    padding-right: 2px;
}

/* 设备状态标签 */
.device-card .rounded-full {
    white-space: nowrap;
}

/* 设备卡片中的顶部和中间区域 */
.device-card > div:not(.mt-auto) {
    flex-shrink: 0;
}

/* 设备卡片中的底部动画区域 */
.device-card > .mt-auto {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

/* 主题相关样式 */
/* 默认深色主题 */
:root {
    --primary-bg: url('../assets/tech_background_static.svg');
    --text-primary: #ffffff;
    --text-primary-rgb: 255, 255, 255;
    --text-secondary: #94a3b8;
    --text-secondary-rgb: 148, 163, 184;
    --text-accent: #38bdf8;
    --text-accent-rgb: 56, 189, 248;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-low: rgba(15, 23, 42, 0.3);
    --border-color: rgba(56, 189, 248, 0.15);
    --hover-bg: rgba(56, 189, 248, 0.1);
    --active-bg: rgba(56, 189, 248, 0.2);
    --header-bg: rgba(15, 23, 42, 0.6);
    --dropdown-bg: rgba(15, 23, 42, 0.8);
    --input-bg: rgba(15, 23, 42, 0.5);
    --input-border: #374151;
}

/* 浅色主题 - 白蓝 */
.theme-light-blue {
    --primary-bg: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    --text-primary: #1e3a8a;
    --text-primary-rgb: 30, 58, 138;
    --text-secondary: #475569;
    --text-secondary-rgb: 71, 85, 105;
    --text-accent: #2563eb;
    --text-accent-rgb: 37, 99, 235;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-low: rgba(255, 255, 255, 0.5);
    --border-color: rgba(59, 130, 246, 0.15);
    --hover-bg: rgba(59, 130, 246, 0.1);
    --active-bg: rgba(59, 130, 246, 0.2);
    --header-bg: rgba(255, 255, 255, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.9);
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: #d1d5db;
}

/* 浅色主题 - 白绿 */
.theme-light-green {
    --primary-bg: linear-gradient(135deg, #ecfdf5, #d1fae5);
    --text-primary: #064e3b;
    --text-primary-rgb: 6, 78, 59;
    --text-secondary: #475569;
    --text-secondary-rgb: 71, 85, 105;
    --text-accent: #059669;
    --text-accent-rgb: 5, 150, 105;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-low: rgba(255, 255, 255, 0.5);
    --border-color: rgba(5, 150, 105, 0.15);
    --hover-bg: rgba(5, 150, 105, 0.1);
    --active-bg: rgba(5, 150, 105, 0.2);
    --header-bg: rgba(255, 255, 255, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.9);
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: #d1d5db;
}

/* 浅色主题 - 白紫 */
.theme-light-purple {
    --primary-bg: linear-gradient(135deg, #f5f3ff, #ede9fe);
    --text-primary: #4c1d95;
    --text-primary-rgb: 76, 29, 149;
    --text-secondary: #475569;
    --text-secondary-rgb: 71, 85, 105;
    --text-accent: #7c3aed;
    --text-accent-rgb: 124, 58, 237;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-low: rgba(255, 255, 255, 0.5);
    --border-color: rgba(124, 58, 237, 0.15);
    --hover-bg: rgba(124, 58, 237, 0.1);
    --active-bg: rgba(124, 58, 237, 0.2);
    --header-bg: rgba(255, 255, 255, 0.8);
    --dropdown-bg: rgba(255, 255, 255, 0.9);
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: #d1d5db;
}

/* 应用主题变量到具体元素 */
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow: hidden;
    background: var(--primary-bg) center/cover no-repeat fixed;
    min-height: 100vh;
    color: var(--text-primary);
}

/* 导航菜单样式 - 使用主题变量 */
.nav-link:hover {
    background-color: var(--hover-bg);
}
.nav-link.active {
    background-color: var(--active-bg);
    border-right: 3px solid var(--text-accent);
}

/* 更新表单元素样式以适应主题 */
input, select, textarea {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

input::placeholder, select::placeholder, textarea::placeholder {
    color: var(--text-secondary);
}

/* 主题切换按钮样式 */
.theme-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 9999px;
    background-color: var(--bg-card-low);
}

.theme-switcher:hover {
    background-color: var(--hover-bg);
}

.theme-switcher svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-accent);
}

.theme-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--dropdown-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
    z-index: 50;
    min-width: 150px;
}

.theme-menu-item {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.theme-menu-item:hover {
    background-color: var(--hover-bg);
}

.theme-menu-item.active {
    background-color: var(--active-bg);
}

.theme-color-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
}

.theme-color-dark {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.theme-color-light-blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.theme-color-light-green {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.theme-color-light-purple {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}