/* ============================================
   UI/UX 增强样式 - 2026-04-06
   ============================================ */

/* ---- 1. 按钮状态增强 ---- */
.btn,
.btn-login,
.send-btn,
.chip-btn,
.case-action,
.tool-btn,
button {
  transition: all 0.18s ease;
}

.btn:active,
.btn-login:active,
.send-btn.ready:active,
.chip-btn:active,
button:active:not(:disabled) {
  transform: scale(0.97) !important;
}

.btn:focus-visible,
.btn-login:focus-visible,
.send-btn:focus-visible,
.chip-btn:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(100, 180, 255, 0.8);
  outline-offset: 2px;
}

/* ---- 2. 登录按钮 Loading 状态 ---- */
.btn-login {
  position: relative;
  overflow: hidden;
}

.btn-login.loading {
  pointer-events: none;
  opacity: 0.85;
  color: transparent;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(3, 5, 7, 0.3);
  border-top-color: #030507;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ---- 3. 表单验证样式 ---- */
.field input.error,
.field input:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 120, 140, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(255, 100, 120, 0.15) !important;
}

.field input.success,
.field input:valid:not(:placeholder-shown) {
  border-color: rgba(100, 220, 160, 0.6);
}

.field-error {
  color: #ff97af;
  font-size: 11px;
  margin-top: 4px;
  display: none;
}

.field input.error + .field-error,
.field input:invalid:not(:placeholder-shown) + .field-error {
  display: block;
}

.field-hint {
  color: rgba(180, 200, 220, 0.6);
  font-size: 11px;
  margin-top: 4px;
}

/* 输入框过渡动画 */
.field input,
.field select,
.field textarea,
.login-form input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ---- 4. Toast 通知组件 ---- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(14, 20, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(240, 248, 255, 0.95);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toast-in 0.28s ease-out;
}

.toast-item.hiding {
  animation: toast-out 0.22s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.toast-item.success .toast-icon {
  background: rgba(80, 220, 150, 0.2);
  color: #5de89a;
}

.toast-item.error .toast-icon {
  background: rgba(255, 100, 120, 0.2);
  color: #ff8e8e;
}

.toast-item.warning .toast-icon {
  background: rgba(255, 180, 60, 0.2);
  color: #ffc566;
}

.toast-item.info .toast-icon {
  background: rgba(100, 180, 255, 0.2);
  color: #7dc4ff;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message {
  color: rgba(200, 220, 240, 0.8);
}

.toast-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(200, 220, 240, 0.6);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(240, 250, 255, 0.9);
}

.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(90deg, rgba(100, 180, 255, 0.8), rgba(80, 220, 180, 0.8));
  animation: toast-progress linear forwards;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

/* ---- 5. 任务状态视觉反馈 ---- */
.status-pill.running,
.status-pill.processing {
  animation: pulse-status 1.8s ease-in-out infinite;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 任务进度条增强 */
.task-progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.task-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f8fff, #42ddc2);
  transition: width 0.4s ease;
}

.task-progress-bar.indeterminate {
  width: 40% !important;
  animation: progress-indeterminate 1.4s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* 任务完成动画 */
.task-complete-flash {
  animation: complete-flash 0.5s ease-out;
}

@keyframes complete-flash {
  0% { background: rgba(80, 220, 150, 0.3); }
  100% { background: transparent; }
}

/* ---- 6. 骨架屏加载效果 ---- */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(30, 40, 60, 0.5) 25%,
    rgba(50, 70, 100, 0.3) 50%,
    rgba(30, 40, 60, 0.5) 75%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 120px;
  border-radius: 12px;
}

.skeleton-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 8px;
}

/* ---- 7. 自定义滚动条 ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.04);
}

/* 浅色主题滚动条（管理后台） */
.admin-shell::-webkit-scrollbar-track,
.admin-shell ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

.admin-shell::-webkit-scrollbar-thumb,
.admin-shell ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
}

.admin-shell::-webkit-scrollbar-thumb:hover,
.admin-shell ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ---- 8. 空状态设计 ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(100, 140, 200, 0.15), rgba(80, 180, 160, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: rgba(180, 200, 230, 0.7);
}

.empty-state-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: rgba(230, 240, 255, 0.9);
}

.empty-state-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(180, 200, 220, 0.65);
  max-width: 320px;
}

.empty-state-action {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(100, 160, 255, 0.4);
  background: rgba(60, 120, 220, 0.15);
  color: rgba(160, 210, 255, 0.95);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.empty-state-action:hover {
  background: rgba(60, 120, 220, 0.25);
  border-color: rgba(100, 160, 255, 0.6);
}

/* ---- 9. 动画性能优化 ---- */
.floating-case-card,
.bg-layer,
.bg-1,
.bg-2,
.bg-3 {
  will-change: transform;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-case-card {
    animation: none !important;
  }

  .bg-2 {
    animation: none !important;
  }

  .skeleton {
    animation: none !important;
    background: rgba(40, 50, 70, 0.5) !important;
  }
}

/* ---- 10. 响应式优化 - 移动端侧边栏 ---- */
@media (max-width: 768px) {
  .side-rail {
    position: fixed;
    left: -76px;
    transition: left 0.28s ease;
    z-index: 100;
  }

  .side-rail.open {
    left: 0;
  }

  .board-main {
    margin-left: 0 !important;
  }

  /* 移动端菜单按钮 */
  .mobile-menu-btn {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 99;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(10, 14, 20, 0.9);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
  }

  .mobile-menu-btn.hidden {
    display: none;
  }

  /* 遮罩层 */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn,
  .sidebar-overlay {
    display: none !important;
  }
}

/* ---- 11. 状态标签图标增强 ---- */
.status-pill::before {
  margin-right: 5px;
  font-size: 10px;
}

.status-pill.success::before {
  content: '✓';
}

.status-pill.running::before,
.status-pill.processing::before {
  content: '◉';
}

.status-pill.pending::before {
  content: '○';
}

.status-pill.error::before,
.status-pill.danger::before {
  content: '✕';
}

/* ---- 12. 上传进度显示 ---- */
.upload-progress-wrap {
  position: relative;
  margin-top: 8px;
}

.upload-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f8fff, #42ddc2);
  transition: width 0.2s ease;
}

.upload-progress-text {
  font-size: 11px;
  color: rgba(180, 200, 220, 0.7);
  margin-top: 4px;
}

/* ---- 13. 拖拽上传增强 ---- */
.prompt-wrap.drag-over {
  border-color: rgba(100, 180, 255, 0.7) !important;
  background: rgba(60, 120, 220, 0.08) !important;
}

.prompt-wrap.drag-over::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(100, 180, 255, 0.1), transparent 70%);
  pointer-events: none;
  animation: drag-pulse 1s ease-in-out infinite;
}

@keyframes drag-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---- 14. 对比度优化 ---- */
.muted,
.hint,
.field-hint {
  color: rgba(180, 200, 220, 0.75);
}

/* ---- 15. 深色模式管理后台支持 ---- */
@media (prefers-color-scheme: dark) {
  .admin-shell {
    --bg: #0a0e14;
    --bg-soft: #0f1520;
    --panel: rgba(14, 20, 30, 0.95);
    --panel-soft: rgba(18, 26, 40, 0.9);
    --text: #eef3fa;
    --text-secondary: #a8bcd4;
    --text-muted: #7b90af;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.15);
  }
}

/* ---- 16. 弹窗动画增强 ---- */
.modal-mask,
dialog::backdrop {
  animation: backdrop-fade 0.2s ease;
}

@keyframes backdrop-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

dialog[open] {
  animation: dialog-appear 0.25s ease-out;
}

@keyframes dialog-appear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---- 17. 文字溢出提示 ---- */
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 18. 加载状态覆盖层 ---- */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: inherit;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(100, 160, 255, 0.2);
  border-top-color: rgba(100, 160, 255, 0.8);
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

/* ---- 19. 工具提示 ---- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(20, 28, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(230, 242, 255, 0.95);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ---- 20. 快捷键提示样式 ---- */
.kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: rgba(200, 220, 240, 0.8);
}

/* ---- 智能指令面板 - 黑色主题 ---- */
.ai-command-panel {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: linear-gradient(165deg, rgba(18, 22, 28, 0.96) 0%, rgba(12, 15, 20, 0.97) 58%, rgba(8, 10, 14, 0.98) 100%) !important;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset !important;
}

.ai-cmd-header {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.ai-cmd-icon {
  color: rgba(255, 255, 255, 0.7) !important;
}

.ai-cmd-history-btn {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

.ai-cmd-history-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3) !important;
}

.ai-cmd-history-btn.active {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 1) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1) !important;
}

.ai-cmd-close {
  color: rgba(255, 255, 255, 0.45) !important;
}

.ai-cmd-close:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.ai-cmd-textarea {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.ai-cmd-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}

.ai-cmd-textarea:focus {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important;
}

.ai-cmd-options-row {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: linear-gradient(180deg, rgba(20, 24, 30, 0.60) 0%, rgba(14, 17, 22, 0.56) 100%) !important;
}

.ai-cmd-option-text {
  color: rgba(255, 255, 255, 0.65) !important;
}

.ai-cmd-duration-wrap::after {
  border-top-color: rgba(255, 255, 255, 0.6) !important;
}

.ai-cmd-duration-select {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(30, 34, 42, 0.9) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.ai-cmd-duration-select option {
  background: #1a1e26 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.ai-cmd-duration-select:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.ai-cmd-duration-select:focus {
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.ai-cmd-img-label {
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.ai-cmd-img-label:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

.ai-cmd-img-name {
  color: rgba(255, 255, 255, 0.75) !important;
}

.ai-cmd-submit {
  background: linear-gradient(135deg, #2a2e36 0%, #1a1e24 100%) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.ai-cmd-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a3e46 0%, #2a2e34 100%) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

.ai-cmd-submit:active:not(:disabled) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.ai-cmd-results {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(12, 14, 18, 0.5) !important;
}

.ai-cmd-results-title {
  color: rgba(255, 255, 255, 0.7) !important;
}

.ai-cmd-loading span {
  background: rgba(255, 255, 255, 0.5) !important;
}

/* ---- 隐藏高级参数功能 ---- */
.advanced-inline,
.advanced-panel,
#advancedToggle,
#advancedPanel,
#advImageUrlRow,
#advReqJsonRow,
#aigcMetaGroup,
#seedTrigger,
#seedMenu,
#negativeTrigger,
#negativeMenu,
#qualityTrigger,
#qualityMenu {
  display: none !important;
}

/* ============================================
   网络状态和加载增强 - 2026-04-06
   ============================================ */

/* ---- 离线通知 ---- */
.offline-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.offline-notice.visible {
  transform: translateY(0);
}

.offline-icon {
  font-size: 24px;
  animation: pulse 2s infinite;
}

.offline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.offline-text strong {
  font-size: 14px;
}

.offline-text span {
  font-size: 12px;
  opacity: 0.9;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---- 按钮 Loading 状态 ---- */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ---- 全局 Loading 遮罩 ---- */
.global-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.global-loader-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.global-loader {
  background: rgba(30, 35, 45, 0.95);
  border-radius: 16px;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.global-loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #64b4ff;
  border-radius: 50%;
  animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

.global-loader-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

/* ---- 骨架屏增强 ---- */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.05) 25%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: center;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-text:last-child {
  margin-bottom: 0;
}

.skeleton-text.short {
  width: 60%;
}

/* ---- 空状态增强 ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 8px 0;
}

.empty-state-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 20px 0;
}

.empty-state-action {
  background: linear-gradient(135deg, #64b4ff 0%, #4a9eff 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.empty-state-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 180, 255, 0.3);
}

/* ---- Toast 样式增强 ---- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(30, 35, 45, 0.98);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  max-width: 360px;
  animation: toast-in 0.25s ease;
  position: relative;
  overflow: hidden;
}

.toast-item.hiding {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.toast-item.success .toast-icon { color: #4ade80; }
.toast-item.error .toast-icon { color: #f87171; }
.toast-item.warning .toast-icon { color: #fbbf24; }
.toast-item.info .toast-icon { color: #60a5fa; }

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  margin-bottom: 4px;
}

.toast-message {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  transition: color 0.2s;
}

.toast-close:hover {
  color: rgba(255, 255, 255, 0.8);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  animation: toast-progress linear forwards;
}

@keyframes toast-progress {
  from { width: 100%; }
  to { width: 0; }
}

/* ---- 移动端适配 ---- */
@media (max-width: 768px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
  }

  .toast-item {
    max-width: none;
  }

  .offline-notice {
    padding: 10px 16px;
  }

  .global-loader {
    padding: 24px 32px;
  }
}
