:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(30, 30, 52, 0.72);
  --bg-card-solid: #1e1e34;
  --bg-elevated: #252547;
  --text-primary: #f0f0f5;
  --text-secondary: #b8b8cc;
  --text-muted: #8888a0;
  --accent: #e94560;
  --accent-hover: #ff5c77;
  --accent-soft: rgba(233, 69, 96, 0.12);
  --accent-glow: rgba(233, 69, 96, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(233, 69, 96, 0.4);
  --glass-bg: rgba(26, 26, 46, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px rgba(233, 69, 96, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-card-solid: #ffffff;
    --bg-elevated: #eef0f6;
    --text-primary: #1a1a2e;
    --text-secondary: #44445a;
    --text-muted: #77778e;
    --accent: #d63350;
    --accent-hover: #e94560;
    --accent-soft: rgba(214, 51, 80, 0.08);
    --accent-glow: rgba(214, 51, 80, 0.2);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(214, 51, 80, 0.35);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.14);
    --shadow-glow: 0 0 24px rgba(214, 51, 80, 0.12);
  }
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(233, 69, 96, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(15, 52, 96, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(233, 69, 96, 0.06), transparent 60%);
  pointer-events: none;
}

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

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

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

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

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.5em;
}

li::marker {
  color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.6rem;
}

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

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

small {
  font-size: 0.82rem;
  color: var(--text-muted);
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 0.15em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

blockquote {
  position: relative;
  margin: 1.2rem 0;
  padding: 1.4rem 1.6rem 1.4rem 3.2rem;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 1rem;
  top: 0.4rem;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
  font-family: Georgia, serif;
}

blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

blockquote p {
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  font-style: italic;
}

blockquote footer {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
}

header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.18);
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-brand > a {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8a9e 60%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position var(--transition);
}

.site-brand > a:hover {
  background-position: right center;
}

.site-slogan {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

header nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

main > section {
  margin: 2.5rem 0;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}

#hero {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.4rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(233, 69, 96, 0.18) 0%, rgba(15, 52, 96, 0.55) 45%, rgba(26, 26, 46, 0.9) 100%),
    var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(40px);
  animation: floatSlow 9s ease-in-out infinite;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 52, 96, 0.6), transparent 70%);
  filter: blur(50px);
  animation: floatSlow 11s ease-in-out infinite reverse;
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  -webkit-text-fill-color: var(--text-primary);
  background: none;
  color: var(--text-primary);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-lead {
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 78ch;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-top: 1.2rem;
}

#hero figure {
  margin: 2rem 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

#hero figure:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-lg);
}

#hero figcaption {
  padding: 0.9rem 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card-solid);
  border-top: 1px solid var(--border);
  text-align: center;
}

#page-anchor-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}

#page-anchor-nav h2 {
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}

#page-anchor-nav h2::after {
  width: 40px;
}

#page-anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

#page-anchor-nav li {
  margin: 0;
}

#page-anchor-nav a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

#page-anchor-nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

#breadcrumb {
  margin: 1.5rem 0 0;
  padding: 0.7rem 1.2rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
}

#breadcrumb li {
  margin: 0;
  color: var(--text-muted);
}

#breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-muted);
  opacity: 0.6;
}

#breadcrumb a {
  color: var(--text-secondary);
}

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

#breadcrumb [aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

main > section article {
  position: relative;
  margin: 1.2rem 0;
  padding: 1.3rem 1.5rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

main > section article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

main > section article h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
}

main > section article h3 a {
  color: var(--text-primary);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--transition), color var(--transition);
}

main > section article h3 a:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

main > section article p {
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}

main > section article > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.3rem 0;
}

main > section article > a:last-child::after {
  content: "\2192";
  transition: transform var(--transition);
}

main > section article > a:last-child:hover::after {
  transform: translateX(4px);
}

#articles > p {
  margin-bottom: 1.4rem;
  padding: 0.9rem 1.2rem;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#testimonials blockquote {
  margin: 1rem 0;
}

#contact ul,
#about-us ul,
#sitemap ul,
#friend-links ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

#contact li,
#about-us li {
  padding: 0.6rem 0.9rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background var(--transition), transform var(--transition);
}

#contact li:hover,
#about-us li:hover {
  background: var(--accent-soft);
  transform: translateX(4px);
}

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

#sitemap li,
#friend-links li {
  margin: 0;
}

#sitemap a,
#friend-links a {
  display: block;
  padding: 0.6rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap a:hover,
#friend-links a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

#faq h3 {
  padding: 0.9rem 1.1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  transition: background var(--transition);
}

#faq h3:hover {
  background: var(--accent-soft);
}

#faq h3 + p {
  padding: 0 1.1rem 0.6rem;
  font-size: 0.92rem;
}

#howto ol,
#howto ul {
  background: var(--bg-elevated);
  padding: 1rem 1rem 1rem 2.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

#howto ol li,
#howto ul li {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

#knowledge h3 {
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  margin-top: 1.4rem;
}

footer[role="contentinfo"] {
  margin-top: 3rem;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 2rem;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border);
  position: relative;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

footer[role="contentinfo"] > section {
  max-width: var(--max-width);
  margin: 0 auto 1.6rem;
  padding: 1.4rem clamp(1.2rem, 3vw, 2rem);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

footer[role="contentinfo"] > section:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

footer[role="contentinfo"] h2 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

footer[role="contentinfo"] h2::after {
  width: 36px;
  height: 2px;
}

footer[role="contentinfo"] p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

footer[role="contentinfo"] > p {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

footer[role="contentinfo"] > p small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 999px;
  border: 2px solid var(--bg-primary);
}

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

@media (max-width: 900px) {
  header[role="banner"] {
    padding: 0.7rem 1rem;
  }

  header nav ul {
    gap: 0.1rem;
  }

  header nav a {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  #hero {
    margin-top: 1.4rem;
  }
}

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

  html {
    scroll-padding-top: 130px;
  }

  header[role="banner"] {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
  }

  .site-brand > a {
    font-size: 1.25rem;
  }

  header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    width: max-content;
    padding-bottom: 0.2rem;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    background: var(--bg-elevated);
  }

  main > section {
    margin: 1.4rem 0;
    padding: 1.2rem 1rem;
    border-radius: var(--radius-md);
  }

  #hero {
    padding: 1.6rem 1.1rem;
    border-radius: var(--radius-lg);
  }

  #hero figure {
    margin-top: 1.4rem;
  }

  blockquote {
    padding: 1.1rem 1rem 1.1rem 2.4rem;
  }

  blockquote::before {
    font-size: 2.2rem;
    left: 0.7rem;
  }

  main > section article {
    padding: 1rem 1.1rem;
  }

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

  footer[role="contentinfo"] > section {
    padding: 1.1rem 1rem;
  }
}

@media (max-width: 380px) {
  body {
    font-size: 14px;
  }

  #page-anchor-nav a {
    font-size: 0.76rem;
    padding: 0.3rem 0.7rem;
  }
}

@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 {
  body::before,
  header[role="banner"],
  #page-anchor-nav,
  #breadcrumb,
  footer[role="contentinfo"]::before {
    display: none;
  }

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

  main > section,
  main > section article,
  blockquote {
    box-shadow: none;
    border: 1px solid #ddd;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
    animation: none;
  }
}