/* 皇冠体育App下载 - 完整样式表 */
/* 基础重置与全局变量 */
:root {
  --primary: #1a1a2e;
  --accent: #f5c518;
  --accent-hover: #e0b010;
  --bg-light: #ffffff;
  --bg-section: #f0f2f8;
  --text-dark: #1a1a2e;
  --text-muted: #5a5a7a;
  --text-light: #e0e0e0;
  --text-subtle: #7a7a9a;
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.06);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.5);
  --radius-sm: 16px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
}

[data-theme="dark"] {
  --bg-light: #1a1a2e;
  --bg-section: #1a1a2e;
  --text-dark: #e0e0e0;
  --text-muted: #a0a0b8;
  --text-subtle: #7a7a9a;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.3);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img, svg {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ========== 导航栏 ========== */
header[role="banner"] nav {
  background: rgba(26,26,46,0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px);
  position: sticky !important;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background var(--transition);
}

header[role="banner"] nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

header[role="banner"] nav ul li a {
  color: #e0e0e0 !important;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

header[role="banner"] nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

header[role="banner"] nav ul li a:hover::after,
header[role="banner"] nav ul li a:focus-visible::after {
  width: 100%;
}

header[role="banner"] nav ul li a:hover {
  color: var(--accent) !important;
}

/* 深色模式切换按钮 */
header[role="banner"] nav button[aria-label="切换深色模式"] {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition);
}

header[role="banner"] nav button[aria-label="切换深色模式"]:hover {
  background: rgba(245,197,24,0.15);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ========== Hero Section ========== */
#hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%) !important;
  padding: 4rem 2rem;
  text-align: center;
  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(245,197,24,0.08) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); opacity: 0.5; }
  100% { transform: translate(5%, 5%); opacity: 1; }
}

#hero > div {
  max-width: 900px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

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

#hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: #ffffff;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

#hero h1 span {
  color: var(--accent);
  display: block;
}

#hero p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #b0b0c8;
  max-width: 700px;
  margin: 1rem auto 2rem;
  line-height: 1.6;
}

#hero .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

#hero .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--primary) !important;
  padding: 0.85rem 2.2rem;
  border-radius: 60px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(245,197,24,0.35);
  transition: all var(--transition);
}

#hero .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(245,197,24,0.45);
  background: var(--accent-hover);
}

#hero .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent) !important;
  padding: 0.85rem 2.2rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1.1rem;
  border: 1.5px solid var(--accent);
  transition: all var(--transition);
}

#hero .btn-outline:hover {
  background: rgba(245,197,24,0.1);
  transform: translateY(-3px);
}

#hero small {
  color: #7a7a9a;
  font-size: 0.9rem;
  margin-top: 2rem;
  display: block;
}

/* ========== 通用 Section 样式 ========== */
section {
  padding: 5rem 2rem;
  transition: background var(--transition), color var(--transition);
}

section > div {
  max-width: 1100px;
  margin: 0 auto;
}

section h2 {
  font-size: 2rem;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

section > div > p:first-of-type {
  text-align: center;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* ========== About Section ========== */
#about {
  background: var(--bg-light) !important;
}

#about .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

#about .card {
  background: #f8f9fc;
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
}

[data-theme="dark"] #about .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.06);
}

#about .card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245,197,24,0.2);
}

#about .card .icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

#about .card h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin: 0 0 0.5rem;
}

#about .card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ========== Products / App Download ========== */
#products {
  background: linear-gradient(180deg, #f0f2f8 0%, var(--bg-light) 100%) !important;
}

[data-theme="dark"] #products {
  background: linear-gradient(180deg, #1a1a2e 0%, #1a1a2e 100%) !important;
}

#products .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

#products .card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
  animation: fadeInUp 0.6s ease-out;
}

[data-theme="dark"] #products .card {
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
}

#products .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  border-color: rgba(245,197,24,0.15);
}

#products .card .icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

#products .card h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0 0 0.25rem;
}

#products .card .version {
  color: var(--text-subtle);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

#products .card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 2;
}

#products .card ul li {
  position: relative;
  padding-left: 1.5rem;
}

#products .card ul li::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 0;
}

#products .card .btn-download {
  display: block;
  background: var(--primary);
  color: var(--accent) !important;
  text-align: center;
  padding: 0.8rem;
  border-radius: 60px;
  font-weight: 700;
  margin-top: 1.5rem;
  transition: all var(--transition);
}

#products .card .btn-download:hover {
  background: var(--accent);
  color: var(--primary) !important;
  transform: scale(1.02);
}

#products .safety-note {
  margin-top: 3rem;
  background: #f8f9fc;
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
}

[data-theme="dark"] #products .safety-note {
  background: rgba(255,255,255,0.05);
}

#products .safety-note p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

#products .safety-note code {
  background: #e8eaf0;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--primary);
}

[data-theme="dark"] #products .safety-note code {
  background: rgba(255,255,255,0.1);
  color: var(--accent);
}

/* ========== Features Section ========== */
#features {
  background: var(--primary) !important;
  color: var(--text-light);
}

#features h2 {
  color: var(--accent);
}

#features h2::after {
  background: var(--accent);
}

#features .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

#features .card {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.2rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all var(--transition);
  animation: fadeInUp 0.5s ease-out;
}

#features .card:nth-child(2) { animation-delay: 0.1s; }
#features .card:nth-child(3) { animation-delay: 0.2s; }
#features .card:nth-child(4) { animation-delay: 0.3s; }
#features .card:nth-child(5) { animation-delay: 0.4s; }
#features .card:nth-child(6) { animation-delay: 0.5s; }

#features .card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(245,197,24,0.3);
}

#features .card .icon {
  font-size: 2.2rem;
  display: block;
}

#features .card h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.3rem;
  color: #ffffff;
}

#features .card p {
  font-size: 0.9rem;
  color: #a0a0b8;
  line-height: 1.4;
}

/* ========== HowTo Section ========== */
#howto {
  background: var(--bg-light) !important;
}

#howto .steps {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

#howto .step {
  margin-bottom: 2rem;
  position: relative;
  transition: all var(--transition);
}

#howto .step:last-child {
  margin-bottom: 0;
}

#howto .step:hover {
  padding-left: 0.5rem;
}

#howto .step h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin: 0 0 0.3rem;
}

#howto .step p {
  color: var(--text-muted);
  margin: 0;
}

/* ========== FAQ Section ========== */
#faq {
  background: var(--bg-section) !important;
}

#faq details {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
  transition: all var(--transition);
  border: 1px solid transparent;
}

[data-theme="dark"] #faq details {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}

#faq details:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(245,197,24,0.15);
}

#faq details[open] {
  border-color: var(--accent);
}

#faq summary {
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition);
}

#faq details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

#faq details p {
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
  animation: fadeInUp 0.3s ease-out;
}

/* ========== Testimonials Section ========== */
#testimonials {
  background: var(--bg-light) !important;
}

#testimonials .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

#testimonials blockquote {
  background: #f8f9fc;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 0;
  font-style: italic;
  color: var(--text-muted);
  border-left: 4px solid var(--accent);
  transition: all var(--transition);
}

[data-theme="dark"] #testimonials blockquote {
  background: rgba(255,255,255,0.04);
}

#testimonials blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

#testimonials blockquote p {
  margin: 0 0 0.75rem;
}

#testimonials blockquote footer {
  font-style: normal;
  font-weight: 600;
  color: var(--text-dark);
}

/* ========== Insights Section ========== */
#insights {
  background: var(--bg-section) !important;
}

#insights .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

#insights article {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
}

[data-theme="dark"] #insights article {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}

#insights article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245,197,24,0.15);
}

#insights article time {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

#insights article h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0.5rem 0;
}

#insights article p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== Contact Section ========== */
#contact {
  background: var(--primary) !important;
  color: var(--text-light);
}

#contact h2 {
  color: var(--accent);
}

#contact h2::after {
  background: var(--accent);
}

#contact .info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

#contact .info p {
  margin: 0;
}

#contact .info strong {
  color: var(--accent);
}

/* ========== Footer ========== */
footer[role="contentinfo"] {
  background: #0f0c29 !important;
  color: #7a7a9a;
  padding: 2rem 2rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

footer[role="contentinfo"] .footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

footer[role="contentinfo"] .footer-brand p:first-child {
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

footer[role="contentinfo"] .footer-brand p:last-child {
  font-size: 0.85rem;
  margin: 0;
}

footer[role="contentinfo"] .footer-links p {
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

footer[role="contentinfo"] .footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

footer[role="contentinfo"] .footer-links ul li a {
  color: #7a7a9a;
  transition: color var(--transition);
}

footer[role="contentinfo"] .footer-links ul li a:hover {
  color: var(--accent);
}

footer[role="contentinfo"] .footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
}

footer[role="contentinfo"] .footer-bottom p {
  margin: 0;
}

/* ========== Back to Top ========== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent);
  color: var(--primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245,197,24,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 999;
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(245,197,24,0.4);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  header[role="banner"] nav {
    padding: 0.5rem 1.5rem;
  }
  
  section {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 768px) {
  header[role="banner"] nav {
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  header[role="banner"] nav ul {
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  header[role="banner"] nav ul li a {
    font-size: 0.9rem;
  }

  #hero {
    min-height: 70vh;
    padding: 3rem 1rem;
  }

  #hero > div {
    padding: 2rem 1.5rem;
    border-radius: 24px;
  }

  #hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  #hero .btn-primary,
  #hero .btn-outline {
    padding: 0.7rem 1.6rem;
    font-size: 1rem;
  }

  section {
    padding: 3rem 1rem;
  }

  section h2 {
    font-size: 1.6rem;
  }

  #about .grid,
  #products .grid,
  #features .grid,
  #testimonials .grid,
  #insights .grid {
    grid-template-columns: 1fr;
  }

  #products .card {
    padding: 2rem 1.5rem;
  }

  #faq details {
    padding: 1rem 1.2rem;
  }

  #contact .info {
    font-size: 0.95rem;
  }

  footer[role="contentinfo"] .footer-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  footer[role="contentinfo"] .footer-links ul {
    justify-content: center;
  }

  #backToTop {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  header[role="banner"] nav {
    flex-direction: column;
    padding: 0.5rem;
  }

  header[role="banner"] nav ul {
    gap: 0.5rem;
  }

  header[role="banner"] nav ul li a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  #hero {
    padding: 2rem 0.8rem;
    min-height: 60vh;
  }

  #hero > div {
    padding: 1.5rem 1rem;
  }

  #hero h1 {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }

  #hero p {
    font-size: 0.95rem;
  }

  #hero .btn-primary,
  #hero .btn-outline {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }

  section h2 {
    font-size: 1.4rem;
  }

  #products .card .btn-download {
    font-size: 0.95rem;
    padding: 0.7rem;
  }

  #howto .step h3 {
    font-size: 1.05rem;
  }
}

/* ========== 暗色模式针对内联样式的覆盖 ========== */
[data-theme="dark"] body {
  background: #0f0c29;
  color: #e0e0e0;
}

[data-theme="dark"] section#about,
[data-theme="dark"] section#products,
[data-theme="dark"] section#howto,
[data-theme="dark"] section#faq,
[data-theme="dark"] section#testimonials {
  background: #1a1a2e !important;
  color: #e0e0e0;
}

[data-theme="dark"] section#insights {
  background: #1a1a2e !important;
  color: #e0e0e0;
}

[data-theme="dark"] section#contact {
  background: #1a1a2e !important;
}

/* ========== 滚动动画 ========== */
@media (prefers-reduced-motion: no-preference) {
  section {
    opacity: 0;
    transform: translateY(20px);
    animation: sectionFadeIn 0.8s ease-out forwards;
  }

  @keyframes sectionFadeIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  section:nth-child(2) { animation-delay: 0.1s; }
  section:nth-child(3) { animation-delay: 0.2s; }
  section:nth-child(4) { animation-delay: 0.3s; }
  section:nth-child(5) { animation-delay: 0.4s; }
  section:nth-child(6) { animation-delay: 0.5s; }
  section:nth-child(7) { animation-delay: 0.6s; }
  section:nth-child(8) { animation-delay: 0.7s; }
  section:nth-child(9) { animation-delay: 0.8s; }
}

/* ========== 无障碍焦点样式 ========== */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ========== 选择样式 ========== */
::selection {
  background: var(--accent);
  color: var(--primary);
}

/* ========== 平滑滚动条 ========== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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