/* === 车机壁纸 - 基础样式与CSS变量 === */

/* -- Google Fonts -- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* === CSS 变量（亮色主题）=== */
:root {
  /* 主色调 */
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: rgba(99, 102, 241, 0.1);
  --primary-gradient: linear-gradient(135deg, #6366f1, #a855f7);

  /* 强调色 */
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --danger: #ef4444;
  --success: #22c55e;
  --info: #3b82f6;
  --warning: #f59e0b;

  /* 玻璃态 */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.75);
  --glass-bg-light: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-border-strong: rgba(0, 0, 0, 0.1);
  --glass-blur: 24px;
  --glass-blur-light: 12px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.06);

  /* 背景 */
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f7;

  /* 文字 */
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  /* 边框 */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

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

  /* 字体 */
  --font-display: 'Outfit', 'Noto Sans SC', -apple-system, sans-serif;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* 导航 */
  --nav-height: 64px;
  --bottom-nav-height: 64px;

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* 尺寸 */
  --container-max: 1400px;
  --container-padding: 24px;
}

/* === 暗色主题（后续通过类切换）=== */
[data-theme="dark"] {
  --glass-bg: rgba(30, 30, 50, 0.55);
  --glass-bg-strong: rgba(30, 30, 50, 0.75);
  --glass-bg-light: rgba(30, 30, 50, 0.35);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-strong: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: #1a1a2e;
  --bg-hover: #222240;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border: #334155;
  --border-light: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 装饰性背景 */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* === 排版 === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--primary-hover); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* === 工具类 === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === 滚动条 === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* === 选中 === */
::selection {
  background: rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
}

/* === 响应式 === */
@media (max-width: 900px) {
  :root {
    --container-padding: 16px;
    --space-xl: 32px;
    --space-2xl: 48px;
  }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
}
@media (max-width: 640px) {
  :root {
    --container-padding: 12px;
    --space-lg: 24px;
    --space-xl: 28px;
    --space-2xl: 40px;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}
