:root {
  --primary: #e94560;
  --secondary: #f5c542;
  --accent: #533483;
  --bg: #f8f9fc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border: rgba(26, 26, 46, 0.08);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 28px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --gradient-primary: linear-gradient(135deg, #e94560 0%, #533483 100%);
  --gradient-warm: linear-gradient(135deg, #f5c542 0%, #e94560 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0d0d1a;
  --bg-alt: #14142b;
  --surface: #1a1a33;
  --surface-glass: rgba(26, 26, 51, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8f0;
  --text-secondary: #b0b0cc;
  --text-muted: #7070a0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --gradient-glass: linear-gradient(135deg, rgba(26,26,51,0.9), rgba(26,26,51,0.6));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

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

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(--secondary);
}

ul, ol {
  list-style: none;
}

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

h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-size: clamp(1rem, 2vw, 1.15rem); }

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

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

time {
  color: var(--text-muted);
  font-size: 0.875em;
}

blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

blockquote p {
  margin-bottom: 0;
  font-style: italic;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== 顶部导航 ==================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-area a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-area svg {
  border-radius: 12px;
  transition: transform var(--transition);
}

.logo-area a:hover svg {
  transform: rotate(-6deg) scale(1.08);
}

.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  display: block;
  padding: 0.4rem 0.85rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(233, 69, 96, 0.08);
}

.main-nav a:hover::after {
  width: 60%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.mobile-menu-btn:hover {
  background: rgba(233, 69, 96, 0.08);
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.dark-mode-toggle:hover {
  background: rgba(233, 69, 96, 0.08);
  color: var(--primary);
  transform: rotate(20deg);
}

/* ==================== 搜索栏 ==================== */
.search-bar {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 20px;
}

.search-bar form {
  display: flex;
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.search-bar form:focus-within {
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15), var(--shadow-md);
  border-color: var(--primary);
}

.search-bar input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: opacity var(--transition);
}

.search-bar button:hover {
  opacity: 0.85;
}

/* ==================== 面包屑 ==================== */
.breadcrumb {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0 20px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.breadcrumb li {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

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

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

.breadcrumb a:hover {
  color: var(--primary);
}

/* ==================== Banner轮播 ==================== */
.hero-section {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 20px;
}

.banner-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--gradient-hero);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
  transform: scale(1.04);
}

.slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.slide svg {
  width: 100%;
  height: auto;
  display: block;
}

.slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 5;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition);
}

.slider-dots .dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.slider-dots .dot.active {
  width: 28px;
  border-radius: 6px;
  background: var(--secondary);
}

/* ==================== 通用 Section ==================== */
.section {
  padding: 4rem 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

.section h2 {
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

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

.section h3 {
  margin: 2rem 0 0.85rem;
  color: var(--text);
}

.section h3:first-of-type {
  margin-top: 0;
}

.section h4 {
  margin: 1.25rem 0 0.5rem;
  color: var(--primary);
}

.section p {
  max-width: 78ch;
}

/* ==================== 首屏介绍 ==================== */
.intro-section {
  padding-top: 3rem;
}

.intro-lead {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  padding: 1.5rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.stat-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-number {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==================== 品牌介绍 ==================== */
.about-section .container {
  max-width: 900px;
}

/* ==================== 产品优势 ==================== */
.products-section .container {
  max-width: 900px;
}

.products-section h4 {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  background: rgba(233, 69, 96, 0.1);
  border-radius: var(--radius-sm);
}

/* ==================== 解决方案 ==================== */
.solutions-section .container {
  max-width: 900px;
}

/* ==================== 客户案例 ==================== */
.cases-section .container {
  max-width: 900px;
}

.cases-section blockquote {
  margin: 1rem 0;
  transition: transform var(--transition), box-shadow var(--transition);
}

.cases-section blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

/* ==================== 新闻中心 ==================== */
.news-section .container {
  max-width: 900px;
}

.news-section h3 {
  padding-left: 1rem;
  border-left: 3px solid var(--secondary);
}

/* ==================== 技术文章 ==================== */
.articles-section .container {
  max-width: 900px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 69, 96, 0.25);
}

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

.article-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--primary);
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.article-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap var(--transition), color var(--transition);
}

.read-more:hover {
  gap: 0.6rem;
  color: var(--secondary);
}

/* ==================== HowTo 教程 ==================== */
.howto-section .container {
  max-width: 900px;
}

.howto-section ol {
  counter-reset: step;
  margin: 1rem 0;
}

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

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

.howto-section ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.howto-section ol li:hover {
  background: rgba(233, 69, 96, 0.04);
  padding-left: 3.25rem;
  border-radius: var(--radius-sm);
}

/* ==================== FAQ ==================== */
.faq-section .container {
  max-width: 900px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 69, 96, 0.25);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background var(--transition), color var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-item summary:hover {
  background: rgba(233, 69, 96, 0.05);
  color: var(--primary);
}

.faq-item p {
  padding: 0 1.35rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  animation: fadeSlideIn 0.35s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== 联系我们 ==================== */
.contact-section .container {
  max-width: 1000px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.contact-item h3 {
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border);
  font-size: 1.1rem;
}

.contact-item p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ==================== 网站地图 ==================== */
.sitemap-section .container {
  max-width: 1000px;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.sitemap-grid > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.sitemap-grid > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sitemap-grid h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--primary);
}

.sitemap-grid ul li {
  margin-bottom: 0.5rem;
}

.sitemap-grid ul a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: inline-block;
  transition: transform var(--transition), color var(--transition);
}

.sitemap-grid ul a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

/* ==================== 友情链接 ==================== */
.links-section .container {
  max-width: 1000px;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.friend-links a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.friend-links a:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

/* ==================== 页脚 ==================== */
#site-footer {
  background: var(--gradient-hero);
  color: #c8c8dc;
  padding: 3.5rem 0 2rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.15), transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.5rem;
}

.footer-brand svg {
  border-radius: 10px;
}

.footer-info p {
  color: #a0a0c0;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1.5rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal a {
  color: #a0a0c0;
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--secondary);
}

.footer-security,
.footer-update {
  font-size: 0.82rem;
  color: #8080a0;
  margin-bottom: 0.4rem;
}

.footer-update {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-update time {
  color: #a0a0c0;
}

/* ==================== 返回顶部 ==================== */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all var(--transition);
  z-index: 999;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 32px rgba(233, 69, 96, 0.55);
}

/* ==================== 滚动动画 ==================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 响应式布局 ==================== */
@media (max-width: 1024px) {
  .main-nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid,
  .sitemap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .mobile-menu-btn {
    display: flex;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
    z-index: 999;
  }

  .main-nav.open {
    max-height: 480px;
    padding: 1rem 20px 1.5rem;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  .main-nav a::after {
    display: none;
  }

  .section {
    padding: 2.5rem 0;
  }

  .banner-slider {
    border-radius: var(--radius-lg);
  }

  .slider-dots {
    bottom: 12px;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .stat-item {
    padding: 1.15rem 0.75rem;
  }

  .contact-grid,
  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    padding: 1.35rem;
  }

  .howto-section ol li {
    padding-left: 2.75rem;
  }

  .faq-item summary {
    padding: 1rem 1.1rem;
    font-size: 0.95rem;
  }

  .faq-item p {
    padding: 0 1.1rem 1.1rem;
  }

  #back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  .footer-legal {
    gap: 0.85rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .search-bar {
    padding: 0 16px;
  }

  .breadcrumb {
    padding: 0 16px;
  }

  .hero-section {
    padding: 0 16px;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .intro-lead {
    padding: 1.15rem;
    font-size: 0.98rem;
  }

  .friend-links {
    gap: 0.5rem;
  }

  .friend-links a {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
  }

  blockquote {
    padding: 0.65rem 1rem;
  }
}

/* ==================== 无障碍与动效偏好 ==================== */
@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(233, 69, 96, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==================== 打印样式 ==================== */
@media print {
  #site-header,
  .search-bar,
  #back-to-top,
  .slider-dots,
  #site-footer {
    display: none;
  }

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

  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}