/* 全局光标修复 */
body, div, span, p, label, h1, h2, h3, h4, h5, h6, a, button, input, select, textarea {
  cursor: default;
}

button, a, [onclick], .icon-option, .island-check, .island-btn, .stat-chip, .glass-switch {
  cursor: pointer;
}

.glass-input, .glass-select, input[type="text"], input[type="password"], input[type="number"], input[type="email"], textarea {
  cursor: text;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-base: #0d0a1f;
  --bg-mid: #161129;
  --bg-light: #1f1a38;
  --bg-glow-1: rgba(120, 80, 255, 0.25);
  --bg-glow-2: rgba(255, 100, 200, 0.15);
  --bg-glow-3: rgba(0, 200, 255, 0.12);

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(255, 255, 255, 0.10);
  --glass-bg-heavy: rgba(255, 255, 255, 0.10);
  --glass-bg-light: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --status-ready: #22c55e;
  --status-wave: #f59e0b;
  --status-wait: #3b82f6;
  --status-lost: #ef4444;

  --accent-blue: #3b82f6;
  --accent-green: #22c55e;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a78bfa;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --ease-glass: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 800px 600px at 10% -10%, rgba(120, 80, 255, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 900px 700px at 110% 110%, rgba(255, 100, 200, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 600px 500px at 50% 50%, rgba(0, 200, 255, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-mid) 50%, var(--bg-light) 100%);
  background-attachment: fixed;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 500px; height: 500px;
  top: -100px; left: -100px;
  background: var(--bg-glow-1);
  animation: glowFloat1 20s ease-in-out infinite;
}

body::after {
  width: 400px; height: 400px;
  bottom: -80px; right: -80px;
  background: var(--bg-glow-2);
  animation: glowFloat2 25s ease-in-out infinite;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

.glow-orb.orb-3 {
  width: 350px; height: 350px;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-glow-3);
  animation: glowFloat3 18s ease-in-out infinite;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.toast {
  position: fixed;
  top: 24px; left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: rgba(30, 25, 55, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--glass-shadow-lg);
  z-index: 10000;
  transition: transform 0.4s var(--ease-glass), opacity 0.4s var(--ease-glass);
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 刷新指示器 */
.refresh-indicator {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(30, 25, 55, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s var(--ease-glass);
  pointer-events: none;
  z-index: 9999;
}

.refresh-indicator.refreshing {
  opacity: 1;
  transform: translateY(0);
}

.refresh-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 刷新时抑制所有动画 */
body.is-refreshing .item-card,
body.is-refreshing .glass-progress-fill,
body.is-refreshing .glass-btn,
body.is-refreshing .stat-chip,
body.is-refreshing .island-btn {
  animation: none !important;
  transition: none !important;
}

