:root {
  --bg-base: #05070a;
  --bg-primary: #0b1016;
  --bg-secondary: #081019;
  --bg-tertiary: #111923;
  --bg-surface: #101923;
  --bg-elevated: #152130;
  --bg-deep: #030508;
  --bg-sunken: #070b10;
  --bg-hover: rgba(91, 232, 255, 0.08);
  --border-primary: rgba(255, 255, 255, 0.09);
  --border-secondary: rgba(91, 232, 255, 0.32);
  --border-subtle: rgba(255, 255, 255, 0.055);
  --text-primary: #f7fbff;
  --text-secondary: #d8e2ea;
  --text-tertiary: #91a1af;
  --text-muted: #60707e;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(132, 160, 174, 0.35);
  --scrollbar-thumb-hover: rgba(91, 232, 255, 0.62);
  --glass-bg: rgba(10, 16, 24, 0.72);
  --glass-border: rgba(255, 255, 255, 0.1);
  --nav-active-bg: rgba(91, 232, 255, 0.12);
  --nav-hover-bg: rgba(255, 255, 255, 0.06);
  --btn-primary-bg: #5be8ff;
  --btn-primary-text: #031015;
  --btn-primary-hover: #8cf2ff;
  --btn-primary-shadow: rgba(91, 232, 255, 0.28);
  --btn-selected-bg: rgba(91, 232, 255, 0.16);
  --btn-selected-border: rgba(91, 232, 255, 0.44);
  --overlay-heavy: rgba(3, 5, 8, 0.82);
  --overlay-medium: rgba(3, 5, 8, 0.66);
  --overlay-light: rgba(3, 5, 8, 0.32);
  --overlay-full: rgba(3, 5, 8, 0.94);
  --overlay-border: rgba(255, 255, 255, 0.12);
  --selection-bg: rgba(91, 232, 255, 0.22);
  --accent: #5be8ff;
  --accent-hover: #35d5ef;
  --accent-muted: #71a8b8;
  --accent-bg: rgba(91, 232, 255, 0.1);
  --accent-bg-hover: rgba(91, 232, 255, 0.18);
  --accent-border: rgba(91, 232, 255, 0.38);
  --accent-text: #7ceeff;
  --accent-text-hover: #c1f8ff;
  --accent-on: #031015;
  --accent-shadow: rgba(91, 232, 255, 0.3);
  --accent-hot: #ff315c;
  --accent-hot-bg: rgba(255, 49, 92, 0.14);
  --accent-hot-border: rgba(255, 49, 92, 0.36);
  --toggle-active: #5be8ff;
  --toggle-inactive: rgba(255, 255, 255, 0.18);
  --toggle-knob: #ffffff;
  --success: #34d399;
  --success-text: #6ee7b7;
  --success-bg: rgba(52, 211, 153, 0.12);
  --success-border: rgba(52, 211, 153, 0.32);
  --error: #fb7185;
  --error-text: #fda4af;
  --error-bg: rgba(251, 113, 133, 0.11);
  --error-border: rgba(251, 113, 133, 0.3);
  --error-hover-bg: rgba(251, 113, 133, 0.14);
  --error-hover-bg-strong: rgba(251, 113, 133, 0.24);
  --warning: #fbbf24;
  --warning-text: #fde68a;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --warning-border: rgba(251, 191, 36, 0.3);
  --info: #60a5fa;
  --info-text: #93c5fd;
  --info-bg: rgba(96, 165, 250, 0.12);
  --info-border: rgba(96, 165, 250, 0.3);
  --tag-purple: #c084fc;
  --tag-purple-bg: rgba(192, 132, 252, 0.1);
  --tag-purple-border: rgba(192, 132, 252, 0.28);
  --tag-purple-hover: rgba(192, 132, 252, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-base);
  background-image:
    linear-gradient(135deg, rgba(91, 232, 255, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(255, 49, 92, 0.08), transparent 24%),
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.08), transparent 42%);
  background-attachment: scroll;
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#root {
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.font-mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid var(--glass-border);
}

button, [role="button"] {
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled,
[role="button"][aria-disabled="true"] {
  cursor: not-allowed;
}

input, textarea, select {
  border-radius: 12px;
}

button, a, input, textarea, select {
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
