/* 完美体育 - 主样式表 */
:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --accent-gold: #f0c040;
  --accent-red: #e94560;
  --accent-blue: #4a90d9;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 暗色模式默认 */
body {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.85);
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
}

/* 滚动动画基础 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 头部导航 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition);
}

header:hover {
  background: rgba(15, 15, 26, 0.95);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  gap: 20px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: wrap;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}

nav ul li a:hover {
  color: var(--accent-gold);
  background: rgba(240, 192, 64, 0.1);
}

nav ul li a:hover::after {
  width: 60%;
}

nav div:last-child {
  display: flex;
  gap: 8px;
}

nav button {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

nav button:hover {
  background: rgba(240, 192, 64, 0.2);
  border-color: var(--accent-gold);
  transform: scale(1.05);
}

/* Hero Banner - 渐变背景 */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(240, 192, 64, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(233, 69, 96, 0.06) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, 5%) scale(1.1); }
}

#hero > div:first-child {
  flex: 1;
  max-width: 600px;
  z-index: 1;
  animation: fadeInUp 1s ease;
}

#hero > div:last-child {
  flex: 1;
  max-width: 500px;
  z-index: 1;
  animation: fadeInUp 1s ease 0.2s both;
}

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

#hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--accent-gold), #ffd700, var(--accent-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

#hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 500px;
}

#hero div[role="button"] {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

#hero a[role="button"] {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

#hero a[role="button"]:first-child {
  background: linear-gradient(135deg, var(--accent-gold), #e6b800);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(240, 192, 64, 0.3);
}

#hero a[role="button"]:first-child:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(240, 192, 64, 0.5);
}

#hero a[role="button"]:last-child {
  background: transparent;
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
}

#hero a[role="button"]:last-child:hover {
  background: rgba(240, 192, 64, 0.1);
  transform: translateY(-3px);
}

#hero svg {
  width: 100%;
  height: auto;
  max-width: 500px;
  filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
}

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

/* 通用section样式 */
main section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

main section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

main section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), transparent);
  border-radius: 4px;
  margin-top: 8px;
}

main section > p {
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* 卡片网格通用 */
#about > div,
#products > div,
#services > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

article {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-red));
  opacity: 0;
  transition: var(--transition);
}

article:hover {
  transform: translateY(-8px);
  border-color: rgba(240, 192, 64, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

article:hover::before {
  opacity: 1;
}

article h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

article p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* About 特殊样式 */
#about > p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Features 列表 */
#features ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
}

#features ul li {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

#features ul li:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 192, 64, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#features ul li strong {
  color: var(--accent-gold);
  font-weight: 600;
  white-space: nowrap;
}

#features ul li::before {
  content: '✦';
  color: var(--accent-gold);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Testimonials */
#testimonials blockquote {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 32px;
  margin-bottom: 20px;
  transition: var(--transition);
}

#testimonials blockquote:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow);
}

#testimonials blockquote p {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* FAQ 手风琴 */
#faq dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
}

#faq dl div {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

#faq dl div:hover {
  border-color: rgba(240, 192, 64, 0.2);
}

#faq dt button {
  width: 100%;
  padding: 18px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

#faq dt button::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-gold);
  transition: var(--transition);
}

#faq dt button[aria-expanded="true"]::after {
  content: '−';
  transform: rotate(180deg);
}

#faq dt button:hover {
  background: rgba(240, 192, 64, 0.05);
}

#faq dd {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

#faq dd[hidden] {
  display: none;
}

/* Contact */
#contact address {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
  font-style: normal;
  transition: var(--transition);
}

#contact address:hover {
  border-color: rgba(240, 192, 64, 0.3);
  box-shadow: var(--shadow);
}

#contact address p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 1rem;
}

#contact address p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 24px;
}

footer > div {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

footer nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
  flex-wrap: wrap;
}

footer nav ul li a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
}

footer nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: var(--transition);
}

footer nav ul li a:hover {
  color: var(--accent-gold);
}

footer nav ul li a:hover::after {
  width: 100%;
}

/* 响应式 - 手机 */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  nav ul {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 4px;
  }

  nav ul li a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  #hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 16px 40px;
  }

  #hero h1 {
    font-size: 2rem;
  }

  #hero p {
    margin: 0 auto 28px;
  }

  #hero div[role="button"] {
    justify-content: center;
  }

  #hero svg {
    max-width: 300px;
    margin-top: 20px;
  }

  main section {
    padding: 48px 16px;
  }

  #about > div,
  #products > div,
  #services > div,
  #features ul {
    grid-template-columns: 1fr;
  }

  article {
    padding: 24px 20px;
  }

  footer > div {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  footer nav ul {
    justify-content: center;
  }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
  #hero {
    padding: 100px 24px 60px;
    gap: 40px;
  }

  #hero > div:first-child {
    max-width: 450px;
  }

  #hero > div:last-child {
    max-width: 350px;
  }

  #about > div,
  #products > div,
  #services > div {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  nav ul {
    gap: 2px;
  }

  nav ul li a {
    padding: 4px 8px;
    font-size: 0.8rem;
  }

  #hero h1 {
    font-size: 1.8rem;
  }

  #hero a[role="button"] {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  article h3 {
    font-size: 1.1rem;
  }
}

/* 辅助功能 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 暗色模式切换按钮动画 */
#darkModeToggle, #searchToggle {
  position: relative;
  overflow: hidden;
}

#darkModeToggle:active, #searchToggle:active {
  transform: scale(0.9);
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* 选中文本样式 */
::selection {
  background: rgba(240, 192, 64, 0.3);
  color: var(--text-primary);
}

/* 链接焦点样式 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}