:root {
  --brand-primary: #f5a623;
  --brand-primary-dark: #d98e0f;
  --brand-primary-light: #fef3d7;
  --brand-secondary: #42a5f5;
  --brand-accent: #66bb6a;
  --bg-body: #f7f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.45);
  --bg-header: rgba(255, 255, 255, 0.82);
  --bg-footer: #1a1d23;
  --bg-elevated: #ffffff;
  --text-primary: #1a1d23;
  --text-secondary: #4a4f57;
  --text-muted: #7a8089;
  --text-inverse: #ffffff;
  --border-color: #e5e8ed;
  --border-light: #eef0f4;
  --shadow-sm: 0 1px 3px rgba(26, 29, 35, 0.06), 0 1px 2px rgba(26, 29, 35, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 29, 35, 0.08), 0 2px 4px rgba(26, 29, 35, 0.04);
  --shadow-lg: 0 12px 32px rgba(26, 29, 35, 0.12), 0 4px 8px rgba(26, 29, 35, 0.06);
  --shadow-xl: 0 20px 48px rgba(26, 29, 35, 0.16);
  --shadow-brand: 0 8px 24px rgba(245, 166, 35, 0.28);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
  --header-height: 68px;
}

[data-theme="dark"] {
  --brand-primary: #f7b84b;
  --brand-primary-dark: #e0a22e;
  --brand-primary-light: #3d2e0e;
  --brand-secondary: #64b5f6;
  --brand-accent: #81c784;
  --bg-body: #0f1115;
  --bg-card: #1a1d23;
  --bg-card-hover: #22262e;
  --bg-glass: rgba(26, 29, 35, 0.78);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --bg-header: rgba(15, 17, 21, 0.85);
  --bg-footer: #0a0c0f;
  --bg-elevated: #22262e;
  --text-primary: #e8eaed;
  --text-secondary: #b0b5bd;
  --text-muted: #7a8089;
  --text-inverse: #0f1115;
  --border-color: #2a2e36;
  --border-light: #22262e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.55);
  --shadow-brand: 0 8px 24px rgba(247, 184, 75, 0.22);
}

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

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

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

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

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul,
ol {
  list-style: none;
}

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

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

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 0.85em;
  color: var(--text-secondary);
}

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

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-body);
}

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

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

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

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

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.03);
}

.logo svg {
  width: 180px;
  height: 44px;
}

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

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

#main-nav a {
  display: block;
  padding: 8px 13px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

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

#main-nav a:hover {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

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

#mobile-menu-toggle {
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

#mobile-menu-toggle:hover {
  background: var(--border-light);
}

#mobile-menu-toggle svg rect {
  fill: var(--text-primary);
  transition: fill var(--transition-fast);
}

#theme-toggle {
  padding: 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

#theme-toggle:hover {
  background: var(--border-light);
  transform: rotate(30deg);
}

#theme-toggle svg circle,
#theme-toggle svg line {
  stroke: var(--text-secondary);
  transition: stroke var(--transition-fast);
}

#theme-toggle:hover svg circle,
#theme-toggle:hover svg line {
  stroke: var(--brand-primary);
}

#site-search {
  flex-shrink: 0;
}

#site-search form {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#site-search form:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

#search-input {
  width: 220px;
  padding: 8px 14px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-family: inherit;
}

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

#site-search button {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

#site-search button:hover {
  background: var(--brand-primary-light);
}

#site-search button svg circle,
#site-search button svg line {
  stroke: var(--text-muted);
  transition: stroke var(--transition-fast);
}

#site-search button:hover svg circle,
#site-search button:hover svg line {
  stroke: var(--brand-primary);
}

#breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px 0;
}

#breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--border-color);
}

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

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

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

#main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

section {
  margin-bottom: 56px;
}

section > h2 {
  margin-bottom: 24px;
  padding-bottom: 12px;
  position: relative;
  display: inline-block;
}

section > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: var(--radius-full);
}

article {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

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

article h3 {
  margin-bottom: 14px;
  color: var(--text-primary);
  position: relative;
  padding-left: 14px;
}

article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-primary-dark));
  border-radius: var(--radius-full);
}

article h4 {
  margin: 18px 0 10px;
  color: var(--text-primary);
}

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

#hero-banner {
  margin-top: 24px;
  margin-bottom: 56px;
}

.banner-carousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
}

.banner-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.banner-slide.active {
  display: block;
  opacity: 1;
  animation: bannerFadeIn 0.6s ease;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

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

.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base), background var(--transition-fast), transform var(--transition-fast);
  z-index: 10;
}

.banner-carousel:hover .banner-prev,
.banner-carousel:hover .banner-next {
  opacity: 1;
}

.banner-prev { left: 16px; }
.banner-next { right: 16px; }

.banner-prev:hover,
.banner-next:hover {
  background: var(--brand-primary);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

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

.banner-dots button {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all var(--transition-base);
}

.banner-dots button[aria-selected="true"] {
  width: 28px;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

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

.hero-text {
  margin-top: 28px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
}

.hero-text h1 {
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--brand-primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

#stats-counter {
  padding: 40px 0;
}

#stats-counter > h2 {
  text-align: center;
  display: block;
}

#stats-counter > h2::after {
  left: 50%;
  transform: translateX(-50%);
}

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

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

.stat-item::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(245, 166, 35, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.stat-item:hover::before {
  opacity: 1;
}

.stat-number {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.stat-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-grid blockquote {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.testimonial-grid blockquote::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  right: 20px;
  font-size: 4rem;
  line-height: 1;
  color: var(--brand-primary);
  opacity: 0.12;
  font-family: Georgia, serif;
}

.testimonial-grid blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-primary);
}

.testimonial-grid blockquote p {
  font-size: 0.93rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.testimonial-grid blockquote footer {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

#news article,
#articles article {
  position: relative;
}

#news article h3 a,
#articles article h3 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

#news article h3 a:hover,
#articles article h3 a:hover {
  color: var(--brand-primary);
}

#news time,
#articles time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 3px 12px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  font-weight: 500;
}

#articles article p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 0;
  transition: gap var(--transition-fast);
}

#articles article p:last-child a:hover {
  gap: 8px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.faq-item:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 56px 18px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
  line-height: 1.5;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--brand-primary);
  transition: transform var(--transition-base), color var(--transition-fast);
  line-height: 1;
}

.faq-question[aria-expanded="true"] {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.faq-question[aria-expanded="true"]::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

.faq-question:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

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

.faq-answer[hidden] {
  display: none;
}

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

.faq-answer p {
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0;
}

#howto article {
  padding: 36px 40px;
}

#howto h4 {
  font-size: 1.05rem;
  color: var(--brand-primary-dark);
  margin-top: 24px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

#howto ol,
#howto ul {
  padding-left: 0;
  margin: 12px 0;
}

#howto ol {
  counter-reset: howto-step;
}

#howto ol li {
  counter-increment: howto-step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

#howto ol li::before {
  content: counter(howto-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
}

#howto ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  line-height: 1.8;
}

#howto ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
}

#howto h4 + p {
  margin-top: 8px;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.contact-info article {
  margin-bottom: 0;
}

.contact-info p {
  font-size: 0.92rem;
  margin-bottom: 6px;
  line-height: 1.7;
}

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

#sitemap nav ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

#sitemap nav > ul > li {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

#sitemap nav > ul > li:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

#sitemap nav > ul > li > a {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
}

#sitemap nav > ul > li > a:hover {
  color: var(--brand-primary);
}

#sitemap nav ul ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 0;
}

#sitemap nav ul ul li a {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 3px 0;
  display: inline-block;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

#sitemap nav ul ul li a:hover {
  color: var(--brand-primary);
  padding-left: 6px;
}

#friend-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#friend-links a {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

#friend-links a:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

#legal article {
  border-left: 4px solid var(--brand-primary);
}

#page-meta {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

#page-meta h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

#page-meta h2::after {
  display: none;
}

#page-meta p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

#page-meta p:last-child {
  margin-bottom: 0;
}

#site-footer {
  background: var(--bg-footer);
  color: #b0b5bd;
  padding: 56px 0 0;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-section {
  margin-bottom: 32px;
}

.footer-section h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
}

.footer-section p {
  color: #8a909a;
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-section ul a {
  color: #8a909a;
  font-size: 0.88rem;
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: inline-block;
}

.footer-section ul a:hover {
  color: var(--brand-primary);
  padding-left: 4px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1fr;
  gap: 40px;
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  margin-top: 16px;
  text-align: center;
}

.footer-bottom p {
  color: #6a7079;
  font-size: 0.82rem;
  margin-bottom: 6px;
  line-height: 1.7;
}

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

#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: var(--shadow-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition-base);
  z-index: 999;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 12px 32px rgba(245, 166, 35, 0.4);
}

#back-to-top svg polyline {
  stroke: #fff;
}

.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);
}

@media (max-width: 1024px) {
  .header-inner {
    gap: 12px;
  }

  #search-input {
    width: 160px;
  }

  #main-nav a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

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

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

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

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

  #sitemap nav ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .header-inner {
    padding: 0 16px;
    gap: 8px;
  }

  .logo svg {
    width: 140px;
    height: 36px;
  }

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

  #main-nav.open {
    max-height: 480px;
    overflow-y: auto;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    gap: 2px;
  }

  #main-nav a {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

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

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

  #site-search {
    flex: 1;
    min-width: 0;
  }

  #site-search form {
    width: 100%;
  }

  #search-input {
    width: 100%;
    min-width: 0;
    font-size: 0.82rem;
    padding: 7px 10px;
  }

  #site-search button {
    padding: 7px 10px;
  }

  #breadcrumb {
    padding: 12px 16px 0;
  }

  #main-content {
    padding: 0 16px 40px;
  }

  section {
    margin-bottom: 40px;
  }

  article {
    padding: 22px 20px;
    border-radius: var(--radius-md);
  }

  .hero-text {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }

  .hero-text h1 {
    font-size: 1.4rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .banner-prev,
  .banner-next {
    width: 36px;
    height: 36px;
    opacity: 1;
    font-size: 0.9rem;
  }

  .banner-prev { left: 10px; }
  .banner-next { right: 10px; }

  .banner-dots {
    bottom: 12px;
  }

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

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

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

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

  #howto article {
    padding: 24px 20px;
  }

  #page-meta {
    padding: 22px 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 16px;
  }

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

  .faq-question {
    padding: 15px 48px 15px 18px;
    font-size: 0.93rem;
  }

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

  #friend-links ul {
    gap: 8px;
  }

  #friend-links a {
    padding: 7px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .logo svg {
    width: 120px;
    height: 32px;
  }

  #theme-toggle {
    padding: 6px;
  }

  #theme-toggle svg {
    width: 20px;
    height: 20px;
  }

  #mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
  }

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

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

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

  section > h2 {
    font-size: 1.25rem;
  }

  article h3 {
    font-size: 1.05rem;
  }

  .hero-text h1 {
    font-size: 1.25rem;
  }
}

@media (hover: none) {
  .banner-prev,
  .banner-next {
    opacity: 1;
  }

  article:hover {
    transform: none;
  }

  .stat-item:hover {
    transform: none;
  }

  .testimonial-grid blockquote:hover {
    transform: none;
  }
}

@media print {
  #site-header,
  #back-to-top,
  #site-search,
  #mobile-menu-toggle,
  #theme-toggle,
  .banner-prev,
  .banner-next,
  .banner-dots,
  #friend-links {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  article {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

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

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

@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;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border-color: #000;
    --text-secondary: #000;
    --text-muted: #333;
  }

  [data-theme="dark"] {
    --border-color: #fff;
    --text-secondary: #fff;
    --text-muted: #ccc;
  }
}