/* ===== Theme Tokens ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

[x-cloak] { display: none !important; }

:root {
  /* Backgrounds */
  --bg-base: #0b0d14;
  --bg-surface: #131626;
  --bg-elevated: #1a1e32;
  --bg-hover: #22263d;
  --bg-input: #0f121f;

  /* Borders */
  --border-default: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 255, 255, 0.18);

  /* Text */
  --text-primary: #f0f1f7;
  --text-secondary: #9aa3b8;
  --text-muted: #5e6779;
  --text-disabled: #3d4454;

  /* Accents */
  --accent-blue: #5b8def;
  --accent-cyan: #4fd1ff;
  --accent-violet: #9b7dff;
  --accent-amber: #f5b75d;
  --accent-green: #7ee787;
  --accent-red: #ff7b8a;
  --accent-teal: #3dd6d0;

  /* Platform */
  --plat-doubao: #5b8def;
  --plat-deepseek: #4fd1ff;
  --plat-yuanbao: #f5b75d;
  --plat-qianwen: #9b7dff;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.35);
  --shadow-glow-blue: 0 0 20px rgba(91, 141, 239, 0.2);
  --shadow-glow-cyan: 0 0 20px rgba(79, 209, 255, 0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 220px;
  --sidebar-collapsed: 72px;
  --header-height: 72px;
  --panel-gap: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 13px;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Background ambient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(91, 141, 239, 0.06), transparent 60%),
    radial-gradient(ellipse 40% 40% at 100% 100%, rgba(155, 125, 255, 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

::selection {
  background: rgba(79, 209, 255, 0.25);
  color: #fff;
}

/* Utility classes */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.tabular-nums { font-variant-numeric: tabular-nums; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in {
  animation: slideIn 0.3s ease forwards;
}

.animate-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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