/* ==========================================================================
   ez-to-ai 官网设计系统 - 基础样式与 Stitch / Liquid Glass 视觉体系
   Aligned with Google Stitch Aesthetic & OKF Design Guidelines
   ========================================================================== */

:root {
  /* Google Stitch 风格高阶色彩体系 */
  --stitch-bg-dark: #0a0b10;
  --stitch-bg-card: rgba(18, 20, 29, 0.72);
  --stitch-bg-card-hover: rgba(26, 29, 42, 0.85);
  
  --brand-primary: #6366f1;
  --brand-primary-light: #818cf8;
  --brand-cyan: #38bdf8;
  --brand-mint: #34d399;
  --brand-peach: #fb7185;
  --brand-lilac: #c084fc;
  --brand-amber: #fbbf24;

  /* Liquid Glass 材质透明度与滤镜 */
  --glass-surface: rgba(255, 255, 255, 0.04);
  --glass-surface-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-glow: rgba(99, 102, 241, 0.45);
  --glass-blur: blur(28px);
  --glass-blur-heavy: blur(44px);

  /* 阴影材质 */
  --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  --glass-shadow-glow: 0 0 45px rgba(99, 102, 241, 0.28);
  --glass-inner-light: inset 0 1px 1px 0 rgba(255, 255, 255, 0.25);

  /* 文本色彩 */
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* 字体系统 (系统高质感字体优先) */
  --font-family-base: "Google Sans Text", "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-family-code: "JetBrains Mono", "Cascadia Code", "Fira Code", Consolas, monospace;

  /* 布局与层级 */
  --header-height: 76px;
  --z-bg: 0;
  --z-scene: 10;
  --z-scrolly-nav: 50;
  --z-header: 100;
  --z-modal: 200;
  --z-toast: 300;

  /* 动效曲线 (Google Stitch 弹性曲线) */
  --transition-stitch: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.22s;
  --duration-normal: 0.45s;
  --duration-slow: 0.8s;
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* 固定视口核心：禁止页面整屏滚动，由 Scrolly Engine 驱动内部内容变动 */
  background-color: var(--stitch-bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.6;
  user-select: none;
  touch-action: none;
}

/* 允许交互式输入及代码选中 */
input, textarea, code, pre, .selectable-text {
  user-select: text;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--duration-fast) var(--transition-stitch);
}

button {
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

/* 3D 粒子网格画布 */
#aurora-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-bg);
  pointer-events: none;
}

/* 微妙几何空间网格叠加层 */
.ambient-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(99, 102, 241, 0.16) 0%, transparent 65%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
}

/* 主视口舞台 */
#app-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: var(--z-scene);
}

/* 文本渐变工具 */
.text-gradient-stitch {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 45%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-macaron {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 35%, #c084fc 70%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-mint {
  background: linear-gradient(135deg, #34d399 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-secondary);
}

.badge-pill.active {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.badge-pill.mint {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

/* Glass Card 表面 */
.glass-card {
  position: relative;
  background: var(--stitch-bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: transform var(--duration-normal) var(--transition-stitch),
              border-color var(--duration-normal) var(--transition-stitch),
              background var(--duration-normal) var(--transition-stitch),
              box-shadow var(--duration-normal) var(--transition-stitch);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

.glass-card:hover {
  background: var(--stitch-bg-card-hover);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: var(--glass-shadow), 0 0 35px rgba(99, 102, 241, 0.2);
}

/* Stitch 按钮体系 */
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--transition-stitch);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-glass-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 22px rgba(99, 102, 241, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.btn-glass-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, #818cf8 0%, #a855f7 50%, #e879f9 100%);
}

.btn-glass-primary:active {
  transform: translateY(0) scale(0.99);
}

.btn-glass-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}

.btn-glass-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}
