/* Xinghe Template - 星河主题 */
/* 主要颜色方案: #2C9678 (青绿色), #F5F4F7 (浅灰色) */

:root {
  --primary-color: #2C9678;
  --secondary-color: #F5F4F7;
  --accent-color: #1E7D5C;
  --text-dark: #2D3748;
  --text-light: #718096;
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --font-primary: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--secondary-color) 0%, #ffffff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 现代化容器 */
.xh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 导航栏设计 */
.xh-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.xh-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.xh-logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.xh-logo:hover {
  transform: scale(1.05);
}

.xh-logo svg {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.xh-nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.xh-nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  position: relative;
  transition: color 0.3s ease;
}

.xh-nav-link:hover {
  color: var(--primary-color);
}

.xh-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
}

.xh-nav-link:hover::after {
  width: 100%;
}

/* 主要按钮样式 */
.xh-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.xh-btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white);
  box-shadow: var(--shadow-light);
}

.xh-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.xh-btn-secondary {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.xh-btn-secondary:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Hero区域 */
.xh-hero {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.xh-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(44, 150, 120, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 244, 247, 0.8) 0%, transparent 50%);
  z-index: -1;
}

.xh-hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-dark), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.xh-hero-subtitle {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.xh-hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 特性卡片 */
.xh-features {
  padding: 80px 0;
  background: var(--white);
}

.xh-section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.xh-section-subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 64px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.xh-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 64px;
}

.xh-feature-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.xh-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.xh-feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
}

.xh-feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--white);
  font-size: 24px;
}

.xh-feature-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.xh-feature-desc {
  color: var(--text-light);
  line-height: 1.6;
}

/* 表单设计 */
.xh-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.xh-form-group {
  margin-bottom: 24px;
}

.xh-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.xh-input,
.xh-select,
.xh-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--white);
}

.xh-input:focus,
.xh-select:focus,
.xh-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 150, 120, 0.1);
}

/* 卡片布局 */
.xh-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

.xh-card:hover {
  box-shadow: var(--shadow-medium);
}

.xh-card-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--secondary-color), var(--white));
}

.xh-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.xh-card-body {
  padding: 24px;
}

/* 底部footer */
.xh-footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.xh-footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.xh-footer-section h3 {
  margin-bottom: 16px;
  color: var(--primary-color);
}

.xh-footer-section p,
.xh-footer-section a {
  color: #A0AEC0;
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
}

.xh-footer-section a:hover {
  color: var(--primary-color);
}

.xh-footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #4A5568;
  color: #A0AEC0;
}

/* 移动端菜单按钮 */
.xh-mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 8px;
}

.xh-mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* 移动端导航菜单 */
@media (max-width: 768px) {
  .xh-mobile-menu-btn {
    display: block;
  }
  
  .xh-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-medium);
  }
  
  .xh-nav-menu.active {
    display: flex;
  }
  
  .xh-nav-menu li {
    margin: 8px 0;
  }
  
  .xh-nav-buttons {
    display: none;
  }
  
  .xh-hero-title {
    font-size: 28px;
  }
  
  .xh-hero-subtitle {
    font-size: 16px;
  }
  
  .xh-hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .xh-features-grid {
    grid-template-columns: 1fr;
  }
  
  .xh-container {
    padding: 0 16px;
  }
  
  .xh-hero {
    padding: 100px 0 60px;
  }
  
  .xh-features {
    padding: 60px 0;
  }
  
  .xh-feature-card {
    padding: 24px;
  }
  
  .xh-footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* 平板响应式 */
@media (max-width: 1024px) and (min-width: 769px) {
  .xh-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .xh-container {
    padding: 0 20px;
  }
}

/* 大屏幕优化 */
@media (min-width: 1440px) {
  .xh-container {
    max-width: 1400px;
  }
  
  .xh-hero-title {
    font-size: 56px;
  }
  
  .xh-hero-subtitle {
    font-size: 22px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .xh-btn,
  .xh-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .xh-feature-card:hover {
    transform: none;
  }
  
  .xh-card:hover {
    box-shadow: var(--shadow-light);
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-light: #000000;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .xh-fade-in {
    animation: none;
    opacity: 1;
    transform: translateY(0);
  }
}

/* 动画效果 */
.xh-fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.xh-slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 加载动画 */
.xh-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 工具类 */
.xh-text-center { text-align: center; }
.xh-text-left { text-align: left; }
.xh-text-right { text-align: right; }
.xh-mb-4 { margin-bottom: 16px; }
.xh-mb-6 { margin-bottom: 24px; }
.xh-mb-8 { margin-bottom: 32px; }
.xh-mt-4 { margin-top: 16px; }
.xh-mt-6 { margin-top: 24px; }
.xh-mt-8 { margin-top: 32px; }
.xh-hidden { display: none; }
.xh-block { display: block; }
.xh-flex { display: flex; }
.xh-grid { display: grid; }
