/* ===== 全局重置与基础 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a2a4a;
  --primary-light: #2a3a5a;
  --primary-dark: #0a0f1e;
  --accent: #f0b90b;
  --accent-hover: #d4a509;
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --text: #1a1a2e;
  --text-muted: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.dark-mode {
  --bg: #121212;
  --bg-alt: #1a1a2e;
  --text: #e0e0e0;
  --text-muted: #b0b0c0;
  --text-light: #888;
  --border: #2a2a3e;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --primary: #2a3a5a;
  --primary-light: #3a4a6a;
  --primary-dark: #0a0f1e;
}

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

body {
  font-family: var(--font);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== 动画关键帧 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

/* ===== 头部导航 ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.logo:hover {
  transform: scale(1.02);
}

.logo svg {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

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

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background var(--transition);
}

.mobile-menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.mobile-menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: white;
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.dark-mode-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  transform: rotate(15deg);
}

.dark-mode-toggle svg {
  width: 22px;
  height: 22px;
}

/* ===== 主内容 ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

section {
  margin-bottom: 5rem;
  animation: fadeInUp 0.6s ease-out both;
}

section:nth-child(even) {
  animation-name: fadeInUp;
}

/* ===== 标题 ===== */
h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.5rem;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===== 按钮 ===== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  gap: 0.5rem;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 16px rgba(26,42,74,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,42,74,0.4);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s;
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26,42,74,0.2);
}

/* ===== Hero 区域 ===== */
#hero {
  position: relative;
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 4rem;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(240,185,11,0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(26,42,74,0.05) 0%, transparent 50%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  min-width: 140px;
  transition: all var(--transition);
}

.hero-stats > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.hero-stats strong {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 0.25rem;
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== 关于 ===== */
#about {
  background: var(--bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

#about p {
  max-width: 800px;
}

/* ===== 功能网格 ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.features-grid article {
  background: var(--bg-alt);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.features-grid article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  opacity: 0;
  transition: opacity var(--transition);
}

.features-grid article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.features-grid article:hover::before {
  opacity: 1;
}

.features-grid h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
}

.features-grid h3::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 0.1em;
}

.features-grid p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== 下载区域 ===== */
#download {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-lg);
  color: white;
}

#download h2 {
  color: white;
}

#download h2::after {
  background: var(--accent);
  left: 50%;
  transform: translateX(-50%);
}

#download p {
  color: rgba(255,255,255,0.8);
}

.download-options {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.download-options .btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  min-width: 180px;
  box-shadow: 0 4px 20px rgba(240,185,11,0.4);
}

.download-options .btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(240,185,11,0.5);
}

.download-note {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6) !important;
  margin-top: 1rem;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-list details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-list details:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.faq-list details[open] {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.faq-list summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  list-style: none;
  transition: color var(--transition);
}

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

.faq-list summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details[open] summary {
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}

.faq-list details p {
  padding: 1rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--bg);
}

/* ===== 知识库 ===== */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.knowledge-grid article {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.knowledge-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.knowledge-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.knowledge-grid p {
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.knowledge-grid a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap var(--transition);
}

.knowledge-grid a::after {
  content: '→';
  transition: transform var(--transition);
}

.knowledge-grid a:hover {
  gap: 0.7rem;
}

.knowledge-grid a:hover::after {
  transform: translateX(3px);
}

/* ===== HowTo ===== */
#howto {
  background: var(--bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

#howto ol {
  counter-reset: step;
  margin: 1.5rem 0;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  padding: 0.8rem 1rem 0.8rem 3rem;
  position: relative;
  margin-bottom: 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

#howto ol li:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 联系 ===== */
#contact {
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

#contact address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 500px;
  margin: 1.5rem auto 0;
}

#contact address p {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

#contact address p::before {
  content: '•';
  color: var(--accent);
  margin-right: 0.6rem;
  font-weight: bold;
}

/* ===== 页脚 ===== */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.footer-about p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer-links h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: all var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-legal {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-legal a {
  color: rgba(255,255,255,0.6);
  margin: 0 0.3rem;
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ===== 返回顶部 ===== */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

#back-to-top svg {
  width: 24px;
  height: 24px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .nav-container {
    padding: 0.6rem 1rem;
  }
  
  main {
    padding: 1.5rem 1rem;
  }
  
  section {
    margin-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: fadeInUp 0.3s ease-out;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    width: 100%;
  }
  
  .nav-links a::after {
    display: none;
  }
  
  #hero {
    padding: 3rem 1rem 2rem;
  }
  
  .hero-stats {
    gap: 1rem;
  }
  
  .hero-stats > div {
    min-width: 100px;
    padding: 0.75rem 1rem;
  }
  
  .features-grid,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  
  #about,
  #howto,
  #contact {
    padding: 1.5rem;
  }
  
  #download {
    padding: 2rem 1rem;
  }
  
  .download-options {
    flex-direction: column;
    align-items: center;
  }
  
  .download-options .btn-primary {
    width: 100%;
    max-width: 280px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  #back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    max-width: 260px;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-stats > div {
    width: 100%;
    max-width: 200px;
  }
  
  .faq-list summary {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  .faq-list details p {
    padding: 0.75rem 1rem;
  }
}

/* ===== 暗色模式额外优化 ===== */
.dark-mode .features-grid article {
  background: var(--bg-alt);
}

.dark-mode .faq-list details p {
  background: var(--bg);
}

.dark-mode .hero-stats > div {
  background: var(--bg-alt);
}

.dark-mode #about,
.dark-mode #howto,
.dark-mode #contact {
  background: var(--bg-alt);
}

.dark-mode .btn-secondary {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
}

.dark-mode .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
}

/* ===== 打印优化 ===== */
@media print {
  header,
  footer,
  #back-to-top,
  .mobile-menu-toggle,
  .dark-mode-toggle {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}