:root {
  --blue-berry: #2b5cff;
  --blue-berry-deep: #1a3fcc;
  --blue-berry-soft: #5b82ff;
  --accent: #00d4aa;
  --accent-warm: #ff6b9d;
  --bg: #f5f7fc;
  --bg-alt: #ffffff;
  --bg-elevated: #ffffff;
  --text: #1a1f36;
  --text-soft: #4a5170;
  --text-muted: #8b91a8;
  --border: rgba(43, 92, 255, 0.12);
  --border-soft: rgba(26, 31, 54, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(26, 31, 54, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 31, 54, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 31, 54, 0.12);
  --shadow-glow: 0 8px 32px rgba(43, 92, 255, 0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --grad-banner: linear-gradient(135deg, #2b5cff 0%, #5b82ff 45%, #00d4aa 100%);
  --grad-text: linear-gradient(120deg, #2b5cff, #00d4aa);
  --grad-card: linear-gradient(160deg, rgba(255,255,255,0.9), rgba(245,247,252,0.6));
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue-berry: #4d78ff;
    --blue-berry-deep: #2b5cff;
    --blue-berry-soft: #6d92ff;
    --accent: #00e6b8;
    --accent-warm: #ff7fae;
    --bg: #0d1020;
    --bg-alt: #141830;
    --bg-elevated: #1a1f3a;
    --text: #eef1fa;
    --text-soft: #b8bfd8;
    --text-muted: #7a82a0;
    --border: rgba(77, 120, 255, 0.22);
    --border-soft: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(26, 31, 58, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --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 8px 32px rgba(77, 120, 255, 0.35);
    --grad-banner: linear-gradient(135deg, #1a2a6e 0%, #2b5cff 50%, #00b894 100%);
    --grad-card: linear-gradient(160deg, rgba(26,31,58,0.9), rgba(13,16,32,0.7));
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(43, 92, 255, 0.08), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 212, 170, 0.07), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(circle at 15% 20%, rgba(77, 120, 255, 0.12), transparent 45%),
      radial-gradient(circle at 85% 75%, rgba(0, 230, 184, 0.08), transparent 45%);
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-berry);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

ul {
  list-style: none;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue-berry), var(--accent));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--blue-berry-deep);
}

/* ===== HEADER ===== */
header {
  position: relative;
  z-index: 10;
  padding: 72px 24px 56px;
  text-align: center;
  background: var(--grad-banner);
  background-size: 200% 200%;
  animation: bannerFlow 14s ease infinite;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 212, 170, 0.22), transparent 45%);
  pointer-events: none;
}

header::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  animation: shimmer 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bannerFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes shimmer {
  0% { transform: translateX(-30%) rotate(8deg); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(30%) rotate(8deg); opacity: 0; }
}

header h1 {
  position: relative;
  z-index: 2;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  animation: fadeUp 0.8s ease both;
}

header > p {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto 40px;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.8;
  animation: fadeUp 0.8s ease 0.15s both;
}

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

/* ===== NAV ===== */
nav {
  position: relative;
  z-index: 2;
  animation: fadeUp 0.8s ease 0.3s both;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

nav li {
  display: inline-block;
}

nav a {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: inherit;
  transform: scale(0);
  transition: transform var(--transition);
}

nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

nav a:hover::after {
  transform: scale(1);
}

nav a:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===== MAIN ===== */
main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* ===== SECTION ===== */
section {
  margin-bottom: 56px;
  padding: 44px 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-text);
  opacity: 0;
  transition: opacity var(--transition);
}

section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

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

/* ===== TYPOGRAPHY ===== */
h2 {
  position: relative;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  padding-left: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 6px;
  height: 1.1em;
  background: var(--grad-text);
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(43, 92, 255, 0.4);
}

h3 {
  position: relative;
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin: 28px 0 12px;
  padding-left: 16px;
  transition: color var(--transition), transform var(--transition);
}

h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.15);
  transition: transform var(--transition), box-shadow var(--transition);
}

h3:hover {
  color: var(--blue-berry);
}

h3:hover::before {
  transform: translateY(-50%) scale(1.3);
  box-shadow: 0 0 0 6px rgba(0, 212, 170, 0.2);
}

p {
  color: var(--text-soft);
  margin-bottom: 14px;
  font-size: 0.98rem;
  line-height: 1.85;
}

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

/* ===== ARTICLE ===== */
article {
  position: relative;
  padding: 24px 24px 20px 28px;
  margin-bottom: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-text);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

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

article h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

article p {
  font-size: 0.92rem;
  margin-bottom: 10px;
}

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

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue-berry);
  position: relative;
  transition: gap var(--transition), color var(--transition);
}

article a::after {
  content: "→";
  transition: transform var(--transition);
}

article a:hover {
  color: var(--accent);
  gap: 10px;
}

article a:hover::after {
  transform: translateX(4px);
}

/* ===== FAQ ===== */
#faq h3 {
  margin-top: 0;
  padding: 18px 20px 18px 44px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
  cursor: pointer;
  transition: all var(--transition);
}

#faq h3::before {
  left: 20px;
  width: 10px;
  height: 10px;
  background: var(--grad-text);
  border-radius: 3px;
  transform: translateY(-50%) rotate(45deg);
  box-shadow: none;
}

#faq h3:hover {
  background: var(--bg);
  color: var(--blue-berry);
}

#faq h3:hover::before {
  transform: translateY(-50%) rotate(135deg);
  box-shadow: none;
}

#faq h3 + p {
  padding: 18px 20px;
  margin-top: 0;
  margin-bottom: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 0.94rem;
  transition: all var(--transition);
}

#faq h3 + p:hover {
  background: var(--bg);
}

/* ===== LISTS ===== */
section ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

section ul li {
  position: relative;
}

section ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

section ul li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad-text);
  transform: scaleY(0);
  transition: transform var(--transition);
}

section ul li a::after {
  content: "›";
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

section ul li a:hover {
  color: var(--blue-berry);
  background: var(--bg);
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

section ul li a:hover::before {
  transform: scaleY(1);
}

section ul li a:hover::after {
  transform: translateX(4px);
  color: var(--accent);
}

/* ===== CONTACT ===== */
#contact p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin-bottom: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  transition: all var(--transition);
}

#contact p:hover {
  background: var(--bg);
  border-color: var(--border);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

/* ===== HOWTO ===== */
#howto h3 {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 0.95rem;
  margin-top: 24px;
  padding-left: 36px;
}

#howto h3::before {
  left: 16px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.18);
}

#howto h3:hover {
  background: var(--bg);
  border-color: var(--accent);
}

#howto h3:hover::before {
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 0 0 5px rgba(0, 212, 170, 0.25);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  margin-top: 0;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-text);
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-soft);
}

footer p:last-child {
  margin-bottom: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* ===== SCROLL ANIMATIONS ===== */
section {
  opacity: 0;
  transform: translateY(40px);
  animation: sectionReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

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

@supports (animation-timeline: view()) {
  section {
    animation: sectionReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  main {
    padding: 48px 20px 64px;
  }

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

  header {
    padding: 56px 20px 44px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 60px;
  }

  body {
    font-size: 15px;
  }

  header {
    padding: 44px 16px 36px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  header h1 {
    font-size: 1.5rem;
    margin-bottom: 14px;
  }

  header > p {
    font-size: 0.9rem;
    margin-bottom: 28px;
  }

  nav ul {
    gap: 8px;
  }

  nav a {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  main {
    padding: 32px 14px 48px;
  }

  section {
    padding: 26px 18px;
    margin-bottom: 28px;
    border-radius: var(--radius-sm);
  }

  h2 {
    font-size: 1.25rem;
    padding-left: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
  }

  h2::before {
    width: 5px;
  }

  h3 {
    font-size: 1.02rem;
    margin: 22px 0 10px;
  }

  p {
    font-size: 0.92rem;
    line-height: 1.8;
  }

  article {
    padding: 18px 16px 16px 20px;
  }

  article:hover {
    transform: translateX(3px);
  }

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

  section ul li a {
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  #faq h3 {
    padding: 14px 16px 14px 38px;
    font-size: 0.98rem;
  }

  #faq h3::before {
    left: 16px;
    width: 8px;
    height: 8px;
  }

  #faq h3 + p {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

  #contact p {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  #howto h3 {
    padding: 7px 14px 7px 30px;
    font-size: 0.88rem;
  }

  #howto h3::before {
    left: 13px;
    width: 6px;
    height: 6px;
  }

  footer {
    padding: 36px 16px;
  }

  footer p {
    font-size: 0.84rem;
  }
}

@media (max-width: 380px) {
  nav a {
    padding: 7px 11px;
    font-size: 0.78rem;
  }

  section {
    padding: 22px 14px;
  }
}

/* ===== ACCESSIBILITY ===== */
@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;
  }

  section {
    opacity: 1;
    transform: none;
  }
}

a:focus-visible,
nav a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== PRINT ===== */
@media print {
  header {
    background: #fff !important;
    color: #000;
    box-shadow: none;
  }

  header h1,
  header > p,
  nav a {
    color: #000 !important;
    background: none !important;
    border: none;
    text-shadow: none;
  }

  section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
    opacity: 1;
    transform: none;
    animation: none;
  }

  body::before {
    display: none;
  }
}