/* 简洁现代的CSS设计 */
:root {
  /* 颜色系统 */
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  
  /* 文字颜色 */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  /* 背景颜色 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  /* 边框和阴影 */
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  
  /* 间距和尺寸 */
  --radius: 0.75rem;
  --radius-full: 9999px;
  
  /* 过渡动画 */
  --transition: all 0.2s ease;
}

/* 暗色主题 */
[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --secondary: #a78bfa;
  --accent: #22d3ee;
  
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  
  --border: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #60a5fa;
    --primary-light: #93c5fd;
    --secondary: #a78bfa;
    --accent: #22d3ee;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --border: #334155;
  }
}

/* 语言切换 - SEO友好 */
.multilang-text {
  transition: opacity 0.2s ease;
}

.multilang-text.switching {
  opacity: 0.7;
}

/* 基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: var(--transition);
}

/* 布局容器 */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 切换按钮 */
.theme-toggle,
.language-toggle {
  position: fixed;
  top: 1.5rem;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 100;
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .language-toggle {
  background: rgba(15, 23, 42, 0.9);
}

.theme-toggle {
  right: 1.5rem;
}

.language-toggle {
  right: 6rem;
}

.theme-toggle:hover,
.language-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.theme-toggle-icon {
  font-size: 1.25rem;
  transition: var(--transition);
}

.theme-toggle:hover .theme-toggle-icon {
  transform: rotate(15deg);
}

.language-toggle-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* Hero 区域 */
.hero-section {
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 48rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 42rem;
  margin: 0 auto;
  font-weight: 400;
}

/* 主要内容 */
.main-content {
  flex: 1;
  padding: 3rem 1.5rem;
}

/* 卡片区域 */
.cards-section {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.card {
  flex: 1;
  max-width: 22rem;
}

.card-main-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
}

.card-content {
  padding: 2.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.3s ease;
  min-height: 13rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.8s ease;
}

.card-main-link:hover .card-content::before {
  left: 100%;
}

.card-main-link:hover .card-content {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.card-title {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.card-secondary-link-wrapper {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.card-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.card-secondary-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -6px rgba(59, 130, 246, 0.4);
}

.link-icon {
  font-size: 0.875rem;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .theme-toggle,
  .language-toggle {
    width: 2.5rem;
    height: 2.5rem;
    top: 1rem;
  }
  
  .theme-toggle {
    right: 1rem;
  }
  
  .language-toggle {
    right: 4.5rem;
  }
  
  .hero-section {
    padding: 4rem 1rem 3rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .main-content {
    padding: 2rem 1rem;
  }
  
  .cards-section {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .card-content {
    padding: 2rem;
  }
  
  .card-title {
    font-size: 1.375rem;
  }
}

@media (max-width: 480px) {
  .theme-toggle,
  .language-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }
  
  .language-toggle {
    right: 4rem;
  }
  
  .hero-section {
    padding: 3rem 1rem 2rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .footer {
    padding: 1.5rem 1rem;
  }
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeInUp 0.6s ease-out;
}

.card {
  animation: fadeInUp 0.6s ease-out;
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

/* 无障碍和焦点样式 */
.theme-toggle:focus-visible,
.language-toggle:focus-visible,
.card-main-link:focus-visible,
.card-secondary-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 减少动画设置 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}