:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4834d4;
  --secondary: #fd79a8;
  --accent: #00cec9;
  --bg: #f8f9fe;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --border: rgba(108, 92, 231, 0.12);
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.1);
  --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #6c5ce7 100%);
  --gradient-primary: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --gradient-accent: linear-gradient(135deg, #fd79a8, #e84393);
  --gradient-card: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(162, 155, 254, 0.03));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --primary: #a29bfe;
  --primary-light: #6c5ce7;
  --primary-dark: #4834d4;
  --secondary: #fd79a8;
  --accent: #00cec9;
  --bg: #0f0f1a;
  --bg-alt: #1a1a2e;
  --bg-card: rgba(30, 30, 50, 0.75);
  --bg-glass: rgba(30, 30, 50, 0.55);
  --text: #e8e8f0;
  --text-secondary: #b0b0c8;
  --text-muted: #707090;
  --border: rgba(162, 155, 254, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.25);
  --gradient-banner: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 30%, #16213e 60%, #6c5ce7 100%);
  --gradient-card: linear-gradient(135deg, rgba(162, 155, 254, 0.08), rgba(108, 92, 231, 0.04));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #a29bfe;
    --primary-light: #6c5ce7;
    --primary-dark: #4834d4;
    --secondary: #fd79a8;
    --accent: #00cec9;
    --bg: #0f0f1a;
    --bg-alt: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.75);
    --bg-glass: rgba(30, 30, 50, 0.55);
    --text: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #707090;
    --border: rgba(162, 155, 254, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.25);
    --gradient-banner: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 30%, #16213e 60%, #6c5ce7 100%);
    --gradient-card: linear-gradient(135deg, rgba(162, 155, 254, 0.08), rgba(108, 92, 231, 0.04));
  }
}

*,
*::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);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(253, 121, 168, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

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

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

a:hover {
  color: var(--primary-dark);
  opacity: 0.85;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-primary);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-bottom: 0.75rem;
}

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

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

blockquote {
  margin: 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

blockquote p {
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

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

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

address {
  font-style: normal;
}

details {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

details:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(108, 92, 231, 0.25);
}

details[open] {
  border-color: var(--primary-light);
}

details summary {
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  transition: background var(--transition);
  position: relative;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition), background var(--transition);
}

details[open] summary::before {
  content: "−";
  transform: rotate(180deg);
}

details summary:hover {
  background: var(--gradient-card);
}

details p {
  padding: 0 1.5rem 1.25rem 1.5rem;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

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(--border);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

header:hover {
  box-shadow: 0 4px 24px rgba(108, 92, 231, 0.08);
}

header nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header nav > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}

header nav a[aria-label="哔咔哔咔漫画网首页"] {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

header nav a[aria-label="哔咔哔咔漫画网首页"]:hover {
  transform: scale(1.03);
  opacity: 1;
}

header nav svg {
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.2);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}

header nav ul li a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition), left var(--transition);
  border-radius: 1px;
}

header nav ul li a:hover {
  color: var(--primary);
  background: var(--gradient-card);
  opacity: 1;
}

header nav ul li a:hover::after {
  width: 60%;
  left: 20%;
}

header nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
  line-height: 1;
}

header nav button:hover {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  transform: rotate(15deg) scale(1.08);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.35);
}

header nav button:active {
  transform: rotate(15deg) scale(0.95);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

section {
  margin-bottom: 3.5rem;
  animation: fadeInUp 0.7s ease both;
}

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; }
section:nth-child(16) { animation-delay: 0.75s; }
section:nth-child(17) { animation-delay: 0.8s; }
section:nth-child(18) { animation-delay: 0.85s; }

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

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

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(108, 92, 231, 0); }
}

#home {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  background: var(--gradient-banner);
  color: #fff;
  box-shadow: 0 20px 60px rgba(26, 26, 46, 0.25);
  animation: fadeInUp 0.7s ease both;
}

#home::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(162, 155, 254, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

#home::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 121, 168, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

#home h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

#home > p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 800px;
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

#home > div:nth-of-type(1) {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition), box-shadow var(--transition);
}

#home > div:nth-of-type(1):hover {
  transform: scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

#home > div:nth-of-type(1) svg {
  width: 100%;
  height: auto;
  display: block;
}

#home > div:nth-of-type(2) {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

#home > div:nth-of-type(2) > div {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  cursor: default;
}

#home > div:nth-of-type(2) > div:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

#home > div:nth-of-type(2) > div strong {
  display: block;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: #fff;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, #fff, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#home > div:nth-of-type(2) > div span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

#home form[role="search"] {
  display: flex;
  gap: 0.5rem;
  max-width: 600px;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: box-shadow var(--transition), border-color var(--transition);
}

#home form[role="search"]:focus-within {
  border-color: rgba(162, 155, 254, 0.6);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}

#home form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

#home form[role="search"] input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: background var(--transition);
  min-width: 0;
}

#home form[role="search"] input::placeholder {
  color: var(--text-muted);
}

#home form[role="search"] input:focus {
  background: #fff;
}

#home form[role="search"] button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

#home form[role="search"] button:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(253, 121, 168, 0.4);
}

#home form[role="search"] button:active {
  transform: scale(0.97);
}

nav[aria-label="面包屑导航"] {
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

nav[aria-label="面包屑导航"] ol li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

nav[aria-label="面包屑导航"] ol li:not(:last-child)::after {
  content: "›";
  color: var(--text-muted);
  font-size: 1.1rem;
}

nav[aria-label="面包屑导航"] ol li a {
  color: var(--primary);
  font-weight: 500;
}

nav[aria-label="面包屑导航"] ol li[aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 600;
}

section > article {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

section > article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

section > article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(108, 92, 231, 0.2);
}

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

section > article h3 {
  color: var(--text);
  margin-bottom: 0.85rem;
  transition: color var(--transition);
}

section > article:hover h3 {
  color: var(--primary);
}

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

section > article a[aria-label^="阅读全文"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
}

section > article a[aria-label^="阅读全文"]:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.35);
  opacity: 1;
  color: #fff;
}

section > article a[aria-label^="阅读全文"]::after {
  content: "→";
  transition: transform var(--transition);
}

section > article a[aria-label^="阅读全文"]:hover::after {
  transform: translateX(3px);
}

#testimonials blockquote {
  margin-bottom: 1rem;
}

#faq details {
  border-left: 3px solid transparent;
}

#faq details[open] {
  border-left-color: var(--primary);
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0 0.75rem 3rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), padding-left var(--transition);
  border-radius: var(--radius-sm);
}

#howto ol li:last-child {
  border-bottom: none;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}

#howto ol li:hover {
  background: var(--gradient-card);
  padding-left: 3.25rem;
}

#howto ol li:hover::before {
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

#contact address {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

#contact address:hover {
  box-shadow: var(--shadow-hover);
}

#contact address p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 0;
  font-size: 0.95rem;
}

#contact address p:last-child {
  border-bottom: none;
}

#contact address strong {
  min-width: 90px;
  color: var(--primary);
}

#contact > div {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

#contact > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#sitemap ul li a::before,
#links ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left var(--transition);
  z-index: -1;
  border-radius: var(--radius-sm);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
  opacity: 1;
}

#sitemap ul li a:hover::before,
#links ul li a:hover::before {
  left: 0;
}

footer[role="contentinfo"] {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  margin-top: 2rem;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
}

footer[role="contentinfo"] > div {
  max-width: 1280px;
  margin: 0 auto 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

footer[role="contentinfo"] > div:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

footer[role="contentinfo"] > div:first-child {
  text-align: center;
  padding-bottom: 2rem;
}

footer[role="contentinfo"] > div:first-child h2 {
  display: inline-block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

footer[role="contentinfo"] > div:first-child h2::after {
  display: none;
}

footer[role="contentinfo"] > div:first-child p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

footer[role="contentinfo"] h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  position: relative;
  padding-left: 0.85rem;
}

footer[role="contentinfo"] h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--gradient-primary);
}

footer[role="contentinfo"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

footer[role="contentinfo"] ul li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition), transform var(--transition);
  display: inline-block;
}

footer[role="contentinfo"] ul li a:hover {
  color: var(--primary);
  transform: translateX(3px);
  opacity: 1;
}

footer[role="contentinfo"] p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

@media (max-width: 1024px) {
  header nav ul {
    gap: 0.15rem;
  }

  header nav ul li a {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 860px) {
  header nav > div {
    min-height: 56px;
  }

  header nav ul {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul li a {
    white-space: nowrap;
    font-size: 0.85rem;
  }

  #home {
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
  }

  #home > div:nth-of-type(2) {
    grid-template-columns: repeat(2, 1fr);
  }

  #home form[role="search"] {
    flex-direction: column;
  }

  #home form[role="search"] button {
    width: 100%;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  section > article {
    padding: 1.25rem;
  }

  h2::after {
    width: 40px;
    height: 3px;
  }

  footer[role="contentinfo"] {
    padding: 2rem 1rem 1.5rem;
  }

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

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

  #home {
    padding: 1.5rem 1rem;
  }

  #home > div:nth-of-type(2) {
    gap: 0.6rem;
  }

  #home > div:nth-of-type(2) > div {
    padding: 1rem 0.5rem;
  }

  #home > div:nth-of-type(2) > div strong {
    font-size: 1.1rem;
  }

  #home > div:nth-of-type(2) > div span {
    font-size: 0.78rem;
  }

  section > article {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  details summary {
    padding: 1rem 1.1rem;
    font-size: 0.95rem;
  }

  details p {
    padding: 0 1.1rem 1rem 1.1rem;
    font-size: 0.9rem;
  }

  blockquote {
    padding: 1.1rem;
  }

  #contact address {
    padding: 1.25rem;
  }

  #contact address p {
    flex-direction: column;
    gap: 0.1rem;
  }

  #contact > div {
    padding: 1.25rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }

  #howto ol li {
    padding-left: 2.5rem;
    font-size: 0.92rem;
  }

  #howto ol li::before {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
  }
}

@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,
  #home form,
  nav[aria-label="面包屑导航"] {
    display: none;
  }

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

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