/* 主题切换器 - 实验室智能台账系统 */
.theme-switcher { position: fixed; bottom: 24px; right: 24px; z-index: 9999; }
.theme-switcher-inline { position: static; bottom: unset; right: unset; }
.theme-switcher-inline .theme-panel { position:fixed; bottom:80px; right:72px; }
.theme-toggle-btn { display:flex; align-items:center; gap:8px; padding:10px 16px; background:var(--bg-card); border:1px solid var(--border-color); border-radius:50px; color:var(--text-primary); cursor:pointer; transition:all .2s; box-shadow:var(--shadow-lg); font-size:.9rem; }
.theme-toggle-btn:hover { background:var(--bg-card-hover); border-color:var(--accent-primary); transform:translateY(-2px); box-shadow:var(--shadow-xl); }
.theme-icon { font-size:1.2rem; }
.theme-panel { position:fixed; bottom:80px; right:24px; width:440px; max-width:calc(100vw-48px); background:var(--bg-card); border:1px solid var(--border-color); border-radius:16px; box-shadow:var(--shadow-xl); overflow:hidden; animation:fadeUp .2s ease; max-height:70vh; z-index:9998; }
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.theme-panel-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--border-color); }
.theme-panel-header h3 { margin:0; font-size:1rem; color:var(--text-primary); }
.theme-close-btn { width:32px; height:32px; border:none; background:transparent; color:var(--text-secondary); font-size:1.5rem; cursor:pointer; border-radius:6px; transition:all .2s; }
.theme-close-btn:hover { background:var(--bg-tertiary); color:var(--text-primary); }
.theme-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px; padding:16px; max-height:calc(70vh-60px); overflow-y:auto; }
.theme-grid::-webkit-scrollbar { width:6px; }
.theme-grid::-webkit-scrollbar-track { background:var(--bg-secondary); border-radius:3px; }
.theme-grid::-webkit-scrollbar-thumb { background:var(--border-color); border-radius:3px; }
.theme-option { position:relative; padding:10px; background:var(--bg-secondary); border:2px solid var(--border-color); border-radius:10px; cursor:pointer; transition:all .2s; }
.theme-option:hover { border-color:var(--accent-primary); transform:translateY(-2px); box-shadow:var(--shadow-md); }
.theme-option.active { border-color:var(--accent-primary); background:var(--bg-tertiary); }
.theme-preview { width:100%; aspect-ratio:4/2; border-radius:8px; overflow:hidden; margin-bottom:6px; border:1px solid var(--border-light); }
.theme-preview-header { padding:6px; text-align:center; font-size:1rem; }
.theme-preview-body { display:flex; gap:4px; padding:6px; }
.theme-preview-dot { flex:1; height:16px; border-radius:4px; display:flex; align-items:center; justify-content:center; font-size:.55rem; font-weight:700; }
.theme-info { text-align:center; }
.theme-name { font-size:.85rem; font-weight:600; color:var(--text-primary); margin-bottom:2px; }
.theme-desc { font-size:.7rem; color:var(--text-secondary); line-height:1.3; }
.theme-check { position:absolute; top:6px; right:6px; width:22px; height:22px; background:var(--accent-primary); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:700; box-shadow:0 2px 6px rgba(0,0,0,.3); }

/* 移动端适配 */
@media(max-width:768px){
  .theme-switcher { bottom:16px; right:16px; }
  .theme-panel { bottom:70px; right:12px; width:calc(100vw-24px); }
  .theme-toggle-btn { padding:8px 14px; }
  .theme-grid { grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:8px; padding:12px; }
}
