/* ============================================
   北京安而美科技官网 - 全局样式
   设计系统：极简主义 + 深蓝科技感
   ============================================ */

/* ============================================
   CSS 变量 - 设计系统
   ============================================ */

:root {
  /* 颜色系统 */
  --primary: #0F3A7D;
  --accent: #00D9FF;
  --background: #0A0E27;
  --foreground: #E8F4FF;
  --card: #1A1F3A;
  --card-foreground: #E8F4FF;
  --border: #2A3F5F;
  --muted: #2A3F5F;
  --muted-foreground: #A0B0C8;
  --secondary: #1E5BA8;
  --secondary-foreground: #E8F4FF;
  
  /* 间距 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* 圆角 */
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* 过渡 */
  --transition-fast: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色模式（默认） */
html.dark {
  --background: #0A0E27;
  --foreground: #E8F4FF;
  --card: #1A1F3A;
  --card-foreground: #E8F4FF;
  --border: #2A3F5F;
  --muted: #2A3F5F;
  --muted-foreground: #A0B0C8;
}

/* 浅色模式 */
html.light {
  --primary: #0F3A7D;
  --accent: #00D9FF;
  --background: #FFFFFF;
  --foreground: #0A0E27;
  --card: #F8FAFC;
  --card-foreground: #0A0E27;
  --border: #E2E8F0;
  --muted: #E2E8F0;
  --muted-foreground: #475569;
  --secondary: #1E5BA8;
  --secondary-foreground: #FFFFFF;
}

/* ============================================
   全局样式
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ============================================
   排版
   ============================================ */

h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 1rem;
}

small {
  font-size: 0.875rem;
  font-weight: 400;
}

/* ============================================
   容器和布局
   ============================================ */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1280px;
  }
}

.section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
}

/* ============================================
   按钮样式
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--foreground);
  border: 2px solid var(--primary);
}

.btn-primary:hover {
  background-color: #1E5BA8;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-secondary {
  background-color: var(--accent);
  color: var(--background);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background-color: #00B8E6;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: scale(0.95);
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background-color: rgba(0, 217, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline:active {
  transform: scale(0.95);
}

/* ============================================
   卡片样式
   ============================================ */

.card {
  background: linear-gradient(135deg, var(--card) 0%, #1E2847 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.15);
  transform: translateY(-4px);
}

/* ============================================
   渐变文本
   ============================================ */

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #3AA5FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   网格布局
   ============================================ */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Flexbox 工具类
   ============================================ */

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.gap-4 {
  gap: 2rem;
}

/* ============================================
   动画定义
   ============================================ */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes floatUp {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   动画类
   ============================================ */

.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-float {
  animation: floatUp 3s ease-in-out infinite;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

/* 动画延迟 */
.animate-delay-100 {
  animation-delay: 100ms;
}

.animate-delay-200 {
  animation-delay: 200ms;
}

.animate-delay-300 {
  animation-delay: 300ms;
}

.animate-delay-400 {
  animation-delay: 400ms;
}

.animate-delay-500 {
  animation-delay: 500ms;
}

/* ============================================
   表单样式
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background-color: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-normal);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-foreground);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   工具类
   ============================================ */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--muted-foreground);
}

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

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

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.px-2 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-3 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.px-4 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-2 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-3 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-4 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

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

.border {
  border: 1px solid var(--border);
}

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

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

.opacity-50 {
  opacity: 0.5;
}

.opacity-60 {
  opacity: 0.6;
}

.opacity-70 {
  opacity: 0.7;
}

.opacity-80 {
  opacity: 0.8;
}

.opacity-90 {
  opacity: 0.9;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .hide-mobile {
    display: none;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none;
  }
}

/* ============================================
   链接样式
   ============================================ */

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: #3AA5FF;
}

/* ============================================
   列表样式
   ============================================ */

ul,
ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ============================================
   代码块
   ============================================ */

code {
  background-color: var(--card);
  color: var(--accent);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

pre {
  background-color: var(--card);
  color: var(--foreground);
  padding: 1rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* ============================================
   分隔线
   ============================================ */

hr {
  border: none;
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

/* ============================================
   滚动条样式
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
