/**
 * 星途 AI 文档站 - 统一设计系统
 * Design Language: 浅色樱花主题
 */

:root {
  /* 颜色系统 - 浅色主题 */
  --bg-primary: #fefefe;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fa;
  --bg-elevated: rgba(255, 255, 255, 0.95);
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.15);

  /* 樱花粉色点缀 */
  --accent-pink: #ff6b9d;
  --accent-pink-hover: #ff5a8f;
  --accent-pink-light: #ffe5ef;

  /* 交互色 */
  --hover-bg: rgba(255, 107, 157, 0.08);
  --active-bg: rgba(255, 107, 157, 0.12);

  /* 阴影 - 柔和阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);

  /* 间距系统 */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  /* 字体 */
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff5f8 0%, #ffffff 50%, #fef7fa 100%);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* 樱花飘落容器 */
.sakura-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.sakura {
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(180deg, #ffb3d9 0%, #ffd4e8 50%, #ffffff 100%);
  border-radius: 50% 0 50% 0;
  opacity: 0.8;
  animation: sakuraFall linear infinite;
}

@keyframes sakuraFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(25vh) translateX(-20px) rotate(90deg);
  }
  50% {
    transform: translateY(50vh) translateX(20px) rotate(180deg);
  }
  75% {
    transform: translateY(75vh) translateX(-20px) rotate(270deg);
  }
  100% {
    transform: translateY(calc(100vh + 200px)) translateX(20px) rotate(360deg);
  }
}

/* 鼠标滑动粒子效果 */
.mouse-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

/* 渐变背景光晕 */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0;
  animation: breathe 15s ease-in-out infinite;
}

.glow-orb-1 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 182, 217, 0.3) 0%, transparent 70%);
  top: -300px;
  left: -200px;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 133, 193, 0.25) 0%, transparent 70%);
  bottom: -200px;
  right: -150px;
  animation-delay: 5s;
}

.glow-orb-3 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 230, 240, 0.35) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 10s;
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.6; transform: translate(30px, 30px) scale(1.05); }
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* 卡片组件 - 浅色毛玻璃风格 */
.card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 157, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  opacity: 1;
}

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: scale(1.02);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 1);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--accent-pink);
  color: #ffffff;
  border-color: var(--accent-pink);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-pink-hover);
  border-color: var(--accent-pink-hover);
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

/* 标签组件 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-pink-light);
  color: var(--accent-pink);
  border: 1px solid rgba(255, 107, 157, 0.2);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}

/* 代码块 */
.code-block {
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #333333;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .glow-orb {
    filter: blur(80px);
  }
}
