/**
 * AI分享会网站 - CSS变量系统
 * 版本: 1.0
 */

:root {
  /* ========================================
     主色调 - 科技蓝
     ======================================== */
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --primary-200: #BFDBFE;
  --primary-300: #93C5FD;
  --primary-400: #60A5FA;
  --primary-500: #3B82F6;
  --primary-600: #2563EB;
  --primary-700: #1D4ED8;
  --primary-800: #1E40AF;
  --primary-900: #1E3A8A;

  /* ========================================
     辅助色
     ======================================== */
  --accent-cyan: #06B6D4;
  --accent-cyan-light: #67E8F9;
  --accent-cyan-dark: #0891B2;

  --accent-purple: #8B5CF6;
  --accent-purple-light: #A78BFA;
  --accent-purple-dark: #7C3AED;

  --accent-emerald: #10B981;
  --accent-emerald-light: #34D399;
  --accent-emerald-dark: #059669;

  --accent-amber: #F59E0B;
  --accent-amber-light: #FCD34D;
  --accent-amber-dark: #D97706;

  --accent-rose: #F43F5E;
  --accent-rose-light: #FB7185;
  --accent-rose-dark: #E11D48;

  /* ========================================
     中性色
     ======================================== */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* ========================================
     背景色
     ======================================== */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --bg-card: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(15, 23, 42, 0.7);

  /* ========================================
     文字色
     ======================================== */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --text-muted: #64748B;

  /* ========================================
     字体大小
     ======================================== */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* ========================================
     间距系统
     ======================================== */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ========================================
     圆角
     ======================================== */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* ========================================
     阴影
     ======================================== */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.5);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.5);

  /* ========================================
     过渡时间
     ======================================== */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;

  /* ========================================
     缓动函数
     ======================================== */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* ========================================
     Z-index层级
     ======================================== */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;

  /* ========================================
     布局
     ======================================== */
  --header-height: 64px;
  --sidebar-width: 280px;
  --max-content-width: 1200px;
  --content-padding: var(--space-6);

  /* ========================================
     边框
     ======================================== */
  --border-light: 1px solid rgba(255, 255, 255, 0.1);
  --border-medium: 1px solid rgba(255, 255, 255, 0.2);
  --border-focus: 2px solid var(--primary-500);

  /* ========================================
     别名变量（兼容性）
     ======================================== */
  --primary: var(--primary-500);
  --primary-color: var(--primary-500);
  --secondary: var(--accent-purple);
  --secondary-color: var(--accent-purple);
  --border-color: rgba(255, 255, 255, 0.1);
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

/* ========================================
   暗色主题（默认）
   ======================================== */
[data-theme="dark"] {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
}

/* ========================================
   响应式断点变量
   ======================================== */
@media (max-width: 767px) {
  :root {
    --content-padding: var(--space-4);
    --text-5xl: 2.25rem;
    --text-6xl: 3rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --content-padding: var(--space-5);
  }
}

/* ========================================
   动画关键帧
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary-500); }
  50% { box-shadow: 0 0 20px var(--primary-500), 0 0 40px var(--primary-500); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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