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

:root {
  --brand: #1a1a2e;
  --brand-deep: #0f3460;
  --accent: #e94560;
  --accent-soft: rgba(233, 69, 96, 0.12);
  --gold: #f5a623;
  --light: #f7f8fc;
  --text: #222;
  --muted: #666;
  --line: #ececf2;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 4px 14px rgba(20, 22, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 22, 40, 0.1);
  --shadow-lg: 0 20px 50px rgba(20, 22, 40, 0.16);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.8;
  background: #fff;
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

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

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

/* ============ Header ============ */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 46, 0.92);
  color: #fff;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.4s var(--ease);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.logo .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50% { box-shadow: 0 0 0 8px rgba(233, 69, 96, 0.04); }
}

nav.main-nav ul {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

nav.main-nav a {
  position: relative;
  padding: 4px 0;
  display: inline-block;
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

nav.main-nav a:hover {
  color: var(--gold);
}

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

.nav-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 4px 10px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(245, 166, 35, 0.5);
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  width: 120px;
  font-size: 13px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-box button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.3s var(--ease);
}

.search-box button:hover {
  transform: scale(1.2);
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s var(--ease);
}

.theme-toggle:hover {
  background: var(--gold);
  color: var(--brand);
  border-color: var(--gold);
}

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  font-size: 13px;
  color: #999;
  padding: 14px 0;
  background: var(--light);
  transition: background 0.4s var(--ease);
}

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

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

/* ============ Anchor Nav ============ */
.anchor-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 64px;
  z-index: 90;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.anchor-nav ul {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 12px 0;
  font-size: 14px;
  white-space: nowrap;
  scrollbar-width: none;
}

.anchor-nav ul::-webkit-scrollbar {
  display: none;
}

.anchor-nav a {
  color: var(--muted);
  position: relative;
  padding: 2px 0;
}

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

/* ============ Banner ============ */
.banner {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 75%, #e94560 160%);
  color: #fff;
  overflow: hidden;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 166, 35, 0.18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(233, 69, 96, 0.22), transparent 50%);
  pointer-events: none;
}

.banner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.25), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.08); }
}

.slides {
  position: relative;
  min-height: 420px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.slide .container {
  position: relative;
  z-index: 2;
}

.slide h1 {
  font-size: 34px;
  line-height: 1.4;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff 30%, #ffe0a3 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide p {
  max-width: 640px;
  color: #d7dbe8;
  font-size: 16px;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.35s var(--ease);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.35);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn:hover {
  background: var(--gold);
  color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(245, 166, 35, 0.4);
}

.btn:hover::after {
  transform: translateX(120%);
}

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

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.dots span:hover {
  background: rgba(255, 255, 255, 0.7);
}

.dots span.active {
  background: var(--gold);
  width: 26px;
  border-radius: 6px;
}

/* ============ Sections ============ */
section {
  padding: 64px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 44px;
}

.section-title h2 {
  font-size: 28px;
  color: var(--brand);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  transition: color 0.4s var(--ease);
}

.section-title h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.section-title p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 15px;
}

/* ============ Grids ============ */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

/* ============ Cards ============ */
.card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

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

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

.card h3 {
  font-size: 18px;
  color: var(--brand);
  margin-bottom: 10px;
  transition: color 0.4s var(--ease);
}

.card p {
  color: var(--muted);
  font-size: 14px;
}

.card p + p {
  margin-top: 10px;
}

/* ============ Backgrounds ============ */
.bg-light {
  background: var(--light);
  transition: background 0.4s var(--ease);
}

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-num {
  font-size: 34px;
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(90deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

/* ============ Articles ============ */
.article-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.article-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.4s var(--ease);
  position: relative;
}

.article-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245, 166, 35, 0.35);
}

.article-item h3 {
  font-size: 17px;
  color: var(--brand);
  margin-bottom: 8px;
  transition: color 0.4s var(--ease);
}

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

.article-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

.article-item p {
  font-size: 14px;
  color: var(--muted);
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: gap 0.3s var(--ease), transform 0.3s var(--ease);
}

.read-more:hover {
  transform: translateX(4px);
  color: var(--gold);
}

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  transition: border-color 0.4s var(--ease);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--brand);
  transition: color 0.3s var(--ease);
}

.faq-q:hover {
  color: var(--accent);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease), padding 0.45s var(--ease);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding-top: 12px;
}

.faq-icon {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* ============ HowTo ============ */
.howto-step {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.4s var(--ease);
}

.howto-step:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.step-num {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.howto-step:hover .step-num {
  background: linear-gradient(135deg, var(--accent), var(--gold));
  transform: scale(1.08) rotate(-6deg);
}

.step-body h4 {
  color: var(--brand);
  margin-bottom: 6px;
  font-size: 16px;
  transition: color 0.4s var(--ease);
}

.step-body p {
  color: var(--muted);
  font-size: 14px;
}

/* ============ Footer ============ */
footer {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  color: #cfd3e0;
  padding: 56px 0 24px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.18), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

footer h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 16px;
  position: relative;
  padding-left: 12px;
}

footer h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
}

footer li {
  margin-bottom: 8px;
}

footer a:hover {
  color: var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 30px;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #9aa0b5;
  position: relative;
  z-index: 1;
}

.footer-bottom p + p {
  margin-top: 6px;
}

/* ============ Back Top ============ */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: none;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.45);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.back-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 14px 32px rgba(233, 69, 96, 0.55);
}

/* ============ Reveal Animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ============ Dark Mode ============ */
body.dark {
  background: #12121c;
  color: #e5e5ea;
}

body.dark .breadcrumb {
  background: #161622;
  color: #7a7a90;
}

body.dark .breadcrumb a {
  color: #9a9ab0;
}

body.dark .anchor-nav {
  background: #12121c;
  border-color: #2a2a3d;
}

body.dark .anchor-nav a {
  color: #9a9ab0;
}

body.dark .anchor-nav a:hover {
  color: var(--gold);
}

body.dark .card,
body.dark .article-item,
body.dark .howto-step {
  background: rgba(28, 28, 43, 0.72);
  border-color: #2a2a3d;
}

body.dark .card h3,
body.dark .article-item h3,
body.dark .faq-q,
body.dark .step-body h4 {
  color: #fff;
}

body.dark .article-item:hover h3 {
  color: var(--gold);
}

body.dark .card p,
body.dark .article-item p,
body.dark .faq-a,
body.dark .step-body p {
  color: #a8a8bd;
}

body.dark .bg-light {
  background: #161622;
}

body.dark .section-title h2 {
  color: #fff;
}

body.dark .section-title p {
  color: #9a9ab0;
}

body.dark .faq-item {
  border-color: #2a2a3d;
}

body.dark .stat-label {
  color: #9a9ab0;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .grid-3,
  .grid-4,
  .grid-2,
  .article-list,
  .footer-grid,
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  nav.main-nav {
    display: none;
  }

  nav.main-nav.open {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.35s var(--ease);
  }

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

  nav.main-nav.open ul {
    flex-direction: column;
    gap: 14px;
  }

  .menu-btn {
    display: block;
  }

  .slide h1 {
    font-size: 24px;
  }

  .slide p {
    font-size: 15px;
  }

  .anchor-nav {
    display: none;
  }

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

  section {
    padding: 48px 0;
  }

  .section-title h2 {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .grid-3,
  .grid-4,
  .grid-2,
  .article-list,
  .footer-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .nav-bar {
    height: 58px;
  }

  .logo {
    font-size: 17px;
  }

  .search-box {
    display: none;
  }

  .slides {
    min-height: 460px;
  }

  .slide {
    padding: 48px 0;
  }

  .slide h1 {
    font-size: 21px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 14px;
  }

  .howto-step {
    flex-direction: column;
    gap: 12px;
  }

  .step-num {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .card {
    padding: 20px;
  }

  .article-item {
    padding: 20px;
  }

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

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