/* ===== GymBro Clean Design - x.ai Inspired with Metallic Effects ===== */

/* CSS自定义属性 */
:root {
  --color-bg: #0A0A0A;
  --color-text: #FFFFFF;
  --color-text-muted: #9CA3AF;
  --color-accent: #7124FF;
  --color-accent-hover: #5A1ACC;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.875rem;
  --font-size-sm: 1rem;
  --font-size-base: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-hero: clamp(3rem, 12vw, 8rem);

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  --border-radius: 8px;
  --transition: all 0.2s ease;

  /* 金属质感颜色序列 - 精确使用Tokens.kt定义 */
  --gym-brand-silver: #9B9B9B;
  /* BrandSilver - GymBro主品牌银色 */
  --gym-deep-silver: #6B6B6B;
  /* DeepSilver - 深银色 */
  --gym-light-silver: #CACACA;
  /* LightSilver - 浅银色 */
  --gym-metallic-start: #E8E8E8;
  /* Coach.MetallicStart */
  --gym-metallic-end: #C0C0C0;
  /* Coach.MetallicEnd */
  --gym-silver-medal: #C0C0C0;
  /* Medal.Silver */

  /* 准银色金属质感 - 参考用户提供的SuperGrok效果 */
  --silver-dark: #4A4A4A;
  /* Gray40 - 深银色暗部 */
  --silver-mid-dark: #6A6A6A;
  /* Gray50 - 中暗银色 */
  --silver-mid: #8A8A8A;
  /* Gray60 - 中银色 */
  --silver-light: #ABABAB;
  /* Gray70 - 浅银色 */
  --silver-bright: #CCCCCC;
  /* Gray80 - 亮银色 */
  --silver-very-light: #E0E0E0;
  /* Gray85 - 很亮银色 */
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: var(--font-size-base);
  overflow-x: hidden;
}

/* 导航栏 - 保持简洁 */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm) 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.75rem;
  /* 从var(--font-size-xl) 1.5rem 增大到 1.75rem */
  font-weight: 700;
  /* 导航栏LOGO也使用金属质感 */
  background: linear-gradient(90deg,
      #B4B4B4 0%,
      /* midSilver */
      #FBFBFB 25%,
      /* brightSilver */
      #FFFFFF 50%,
      /* nearWhite */
      #FBFBFB 75%,
      /* brightSilver */
      #B4B4B4 100%
      /* midSilver */
    );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
  transition: var(--transition);
  /* 轻微的金属扫光动画 */
  background-size: 150% 100%;
  animation: metallicSweep 8000ms linear infinite;
}

.logo:hover {
  opacity: 0.8;
}

.accent {
  color: var(--color-accent);
  /* .AI部分保持紫色 */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--color-text);
}

.download-btn {
  background-color: var(--color-accent);
  color: var(--color-text) !important;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.download-btn:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* 主内容区域 */
.main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

/* 星空背景画布 */
#space {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 10;
}

.title {
  font-size: clamp(4rem, 15vw, 10rem);
  /* 从clamp(3rem, 12vw, 8rem)进一步加大 */
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

/* GymBro LOGO - 银白色金属质感，参考MetallicColors */
h1.title.metal-title,
.title.metal-title,
.metal-title {
  /* 银白色金属质感 - 起始状态 */
  color: #B4B4B4 !important;
  background: none !important;

  /* 增强的金属质感阴影 */
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 4px rgba(0, 0, 0, 0.7),
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.3) !important;

  /* 银白色扫光动画 - 突出峰值 */
  animation: silverGlow 4000ms cubic-bezier(0.4, 0, 0.6, 1) infinite !important;

  font-weight: 900 !important;
  position: relative;
}

/* 6阶段银白色金属扫光动画 - 增强发光效果 */
@keyframes silverGlow {

  /* 初段 - 暗银色 */
  0% {
    color: #7A7A7A !important;
    text-shadow:
      0 0 3px rgba(255, 255, 255, 0.1),
      0 1px 2px rgba(0, 0, 0, 0.9);
  }

  /* 第2阶段 - 中等暗银，开始有光效 */
  16.67% {
    color: #999999 !important;
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.3),
      0 0 12px rgba(255, 255, 255, 0.2),
      0 1px 2px rgba(0, 0, 0, 0.8);
  }

  /* 第3阶段 - 中银色，增加光效 */
  33.33% {
    color: #B4B4B4 !important;
    text-shadow:
      0 0 12px rgba(255, 255, 255, 0.4),
      0 0 18px rgba(255, 255, 255, 0.3),
      0 0 25px rgba(255, 255, 255, 0.2),
      0 1px 2px rgba(0, 0, 0, 0.7);
  }

  /* 第4阶段 - 亮银色，明显光效 */
  50% {
    color: #D8D8D8 !important;
    text-shadow:
      0 0 18px rgba(255, 255, 255, 0.6),
      0 0 28px rgba(255, 255, 255, 0.4),
      0 0 35px rgba(255, 255, 255, 0.3),
      0 1px 2px rgba(0, 0, 0, 0.6);
  }

  /* 第5阶段 - 接近白色，强光效 */
  66.67% {
    color: #F8F8F8 !important;
    text-shadow:
      0 0 25px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 255, 255, 0.6),
      0 0 55px rgba(255, 255, 255, 0.4),
      0 0 70px rgba(255, 255, 255, 0.2),
      0 1px 2px rgba(0, 0, 0, 0.5);
  }

  /* 第6阶段 - 纯白色峰值，最强发光 */
  83.33% {
    color: #FFFFFF !important;
    text-shadow:
      0 0 35px rgba(255, 255, 255, 1.0),
      0 0 50px rgba(255, 255, 255, 0.8),
      0 0 70px rgba(255, 255, 255, 0.6),
      0 0 90px rgba(255, 255, 255, 0.4),
      0 0 110px rgba(255, 255, 255, 0.2),
      0 1px 2px rgba(0, 0, 0, 0.3);
  }

  /* 回到初段 - 暗银色 */
  100% {
    color: #7A7A7A !important;
    text-shadow:
      0 0 3px rgba(255, 255, 255, 0.1),
      0 1px 2px rgba(0, 0, 0, 0.9);
  }
}

/* 已更新为简单发光动画 */

.subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: var(--color-text);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(113, 36, 255, 0.3);
  position: relative;
  z-index: 15;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(113, 36, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 var(--spacing-sm);
  }

  .nav-links {
    gap: var(--spacing-sm);
  }

  .nav-links a:not(.download-btn) {
    display: none;
  }

  .main {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .subtitle {
    font-size: var(--font-size-base);
  }

  .cta {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
  }

  /* 移动端优化银白色动画 */
  .metal-title {
    animation: silverGlow 4000ms cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: var(--font-size-lg);
  }

  .title {
    font-size: clamp(2rem, 15vw, 4rem);
  }

  .metal-title {
    animation: silverGlow 4000ms cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
  }
}

/* 性能优化 - 尊重用户偏好 */
@media (prefers-reduced-motion: reduce) {
  .metal-title {
    animation: none !important;
    color: #D8D8D8 !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 简化的兼容性规则 - 现在不需要了 */

/* === Waitlist功能样式 === */

/* Waitlist按钮区域 */
.waitlist-section {
  margin: var(--spacing-lg) 0;
}

.waitlist-btn {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-family);
  position: relative;
  z-index: 15;
  overflow: hidden;
  /* 添加克制的光效 */
  box-shadow:
    0 0 10px rgba(113, 36, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 扫光效果 */
.waitlist-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.08),
      transparent);
  transition: left 0.6s ease;
}

.waitlist-btn:hover::before {
  left: 100%;
}

.waitlist-btn:hover {
  background: var(--color-accent);
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(113, 36, 255, 0.35),
    0 0 20px rgba(113, 36, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--color-bg);
  margin: 5% auto;
  padding: var(--spacing-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(var(--border-radius) * 2);
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close {
  color: var(--color-text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: var(--spacing-md);
  top: var(--spacing-md);
  transition: var(--transition);
}

.close:hover {
  color: var(--color-text);
  transform: scale(1.1);
}

.modal-content h2 {
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.modal-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  line-height: 1.5;
}

/* 表单样式 */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  font-size: var(--font-size-sm);
}

.form-group input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  transition: var(--transition);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--gym-brand-silver);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(155, 155, 155, 0.1);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: var(--color-text);
  border: none;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  margin-top: var(--spacing-sm);
}

.submit-btn:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(113, 36, 255, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

/* 成功消息样式 */
.success-message {
  text-align: center;
  padding: var(--spacing-lg) 0;
}

.success-message h3 {
  color: var(--gym-brand-silver);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-lg);
}

.success-message p {
  color: var(--color-text);
  margin-bottom: var(--spacing-sm);
}

.waitlist-number {
  background: linear-gradient(135deg, var(--gym-brand-silver), var(--gym-light-silver));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: var(--font-size-lg);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    padding: var(--spacing-lg);
    width: 95%;
  }

  .waitlist-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 15% auto;
    padding: var(--spacing-md);
  }

  .close {
    right: var(--spacing-sm);
    top: var(--spacing-sm);
    font-size: 24px;
  }

  .modal-content h2 {
    font-size: var(--font-size-lg);
    margin-right: var(--spacing-xl);
  }
}
