/* Biz-SIP Hybrid Theme - 混合配色方案 */

/* ========== 基础变量 ========== */
:root {
  /* 深色主题 - 首页/营销页 */
  --bg-dark-primary: #0a0a0f;
  --bg-dark-secondary: #12121a;
  --bg-dark-card: rgba(26, 26, 37, 0.7);
  
  /* 浅色主题 - 文档页 */
  --bg-light-primary: #ffffff;
  --bg-light-secondary: #f8fafc;
  --bg-light-tertiary: #f1f5f9;
  --bg-light-card: #ffffff;
  
  /* 主色调 - 统一使用 */
  --primary-400: #0ea5e9;
  --primary-500: #0284c7;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-gradient: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
  
  /* 深色模式文字 */
  --text-dark-primary: #f8fafc;
  --text-dark-secondary: #94a3b8;
  --text-dark-muted: #64748b;
  
  /* 浅色模式文字 */
  --text-light-primary: #0f172a;
  --text-light-secondary: #475569;
  --text-light-muted: #64748b;
  
  /* 边框 - 统一 */
  --border-dark: rgba(56, 189, 248, 0.15);
  --border-light: rgba(148, 163, 184, 0.2);
  --border-accent: rgba(14, 165, 233, 0.3);
  
  /* 阴影 */
  --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* ========== 深色首页样式 ========== */
body.page-dark {
  background: var(--bg-dark-primary);
  color: var(--text-dark-primary);
}

.page-dark .hero-section {
  min-height: 100vh;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
    var(--bg-dark-primary);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
}

.page-dark .hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.page-dark .hero-title {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f8fafc 0%, #38bdf8 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.page-dark .hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-dark-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* 深色模式卡片 */
.page-dark .card-glass {
  background: rgba(26, 26, 37, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all 0.4s ease;
}

.page-dark .card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
}

/* ========== 浅色文档页样式 ========== */
body.page-light {
  background: var(--bg-light-primary);
  color: var(--text-light-primary);
}

.page-light h1, .page-light h2, .page-light h3, .page-light h4 {
  color: var(--text-light-primary);
  font-weight: 600;
}

.page-light p, .page-light li {
  color: var(--text-light-secondary);
}

/* 文档页侧边栏 - 浅色 */
.page-light .docs-sidebar {
  background: var(--bg-light-secondary) !important;
  border-right: 1px solid var(--border-light);
}

.page-light .docs-sidebar .docs-sidenav a {
  color: var(--text-light-secondary) !important;
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-light .docs-sidebar .docs-sidenav a:hover {
  background: rgba(14, 165, 233, 0.08) !important;
  color: var(--primary-500) !important;
}

.page-light .docs-sidebar .docs-sidenav li.active a {
  background: rgba(14, 165, 233, 0.12) !important;
  color: var(--primary-500) !important;
  font-weight: 500;
}

/* 文档内容区 */
.page-light .docs-content {
  background: var(--bg-light-primary);
}

.page-light .docs-article {
  background: transparent;
}

/* 代码块样式 - 保持深色 */
.page-light pre, .page-light code {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius-md);
}

.page-light code {
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-500);
  padding: 0.125rem 0.375rem;
}

.page-light pre code {
  background: none;
  color: #e2e8f0;
}

/* 图片容器 */
.page-light img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-light);
}

/* ========== 统一组件样式 ========== */

/* 按钮 - 统一 */
.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  border: none;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-400);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  border: 1px solid rgba(14, 165, 233, 0.3);
  text-decoration: none;
  display: inline-block;
  margin-left: 1rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.6);
  color: var(--primary-500);
  text-decoration: none;
}

/* 导航栏 - 深色（所有页面统一） */
.navbar {
  background: rgba(10, 10, 15, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  padding: 1rem 2rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  color: var(--text-dark-secondary) !important;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--text-dark-primary) !important;
}

/* 文档字体 */
.docs-article {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.8;
}

.docs-article h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
}

.docs-article h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-light-primary);
}

.docs-article h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-light-primary);
}

.docs-article ul, .docs-article ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.docs-article li {
  margin: 0.5rem 0;
  color: var(--text-light-secondary);
}

/* 链接样式 */
a {
  color: var(--primary-500);
  text-decoration: none;
}

a:hover {
  color: var(--primary-400);
  text-decoration: underline;
}

/* 特色块 */
.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: var(--primary-500);
  font-size: 1.5rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .page-dark .hero-title {
    font-size: 2.5rem;
  }
  
  .docs-sidebar {
    position: static;
    width: 100%;
    margin-bottom: 2rem;
  }
}

/* 打印样式 */
@media print {
  .navbar, .docs-sidebar, .docs-toc {
    display: none;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}