/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background: #f8fafc;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
ul, ol {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}
/* ===== Dark Mode ===== */
@media (prefers-color-scheme: dark) {
  body {
    background: #0f172a;
    color: #e2e8f0;
  }
  section, header, footer, article, blockquote, details, address {
    background: #1e293b !important;
    color: #e2e8f0 !important;
  }
  a {
    color: #93c5fd;
  }
  h1, h2, h3, h4, h5, h6 {
    color: #f1f5f9;
  }
  .glass-card {
    background: rgba(30, 41, 59, 0.6) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
  }
  .gradient-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%) !important;
  }
  .btn-primary {
    background: #3b82f6 !important;
    color: #fff !important;
  }
  .btn-primary:hover {
    background: #2563eb !important;
    box-shadow: 0 0 20px rgba(59,130,246,0.5) !important;
  }
}
/* ===== Layout & Container ===== */
body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
/* ===== Header / Navigation ===== */
header {
  padding: 1rem 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s;
}
nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}
nav[aria-label="主导航"] a {
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  transition: all 0.3s ease;
  color: #334155;
  position: relative;
}
nav[aria-label="主导航"] a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
nav[aria-label="主导航"] a:hover {
  color: #3b82f6;
  background: rgba(59,130,246,0.08);
}
nav[aria-label="主导航"] a:hover::after {
  width: 80%;
}
@media (prefers-color-scheme: dark) {
  header {
    background: rgba(15,23,42,0.8);
    border-bottom-color: rgba(255,255,255,0.05);
  }
  nav[aria-label="主导航"] a {
    color: #cbd5e1;
  }
  nav[aria-label="主导航"] a:hover {
    color: #93c5fd;
    background: rgba(59,130,246,0.15);
  }
}
/* ===== Section Common ===== */
section {
  margin: 3rem 0;
  padding: 2.5rem 1.5rem;
  border-radius: 2rem;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s forwards;
}
section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.3s; }
section:nth-of-type(4) { animation-delay: 0.4s; }
section:nth-of-type(5) { animation-delay: 0.5s; }
section:nth-of-type(6) { animation-delay: 0.6s; }
section:nth-of-type(7) { animation-delay: 0.7s; }
section:nth-of-type(8) { animation-delay: 0.8s; }
section:nth-of-type(9) { animation-delay: 0.9s; }
section:nth-of-type(10) { animation-delay: 1.0s; }
section:nth-of-type(11) { animation-delay: 1.1s; }
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
section:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
@media (prefers-color-scheme: dark) {
  section {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  section:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  }
}
/* ===== Gradient Banner (Hero) ===== */
.gradient-banner, #hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08) 0%, transparent 50%);
  animation: shimmer 8s infinite alternate;
}
@keyframes shimmer {
  0% { transform: translate(0,0); }
  100% { transform: translate(10%,10%); }
}
#hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
#hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}
.btn-primary, #hero a[href="#download"] {
  display: inline-block;
  background: #ffffff;
  color: #1e293b;
  padding: 0.9rem 2.4rem;
  border-radius: 3rem;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
}
.btn-primary:hover, #hero a[href="#download"]:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  background: #f1f5f9;
}
@media (prefers-color-scheme: dark) {
  #hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  }
  .btn-primary, #hero a[href="#download"] {
    background: #3b82f6;
    color: #fff;
  }
  .btn-primary:hover, #hero a[href="#download"]:hover {
    background: #2563eb;
    box-shadow: 0 0 20px rgba(59,130,246,0.5);
  }
}
/* ===== Glass Card Effect ===== */
.glass-card, article, blockquote, details, .card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}
.glass-card:hover, article:hover, blockquote:hover, details:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
@media (prefers-color-scheme: dark) {
  .glass-card, article, blockquote, details, .card {
    background: rgba(30,41,59,0.6);
    border-color: rgba(148,163,184,0.2);
  }
  .glass-card:hover, article:hover, blockquote:hover, details:hover {
    background: rgba(30,41,59,0.8);
    border-color: rgba(148,163,184,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }
}
/* ===== Typography ===== */
h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}
h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  margin-top: 0.5rem;
}
h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
}
p {
  margin-bottom: 1rem;
}
ul, ol {
  margin: 1rem 0 1rem 1.5rem;
}
li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 0.5rem;
}
ul li::before {
  content: '▸';
  color: #3b82f6;
  font-weight: bold;
  margin-right: 0.5rem;
}
ol {
  counter-reset: step;
}
ol li {
  counter-increment: step;
}
ol li::before {
  content: counter(step) ".";
  font-weight: 700;
  color: #3b82f6;
  margin-right: 0.5rem;
}
blockquote {
  font-style: italic;
  border-left: 5px solid #3b82f6;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(59,130,246,0.05);
  border-radius: 0 1rem 1rem 0;
}
blockquote footer {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.7;
}
details {
  margin: 1rem 0;
  padding: 1rem 1.5rem;
  cursor: pointer;
}
details summary {
  font-weight: 600;
  font-size: 1.1rem;
  outline: none;
  transition: color 0.2s;
}
details summary:hover {
  color: #3b82f6;
}
details[open] summary {
  color: #3b82f6;
}
address p {
  margin-bottom: 0.4rem;
}
/* ===== Contact & Legal ===== */
#contact address {
  background: rgba(0,0,0,0.02);
  padding: 1.5rem;
  border-radius: 1rem;
  font-style: normal;
}
#legal a {
  color: #3b82f6;
  text-decoration: underline;
  transition: color 0.2s;
}
#legal a:hover {
  color: #1d4ed8;
}
/* ===== Footer ===== */
footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: 3rem;
}
footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}
footer nav a {
  font-size: 0.9rem;
  color: #64748b;
  transition: color 0.2s;
}
footer nav a:hover {
  color: #3b82f6;
}
@media (prefers-color-scheme: dark) {
  footer {
    border-top-color: rgba(255,255,255,0.05);
  }
  footer nav a {
    color: #94a3b8;
  }
  footer nav a:hover {
    color: #93c5fd;
  }
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
  body {
    padding: 0 1rem;
  }
  header {
    padding: 0.8rem 0;
  }
  nav[aria-label="主导航"] ul {
    gap: 0.6rem;
  }
  nav[aria-label="主导航"] a {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
  #hero {
    padding: 3rem 1.5rem;
  }
  #hero h1 {
    font-size: 2rem;
  }
  #hero p {
    font-size: 1rem;
  }
  section {
    padding: 1.5rem 1rem;
    margin: 2rem 0;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.2rem;
  }
  .btn-primary, #hero a[href="#download"] {
    padding: 0.7rem 1.8rem;
    font-size: 1rem;
  }
  footer nav ul {
    gap: 1rem;
  }
}
@media (max-width: 480px) {
  #hero h1 {
    font-size: 1.6rem;
  }
  #hero p {
    font-size: 0.95rem;
  }
  section {
    padding: 1.2rem 0.8rem;
  }
  nav[aria-label="主导航"] ul {
    gap: 0.4rem;
  }
  nav[aria-label="主导航"] a {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
  }
}
/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: #1e293b;
  }
  ::-webkit-scrollbar-thumb {
    background: #475569;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
  }
}
/* ===== Selection ===== */
::selection {
  background: #3b82f6;
  color: #fff;
}
/* ===== Focus Styles ===== */
:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}
/* ===== Print ===== */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  section {
    box-shadow: none;
    break-inside: avoid;
  }
  nav, footer {
    display: none;
  }
}