:root {
  --primary: #1f6feb;
  --primary-light: #4a90f7;
  --primary-dark: #0d47a1;
  --accent: #ff6b9d;
  --accent-light: #ff9ec4;
  --accent-dark: #e84a7f;
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --bg-glass-border: rgba(255, 255, 255, 0.6);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --border: rgba(31, 111, 235, 0.12);
  --shadow-sm: 0 2px 8px rgba(31, 111, 235, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 111, 235, 0.1);
  --shadow-lg: 0 16px 48px rgba(31, 111, 235, 0.14);
  --shadow-glow: 0 0 40px rgba(31, 111, 235, 0.15);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #58a6ff;
    --primary-light: #79b8ff;
    --primary-dark: #1f6feb;
    --accent: #ff8ab8;
    --accent-light: #ffb3d1;
    --accent-dark: #e84a7f;
    --bg: #0d1117;
    --bg-alt: #161b22;
    --bg-card: rgba(22, 27, 34, 0.78);
    --bg-glass: rgba(22, 27, 34, 0.6);
    --bg-glass-border: rgba(88, 166, 255, 0.15);
    --text: #e6edf3;
    --text-secondary: #b0b8c4;
    --text-muted: #6e7681;
    --border: rgba(88, 166, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(88, 166, 255, 0.12);
  }
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(31, 111, 235, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 107, 157, 0.06), transparent);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

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

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bg-glass-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), background var(--transition);
}

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

header nav > a:first-child {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity var(--transition-fast);
}

header nav > a:first-child::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

header nav > a:first-child:hover::after {
  transform: scaleX(1);
}

header nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

header nav ul li a {
  display: block;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(31, 111, 235, 0.08);
  transform: translateY(-1px);
}

header nav ul li a:active {
  transform: translateY(0) scale(0.97);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

main > article > h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 48px 0 24px;
  padding: 48px 40px;
  background:
    linear-gradient(135deg, rgba(31, 111, 235, 0.9), rgba(255, 107, 157, 0.85)),
    linear-gradient(135deg, var(--primary), var(--accent));
  background-blend-mode: overlay;
  border-radius: var(--radius-xl);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: bannerFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

main > article > h1::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

main > article > h1::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

@keyframes bannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

main > article > p:first-of-type {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  padding: 24px 28px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  animation: fadeInUp 0.7s 0.15s cubic-bezier(0.4, 0, 0.2, 1) both;
}

section {
  margin-bottom: 32px;
  padding: 32px 28px;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(31, 111, 235, 0.2);
}

section:nth-child(2) { animation-delay: 0.05s; }
section:nth-child(3) { animation-delay: 0.1s; }
section:nth-child(4) { animation-delay: 0.15s; }
section:nth-child(5) { animation-delay: 0.2s; }
section:nth-child(6) { animation-delay: 0.25s; }
section:nth-child(7) { animation-delay: 0.3s; }
section:nth-child(8) { animation-delay: 0.35s; }
section:nth-child(9) { animation-delay: 0.4s; }
section:nth-child(10) { animation-delay: 0.45s; }
section:nth-child(11) { animation-delay: 0.5s; }
section:nth-child(12) { animation-delay: 0.55s; }
section:nth-child(13) { animation-delay: 0.6s; }
section:nth-child(14) { animation-delay: 0.65s; }
section:nth-child(15) { animation-delay: 0.7s; }

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

section h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  position: relative;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width var(--transition);
}

section:hover h2::after {
  width: 120px;
}

section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}

section h3:first-of-type {
  margin-top: 8px;
}

section p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

section p:last-child {
  margin-bottom: 0;
}

section p a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

section p a:hover {
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
}

section ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

section ul li {
  margin: 0;
}

section ul li a {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: rgba(31, 111, 235, 0.04);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

section ul li a::before {
  content: "→";
  position: absolute;
  left: -20px;
  opacity: 0;
  transition: all var(--transition-fast);
}

section ul li a:hover {
  color: var(--primary);
  background: rgba(31, 111, 235, 0.1);
  border-color: rgba(31, 111, 235, 0.2);
  transform: translateX(4px);
  padding-left: 28px;
}

section ul li a:hover::before {
  left: 10px;
  opacity: 1;
}

section article {
  padding: 16px 18px;
  margin-bottom: 10px;
  background: rgba(31, 111, 235, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

section article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

section article:hover {
  background: rgba(31, 111, 235, 0.06);
  border-color: rgba(31, 111, 235, 0.2);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

section article:hover::before {
  transform: scaleY(1);
}

section article h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  padding-left: 0;
}

section article h3::before {
  display: none;
}

section article p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.7;
}

section#faq h3 {
  padding: 14px 18px;
  background: rgba(31, 111, 235, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: 16px 0 0;
  padding-left: 18px;
  cursor: default;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

section#faq h3::before {
  display: none;
}

section#faq h3::after {
  content: "?";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 50%;
  opacity: 0.6;
}

section#faq h3:hover {
  background: rgba(31, 111, 235, 0.08);
  border-color: rgba(31, 111, 235, 0.2);
}

section#faq h3 + p {
  padding: 14px 18px;
  margin: 0 0 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.9rem;
}

section#howto h3 {
  margin-top: 20px;
}

section#howto p {
  padding-left: 14px;
  border-left: 2px solid var(--border);
  margin-left: 2px;
}

section#contact p {
  line-height: 2.2;
  font-size: 0.95rem;
}

section#contact p strong {
  color: var(--text);
}

section#sitemap ul,
section#links ul {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

section#links ul li a {
  background: rgba(255, 107, 157, 0.04);
}

section#links ul li a:hover {
  color: var(--accent);
  background: rgba(255, 107, 157, 0.1);
  border-color: rgba(255, 107, 157, 0.2);
}

section#legal h2 {
  font-size: 1.15rem;
  margin-top: 24px;
}

section#legal h2:first-of-type {
  margin-top: 0;
}

section#eeat {
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.06), rgba(255, 107, 157, 0.04));
  border-color: rgba(31, 111, 235, 0.15);
}

section#eeat h2::after {
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

footer {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--bg-glass-border);
  padding: 32px 24px;
  text-align: center;
  margin-top: 40px;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

footer nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

footer nav a {
  display: inline-block;
  padding: 8px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: rgba(31, 111, 235, 0.04);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

footer nav a:hover {
  color: var(--primary);
  background: rgba(31, 111, 235, 0.1);
  border-color: rgba(31, 111, 235, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

footer nav a:active {
  transform: translateY(0) scale(0.97);
}

@media (max-width: 900px) {
  header nav {
    padding: 0 16px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 8px;
  }

  header nav ul {
    gap: 2px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul li a {
    padding: 5px 10px;
    font-size: 0.8rem;
  }

  main {
    padding: 0 16px 60px;
  }

  main > article > h1 {
    margin: 28px 0 20px;
    padding: 32px 22px;
    border-radius: var(--radius-lg);
  }

  main > article > p:first-of-type {
    padding: 18px 20px;
    font-size: 0.95rem;
  }

  section {
    padding: 24px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }

  section h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  section h3 {
    font-size: 1rem;
    margin: 18px 0 8px;
  }

  section ul {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  section ul li a {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  section article {
    padding: 12px 14px;
  }

  section article h3 {
    font-size: 0.92rem;
  }

  section article p {
    font-size: 0.82rem;
  }

  section#faq h3 {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  section#faq h3::after {
    right: 14px;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  section#faq h3 + p {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  footer {
    padding: 24px 16px;
  }

  footer nav {
    gap: 6px;
  }

  footer nav a {
    padding: 7px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  header nav {
    padding: 8px 12px;
  }

  header nav > a:first-child {
    font-size: 1.15rem;
  }

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

  main {
    padding: 0 12px 48px;
  }

  main > article > h1 {
    margin: 20px 0 16px;
    padding: 24px 16px;
    font-size: 1.35rem;
    border-radius: var(--radius-md);
  }

  main > article > p:first-of-type {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
  }

  section {
    padding: 18px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  section h2 {
    font-size: 1.1rem;
  }

  section h3 {
    font-size: 0.95rem;
  }

  section p {
    font-size: 0.88rem;
  }

  section ul {
    grid-template-columns: 1fr;
  }

  section ul li a {
    padding: 8px 12px;
  }

  section article {
    padding: 10px 12px;
  }

  section#faq h3 {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  section#faq h3 + p {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  footer {
    padding: 20px 12px;
  }

  footer p {
    font-size: 0.78rem;
  }

  footer nav a {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  header, footer, section#links, section#sitemap {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    box-shadow: none;
    border: 1px solid #ddd;
    backdrop-filter: none;
    break-inside: avoid;
  }

  main > article > h1 {
    background: #f0f0f0;
    color: #000;
    box-shadow: none;
    text-shadow: none;
  }
}