/**
 * ============================================================
 * 🎨 生动像素官网主题系统 (V1.0)
 * 设计目标：科技风格，强调专业感、现代感与层次感
 * 适配：PC端 / 移动端
 * Author: @vvpixel
 * ============================================================
 */

/* ============================================================
   🌗 主题变体定义（Dark Mode 支持）
   ============================================================ */
@custom-variant dark (&:is(.dark *));

/* ============================================================
   🎨 基础主题定义（深色模式 - 默认）
   ============================================================ */
:root {
  /* =============== 品牌色系统 =============== */
  --brand-primary: #3BA6B3; /* 优蓝青 - 主色 */
  --brand-primary-hover: #2E8A96; /* 悬停时的主色 */
  --brand-primary-active: #256E78; /* 点击态 */
  --brand-secondary: #F5B75C; /* 品质金 - 辅助色 */
  --brand-success: #4CAF50; /* 成功绿 */
  --brand-error: #F44336; /* 错误红 */
  --brand-warning: #F5B75C; /* 警告金 */
  
  /* =============== 中性色系统 =============== */
  --text-primary: #1F1F1F; /* 主文字 - 深灰黑 */
  --text-secondary: #666666; /* 次文字 - 中灰 */
  --text-tertiary: #999999; /* 辅助文字 - 浅灰 */
  --text-disabled: #CCCCCC; /* 禁用文字 */
  
  --bg-base: #F7F9FA; /* 页面背景 - 浅灰白 */
  --bg-card: #FFFFFF; /* 卡片背景 - 白色 */
  --bg-card-hover: #F5F7FA; /* 卡片悬停背景 */
  --bg-overlay: rgba(247, 249, 250, 0.95); /* 遮罩层背景 */
  
  --border-color: #E0E0E0; /* 边框灰 */
  --border-color-hover: #D0D0D0; /* 边框悬停 */
  --border-color-active: rgba(59, 166, 179, 0.3); /* 边框激活 */
  
  /* =============== 字体系统 =============== */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  
  --font-size-base: 14px; /* 基础字体大小 */
  --text-xs: 11px; /* 超小号 */
  --text-sm: 12px; /* 小号 */
  --text-base: 14px; /* 基础 */
  --text-md: 16px; /* 中号 */
  --text-lg: 18px; /* 大号 */
  --text-xl: 20px; /* 超大号 */
  --text-2xl: 24px; /* 2倍大 */
  --text-3xl: 30px; /* 3倍大 */
  --text-4xl: 36px; /* 4倍大 */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.8;
  
  /* =============== 圆角系统 =============== */
  --radius-none: 0;
  --radius-sm: 4px; /* 小圆角 */
  --radius-base: 6px; /* 常规组件圆角 */
  --radius-md: 8px; /* 中等圆角 */
  --radius-lg: 10px; /* 大圆角 */
  --radius-xl: 12px; /* 超大圆角 */
  --radius-2xl: 16px; /* 2倍大圆角 */
  --radius-3xl: 18px; /* 3倍大圆角 */
  --radius-4xl: 20px; /* 4倍大圆角 */
  --radius-full: 999px; /* 完全圆形 */
  
  /* =============== 阴影系统 =============== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-base: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 16px 32px rgba(0, 0, 0, 0.18);
  --shadow-3xl: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-brand: 0 4px 12px rgba(59, 166, 179, 0.2);
  --shadow-brand-hover: 0 8px 24px rgba(59, 166, 179, 0.3);
  
  /* =============== 间距系统 =============== */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-base: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 30px;
  --spacing-3xl: 40px;
  --spacing-4xl: 48px;
  --spacing-5xl: 60px;
  --spacing-6xl: 80px;
  
  --spacing-page: 16px; /* 页面左右边距 */
  --spacing-section: 80px; /* 区块间距 */
  --spacing-module: 12px; /* 模块间距 */
  
  /* =============== 渐变系统 =============== */
  --gradient-primary: linear-gradient(90deg, #3BA6B3 0%, #2E8A96 100%);
  --gradient-brand: linear-gradient(90deg, #3BA6B3, #4DC5D3);
  --gradient-bg: linear-gradient(180deg, #F7F9FA 0%, #F0F2F5 40%, #E8EBED 70%, #E0E3E6 100%);
  --gradient-card: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-base) 70%);
  
  /* =============== 过渡动画 =============== */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-slower: 0.4s ease;
  
  /* =============== Z-index 层级 =============== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================================
   🌑 浅色模式定义（可选，当前项目主要使用深色模式）
   ============================================================ */
.light {
  --text-primary: #1F1F1F;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --bg-base: #F7F9FA;
  --bg-card: #FFFFFF;
  --border-color: #E0E0E0;
}

/* ============================================================
   🧱 全局基础层 (Base Layer)
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* 浅青色动效曲线渐变背景 - 背景圆形3 */
html::before {
  content: '';
  position: fixed;
  background: linear-gradient(180deg, #eaf9ff 0%, #d4f0f7 50%, #f8fdfc 100%);
  width: 2600px;
  height: 1300px;
  border-radius: 50%;
  bottom: -800px;
  left: -1000px;
  opacity: 0.5;
  z-index: -10;
  pointer-events: none;
}

/* 浅青色动效曲线渐变背景 - 背景圆形4 */
html::after {
  content: '';
  position: fixed;
  background: linear-gradient(180deg, #f0fefe 0%, #e0fbff 50%, #ffffff 100%);
  width: 1600px;
  height: 1600px;
  border-radius: 50%;
  top: -800px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
  z-index: -10;
  pointer-events: none;
}

/* 浅青色动效曲线渐变背景 - 背景圆形5 */
html {
  background-image: radial-gradient(circle at -300px 20%, rgba(224, 255, 255, 0.3) 0%, transparent 50%);
  background-attachment: fixed;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-base);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

/* 浅青色动效曲线渐变背景 - 背景圆形1 */
body::before {
  content: '';
  position: fixed;
  background: linear-gradient(180deg, #ffffff 0%, #e8fafa 50%, #f0fefd 100%);
  width: 2000px;
  height: 1000px;
  border-radius: 50%;
  bottom: -600px;
  left: -600px;
  opacity: 0.7;
  z-index: -10;
  pointer-events: none;
}

/* 浅青色动效曲线渐变背景 - 背景圆形2 */
body::after {
  content: '';
  position: fixed;
  background: linear-gradient(180deg, #ddf5ff 0%, #c6ecfa 50%, #e6faff 100%);
  width: 1200px;
  height: 1200px;
  border-radius: 50%;
  top: -600px;
  right: -600px;
  opacity: 0.6;
  z-index: -10;
  pointer-events: none;
}

/* ============================================================
   🅰️ 字体与排版系统 (Typography)
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
}

h5 {
  font-size: var(--text-md);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
}

p {
  font-size: var(--text-base);
  line-height: var(--line-height-relaxed);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--brand-primary-hover);
}

/* ============================================================
   🧩 自定义工具类 (Utilities)
   ============================================================ */

/* 文本颜色 */
.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-brand {
  color: var(--brand-primary);
}

.text-success {
  color: var(--brand-success);
}

.text-error {
  color: var(--brand-error);
}

.text-warning {
  color: var(--brand-warning);
}

/* 背景颜色 */
.bg-base {
  background-color: var(--bg-base);
}

.bg-card {
  background-color: var(--bg-card);
}

.bg-brand {
  background-color: var(--brand-primary);
}

/* 边框 */
.border {
  border: 1px solid var(--border-color);
}

.border-brand {
  border-color: var(--brand-primary);
}

/* 圆角 */
.rounded-sm {
  border-radius: var(--radius-sm);
}

.rounded {
  border-radius: var(--radius-base);
}

.rounded-md {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-2xl {
  border-radius: var(--radius-2xl);
}

.rounded-3xl {
  border-radius: var(--radius-3xl);
}

.rounded-full {
  border-radius: var(--radius-full);
}

/* 阴影 */
.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow {
  box-shadow: var(--shadow-base);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-card-hover:hover {
  box-shadow: var(--shadow-card-hover);
}

.shadow-brand {
  box-shadow: var(--shadow-brand);
}

/* 间距 */
.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-base { padding: var(--spacing-base); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.m-xs { margin: var(--spacing-xs); }
.m-sm { margin: var(--spacing-sm); }
.m-base { margin: var(--spacing-base); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }

/* 按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-medium);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  border-radius: var(--radius-base);
  padding: var(--spacing-base) var(--spacing-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  box-shadow: var(--shadow-brand);
}

.btn-primary:active {
  background-color: var(--brand-primary-active);
}

.btn-primary:disabled {
  background-color: rgba(14, 165, 233, 0.5);
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--brand-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-color-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--brand-primary);
  border: 1px solid var(--brand-primary);
}

.btn-outline:hover {
  background-color: rgba(14, 165, 233, 0.1);
  border-color: var(--brand-primary-hover);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background-color: var(--bg-card);
  border-color: var(--border-color-hover);
}

/* 卡片体系 */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-3xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-page);
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    --spacing-page: 10px;
    --spacing-section: 48px;
  }
  
  .page-container {
    padding: var(--spacing-md);
  }
  
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  h3 {
    font-size: var(--text-xl);
  }
}

