:root {
  --brand-primary: #0b1a2f;
  --brand-accent: #1e6f9f;
  --brand-highlight: #3fa7d6;
  --brand-bg: #f8fafc;
  --brand-card: #ffffff;
  --brand-text: #1e293b;
  --brand-muted: #475569;
  --brand-border: #e2e8f0;
  --brand-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --brand-glass: rgba(255, 255, 255, 0.72);
  --brand-glass-border: rgba(255, 255, 255, 0.35);
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.25s ease;
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

[data-theme="dark"] {
  --brand-primary: #0f172a;
  --brand-accent: #3b82f6;
  --brand-highlight: #60a5fa;
  --brand-bg: #0b1120;
  --brand-card: #1e293b;
  --brand-text: #f1f5f9;
  --brand-muted: #94a3b8;
  --brand-border: #334155;
  --brand-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --brand-glass: rgba(30, 41, 59, 0.72);
  --brand-glass-border: rgba(148, 163, 184, 0.25);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--brand-bg);
  color: var(--brand-text);
  line-height: 1.7;
  transition: background-color var(--transition), color var(--transition);
  padding-top: 70px;
  overflow-x: hidden;
}

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

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

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

button {
  font-family: inherit;
}

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--brand-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--brand-shadow);
  z-index: 1000;
  border-bottom: 1px solid var(--brand-glass-border);
  transition: background-color var(--transition), border-color var(--transition);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--brand-accent);
  text-decoration: none;
  transition: transform var(--transition), color var(--transition);
}

.logo-area:hover {
  transform: translateY(-1px);
  color: var(--brand-highlight);
}

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

.logo-area:hover svg {
  transform: rotate(-4deg) scale(1.05);
  box-shadow: 0 6px 18px rgba(30, 111, 159, 0.35);
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--brand-text);
  font-weight: 500;
  transition: color var(--transition);
  font-size: 0.95rem;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-highlight));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-links a:hover {
  color: var(--brand-accent);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--brand-glass);
  border: 1px solid var(--brand-border);
  border-radius: 40px;
  padding: 4px 12px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-box:focus-within {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(30, 111, 159, 0.15);
}

.search-box input {
  border: none;
  background: transparent;
  padding: 6px 0;
  outline: none;
  color: var(--brand-text);
  font-size: 0.9rem;
  width: 140px;
}

.search-box input::placeholder {
  color: var(--brand-muted);
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition), transform var(--transition);
}

.search-box button:hover {
  color: var(--brand-accent);
  transform: scale(1.1);
}

.theme-toggle,
.mobile-menu-btn {
  background: var(--brand-glass);
  border: 1px solid var(--brand-border);
  border-radius: 40px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--brand-text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.theme-toggle:hover,
.mobile-menu-btn:hover {
  background: var(--brand-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-toggle:active,
.mobile-menu-btn:active {
  transform: translateY(0);
}

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

.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--brand-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--brand-glass-border);
  padding: 16px 20px;
  z-index: 999;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--brand-shadow);
  animation: slideDown 0.28s ease;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--brand-text);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--brand-border);
  transition: color var(--transition), padding-left var(--transition);
}

.mobile-nav a:hover {
  color: var(--brand-accent);
  padding-left: 6px;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--brand-muted);
}

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

.breadcrumb a:hover {
  color: var(--brand-highlight);
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 6px;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 60px;
}

.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--brand-primary);
  letter-spacing: -0.01em;
}

[data-theme="dark"] .hero-content h1 {
  color: var(--brand-text);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--brand-muted);
  margin-bottom: 24px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), background var(--transition);
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--brand-muted);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: floatY 6s ease-in-out infinite;
}

.hero-visual svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(30, 111, 159, 0.22));
}

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

.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 20px 0 40px;
  background: var(--brand-card);
  box-shadow: var(--brand-shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 55%, var(--brand-highlight) 100%);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
  color: #fff;
  text-align: center;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.carousel-slide h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.carousel-slide p {
  opacity: 0.92;
  font-size: 1rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background var(--transition), transform var(--transition);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn.prev {
  left: 16px;
}

.carousel-btn.next {
  right: 16px;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

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

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

.carousel-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 6px;
}

.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--brand-primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-highlight));
}

[data-theme="dark"] .section-title {
  color: var(--brand-text);
}

.section-subtitle {
  color: var(--brand-muted);
  margin-bottom: 32px;
  font-size: 1rem;
  margin-top: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--brand-shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(63, 167, 214, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-highlight);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--brand-accent);
  transition: color var(--transition);
}

.card:hover h3 {
  color: var(--brand-highlight);
}

.card p {
  color: var(--brand-muted);
  font-size: 0.95rem;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  margin-bottom: 8px;
}

.faq-item {
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--brand-card);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  background: none;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color var(--transition), background var(--transition);
}

.faq-question:hover {
  color: var(--brand-accent);
  background: rgba(63, 167, 214, 0.06);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--brand-accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  line-height: 1;
}

.faq-item.active .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
  color: var(--brand-muted);
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 20px 20px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.article-card {
  position: relative;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--brand-shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-highlight);
}

.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--brand-primary);
  transition: color var(--transition);
}

.article-card:hover h3 {
  color: var(--brand-accent);
}

[data-theme="dark"] .article-card h3 {
  color: var(--brand-text);
}

[data-theme="dark"] .article-card:hover h3 {
  color: var(--brand-highlight);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--brand-muted);
  margin-bottom: 12px;
}

.article-summary {
  color: var(--brand-muted);
  font-size: 0.9rem;
  flex: 1;
}

.read-more {
  margin-top: 12px;
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition), color var(--transition);
}

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

.howto-steps {
  counter-reset: step;
  list-style: none;
}

.howto-steps li {
  position: relative;
  padding-left: 50px;
  margin-bottom: 24px;
  counter-increment: step;
  transition: transform var(--transition);
}

.howto-steps li:hover {
  transform: translateX(4px);
}

.howto-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-highlight));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(30, 111, 159, 0.28);
  transition: transform var(--transition);
}

.howto-steps li:hover::before {
  transform: scale(1.08) rotate(-6deg);
}

.site-footer {
  background: linear-gradient(160deg, var(--brand-primary) 0%, #0a1526 100%);
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 60px;
}

[data-theme="dark"] .site-footer {
  background: linear-gradient(160deg, #0a0f1a 0%, #050810 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-highlight), transparent);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color var(--transition), padding-left var(--transition);
}

.footer-col a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-highlight));
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 24px rgba(30, 111, 159, 0.4);
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--brand-border);
  border-radius: 6px;
  transition: background var(--transition);
}

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

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.1rem;
  }

  .hero-stats {
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

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

  .search-box input {
    width: 100px;
  }

  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-grid,
  .article-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
  }

  .carousel-slide {
    padding: 40px 16px;
  }

  .carousel-slide h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  body {
    padding-top: 62px;
  }

  .nav-container {
    height: 62px;
    padding: 0 12px;
  }

  .mobile-nav {
    top: 62px;
  }

  .logo-area {
    font-size: 1.15rem;
    gap: 8px;
  }

  .logo-area svg {
    width: 30px;
    height: 30px;
  }

  .search-box {
    display: none;
  }

  .hero-section {
    padding: 24px 0 36px;
    gap: 24px;
  }

  .hero-content h1 {
    font-size: 1.65rem;
  }

  .hero-content p {
    font-size: 0.98rem;
  }

  .hero-stats {
    gap: 16px;
    flex-wrap: wrap;
  }

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

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

  .section-title {
    font-size: 1.3rem;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  .card {
    padding: 18px;
  }

  .card h3 {
    font-size: 1.08rem;
  }

  .article-card {
    padding: 16px;
  }

  .carousel-slide {
    padding: 32px 14px;
  }

  .carousel-slide h3 {
    font-size: 1.15rem;
  }

  .carousel-slide p {
    font-size: 0.88rem;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

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

  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }

  .breadcrumb {
    font-size: 0.82rem;
    padding: 12px 0;
  }
}

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