:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --primary-light: #ff6b7a;
  --secondary: #1d3557;
  --accent: #2a9d8f;
  --accent-warm: #f4a261;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --border: #e8e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 8px 32px rgba(230, 57, 70, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --primary: #ff6b7a;
  --primary-dark: #e63946;
  --primary-light: #ff8a95;
  --secondary: #a8c0e8;
  --accent: #4ecdc4;
  --accent-warm: #f4a261;
  --bg: #0f0f1a;
  --bg-alt: #16162a;
  --bg-card: #1c1c34;
  --text: #eaeaf2;
  --text-secondary: #b0b0c8;
  --text-muted: #707090;
  --border: #2a2a44;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 32px rgba(255, 107, 122, 0.2);
  --glass-bg: rgba(28, 28, 52, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
  -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(--primary-dark);
  opacity: 0.9;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

.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 24px;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  opacity: 1;
}

.logo svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.logo:hover svg {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--accent-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

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

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.site-search {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0 4px 0 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
  background: var(--bg-card);
}

.site-search input {
  width: 180px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
}

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

.site-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.site-search button:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.1);
}

#theme-toggle,
#mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

#theme-toggle:hover,
#mobile-menu-btn:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.08);
  transform: translateY(-1px);
}

#mobile-menu-btn {
  display: none;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideDown 0.3s ease;
}

.mobile-nav ul {
  padding: 12px 24px 20px;
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.mobile-nav a:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.08);
}

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

/* ============ Breadcrumb ============ */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 6px;
  color: var(--text-muted);
}

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

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

.breadcrumb [aria-current="page"] {
  color: var(--text-muted);
}

/* ============ Hero Banner ============ */
.hero-banner {
  position: relative;
  max-width: 1200px;
  margin: 20px auto 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 1;
  background: var(--secondary);
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.banner-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.banner-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: all var(--transition);
  position: relative;
}

.banner-dots button::after {
  content: "";
  position: absolute;
  inset: -6px;
}

.banner-dots button.active {
  width: 28px;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.banner-dots button:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* ============ Intro Section ============ */
.intro-section {
  padding: 60px 0 20px;
}

.intro-section h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .intro-section h1 {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-lead {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 900px;
  margin-bottom: 40px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-warm));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

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

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

.stat-number {
  display: block;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ============ Section Base ============ */
.section {
  padding: 64px 0;
}

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

.section h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 24px;
  color: var(--text);
  position: relative;
  padding-left: 18px;
}

.section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent-warm));
}

.section h3 {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  margin: 32px 0 12px;
  color: var(--text);
}

.section h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}

.section p {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.section ul:not(.sitemap-list):not(.friend-links) {
  margin: 12px 0 20px;
  padding-left: 0;
}

.section ul:not(.sitemap-list):not(.friend-links) li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.section ul:not(.sitemap-list):not(.friend-links) li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-warm));
}

.section ul li strong {
  color: var(--text);
  font-weight: 600;
}

.section ol {
  counter-reset: item;
  margin: 12px 0 20px;
}

.section ol li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  counter-increment: item;
}

.section ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.section ol li strong {
  color: var(--text);
  font-weight: 600;
}

/* ============ Author Info ============ */
.author-info {
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  border-left: 4px solid var(--accent);
}

.author-info h4 {
  margin-top: 0;
  color: var(--accent);
}

.author-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.author-info p:last-child {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.85;
}

/* ============ News ============ */
.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 20px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.news-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent-warm));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

.news-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.news-item:hover::after {
  transform: scaleY(1);
}

.news-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.news-item h3 a {
  color: var(--text);
  transition: color var(--transition);
}

.news-item h3 a:hover {
  color: var(--primary);
}

.news-item time {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.news-item p {
  margin-bottom: 14px;
}

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

.read-more:hover {
  gap: 8px;
  color: var(--primary-dark);
}

/* ============ Article Cards ============ */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 18px;
  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;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-warm), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

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

.article-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

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

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

.article-card time {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-card p {
  font-size: 14.5px;
  margin-bottom: 14px;
}

/* ============ FAQ ============ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item:hover {
  border-color: rgba(230, 57, 70, 0.3);
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

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

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 400;
  color: var(--primary);
  background: rgba(230, 57, 70, 0.1);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--primary);
  color: #fff;
  transform: rotate(180deg);
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-answer {
  padding: 0 22px 20px;
  animation: fadeIn 0.35s ease;
}

.faq-answer p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0;
}

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

/* ============ Blockquote ============ */
blockquote {
  position: relative;
  margin: 20px 0;
  padding: 22px 28px 22px 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 8px;
  font-size: 48px;
  line-height: 1;
  color: var(--primary);
  opacity: 0.35;
  font-family: Georgia, serif;
}

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

blockquote p {
  font-size: 15px;
  font-style: italic;
  color: var(--text-secondary);
  margin: 0;
}

/* ============ Sitemap & Links ============ */
.sitemap-list,
.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
}

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

.sitemap-list a,
.friend-links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition);
}

.sitemap-list a:hover,
.friend-links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  opacity: 1;
}

.friend-links a {
  color: var(--text-muted);
  font-size: 13px;
}

/* ============ Footer ============ */
footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 0;
  margin-top: 0;
}

[data-theme="dark"] footer {
  background: #0a0a14;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent-warm));
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition), padding-left var(--transition);
}

.footer-col ul a:hover {
  color: var(--accent-warm);
  padding-left: 4px;
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.footer-bottom p:last-child {
  margin-bottom: 0;
}

/* ============ Back to Top ============ */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), box-shadow var(--transition);
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 36px rgba(230, 57, 70, 0.45);
}

/* ============ Scroll Animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  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);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }

  #mobile-menu-btn {
    display: flex;
  }

  .mobile-nav:not([hidden]) {
    display: block;
  }

  .site-search input {
    width: 140px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

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

  .container {
    padding: 0 18px;
  }

  .header-inner {
    padding: 0 18px;
    gap: 10px;
  }

  .logo-text {
    font-size: 17px;
  }

  .logo svg {
    width: 34px;
    height: 34px;
  }

  .site-search {
    display: none;
  }

  .breadcrumb {
    padding: 12px 18px 0;
  }

  .hero-banner {
    margin: 14px 18px 0;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
  }

  .banner-dots {
    bottom: 12px;
  }

  .intro-section {
    padding: 40px 0 12px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .stat-item {
    padding: 20px 14px;
  }

  .section {
    padding: 44px 0;
  }

  .section h2 {
    padding-left: 14px;
  }

  .section h2::before {
    width: 4px;
  }

  .news-item,
  .article-card {
    padding: 22px 20px;
  }

  .news-item:hover {
    transform: translateX(3px);
  }

  .faq-item summary {
    padding: 15px 18px;
    font-size: 15px;
  }

  .faq-answer {
    padding: 0 18px 18px;
  }

  blockquote {
    padding: 20px 20px 20px 46px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

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

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-item {
    padding: 16px 10px;
  }

  .stat-label {
    font-size: 12px;
  }

  .sitemap-list a,
  .friend-links a {
    padding: 7px 14px;
    font-size: 13px;
  }

  .footer-bottom p {
    font-size: 12px;
  }
}

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

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

::selection {
  background: rgba(230, 57, 70, 0.2);
  color: var(--text);
}

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

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 5px;
  border: 2px solid var(--bg-alt);
}

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

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #16162a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  border-color: #16162a;
}