:root {
  --fg: #ffffff;
  --bg: #0b0b0d;
  --overlay-top: rgba(0, 0, 0, 0.3);
  --overlay-btm: rgba(0, 0, 0, 0.55);
  --accent: #5eead4;
  --muted: rgba(255, 255, 255, 0.75);
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, "Noto Sans CJK SC", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

main {
  height: 100vh;
  overflow: hidden;
}

/* ===== Hero（视频背景区） ===== */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: saturate(1.05) contrast(1.02);
}

.bg-video.ready {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--overlay-top), var(--overlay-btm));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 6vw;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100svh;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-bottom: 5rem; /* 为底部footer内容留出空间 */
}

.logo {
  width: min(500px, 80vw);
  height: auto;
  max-height: 80px;
  display: block;
}

.title {
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.2;
  margin: 0.5rem 0 0;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.875rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Footer内容整合到hero区域 ===== */
.footer-content {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  color: #a7a7a7;
  text-align: center;
  font-size: 0.875rem;
  z-index: 2;
}

/* ===== 降级策略（低动效 / 省电） ===== */
@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }
  
  .hero {
    background: url('./media/bg.jpg') center/cover no-repeat;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .hero-content {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .logo {
    max-height: 60px;
  }
  
  .title {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-content {
    gap: 0.75rem;
  }
  
  .logo {
    max-height: 50px;
  }
  
  .actions {
    gap: 0.5rem;
  }
}

/* 超小屏幕适配 */
@media (max-width: 320px) {
  .hero-content {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }
  
  .logo {
    max-height: 40px;
  }
  
  .title {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* 超大屏幕适配 */
@media (min-width: 1920px) {
  .hero-content {
    max-width: 1400px;
  }
  
  .logo {
    max-width: 600px;
    max-height: 100px;
  }
  
  .title {
    font-size: clamp(2rem, 4vw, 3rem);
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .btn-secondary {
    border-color: #fff;
  }
  
  .footer {
    border-top-color: #fff;
  }
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
  body {
    background: #0b0b0d;
  }
}

/* 打印样式 */
@media print {
  .bg-video,
  .hero-overlay {
    display: none;
  }
  
  .hero {
    background: #f0f0f0;
    color: #000;
  }
  
  .btn {
    border: 1px solid #000;
    color: #000;
    background: transparent;
  }
}

/* 旧版浏览器兼容性 */
@supports not (inset: 0) {
  .bg-video, .hero-overlay {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
}

/* 不支持CSS Grid的浏览器 */
@supports not (display: grid) {
  .actions {
    display: flex;
    flex-wrap: wrap;
  }
}

/* 性能优化：减少动画对低性能设备的影响 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px; /* 满足触摸目标最小尺寸 */
    min-width: 44px;
  }
}