:root {
  --bg-page: #2e1065;
  --bg-surface: #ffffff;
  --bg-muted: #3b0764;
  --bg-dark: #240b4c;
  --bg-hero-end: #6d28d9;
  --text-main: #1e1b4b;
  --text-secondary: #334155;
  --text-muted: #4c1d95;
  --text-inverse: #ffffff;
  --text-inverse-muted: #e9d5ff;
  --brand-primary: #6d28d9;
  --brand-primary-hover: #5b21b6;
  --brand-soft: #f3e8ff;
  --brand-soft-text: #4c1d95;
  --accent-teal: #0f766e;
  --accent-teal-soft: #ccfbf1;
  --border-color: #c4b5fd;
  --border-light: #e9d5ff;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 14px rgba(15, 5, 36, 0.24);
  --shadow-md: 0 12px 32px rgba(15, 5, 36, 0.35);
  --container-max: 1160px;
  --space-xs: 0.5rem;
  --space-sm: 0.875rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --header-offset: 5.5rem;
}

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

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-inverse);
  background-color: var(--bg-page);
  overflow-wrap: break-word;
}

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

a {
  color: var(--brand-primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid #ddd6fe;
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: var(--header-offset);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(36, 11, 76, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(216, 180, 254, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-inverse);
  text-decoration: none;
  min-height: 44px;
}

.brand-link:hover {
  color: #f3e8ff;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  color: #ede9fe;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background-color: #6d28d9;
  color: var(--text-inverse);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: var(--text-inverse);
  border-color: rgba(216, 180, 254, 0.35);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  color: var(--text-inverse);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--brand-soft-text);
  border-color: #c4b5fd;
}

.btn-secondary:hover {
  background-color: var(--brand-soft);
  color: var(--brand-soft-text);
}

.btn-hero-ghost {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-hero-ghost:hover {
  background-color: rgba(255, 255, 255, 0.22);
  color: var(--text-inverse);
}

.btn-nav {
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-hero-end) 100%);
  color: var(--text-inverse);
  padding: 3.5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background-color: rgba(192, 132, 252, 0.22);
  border: 1px solid rgba(216, 180, 254, 0.5);
  color: #f3e8ff;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: var(--text-inverse);
}

.hero-gradient-text {
  color: #B89CFF;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-gradient-text {
    background-image: linear-gradient(
      90deg,
      #8FD3FF 0%,
      #5FA8FF 12.5%,
      #56E0FF 25%,
      #B89CFF 37.5%,
      #D8B4FF 50%,
      #8FD3FF 62.5%,
      #5FA8FF 75%,
      #56E0FF 87.5%,
      #8FD3FF 100%
    );
    background-size: 200% 100%;
    background-position: 100% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: hero-title-flow 3.8s linear infinite;
  }
}

@keyframes hero-title-flow {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-subtitle {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f3e8ff;
}

.hero-desc {
  margin: 0 0 1.75rem;
  color: var(--text-inverse-muted);
  font-size: 1rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(216, 180, 254, 0.3);
  background-color: #140a36;
}

/* Sections */
.section {
  padding: var(--space-xl) 0;
}

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

.section-header {
  max-width: 720px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.section-header h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  line-height: 1.3;
  color: var(--text-inverse);
}

.section-header p {
  margin: 0;
  color: var(--text-inverse-muted);
}

.section-header a {
  color: #f3e8ff;
  font-weight: 700;
}

.section-header a:hover {
  color: #ffffff;
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.card-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 0.25rem;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
  color: var(--text-main);
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background-color: var(--brand-soft);
  color: var(--brand-soft-text);
}

.badge-teal {
  background-color: var(--accent-teal-soft);
  color: var(--accent-teal);
}

/* Pricing Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.pricing-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
  color: var(--text-main);
}

.pricing-table caption {
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: left;
  color: var(--text-main);
  background: #f3e8ff;
  border-bottom: 1px solid var(--border-light);
}

.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.pricing-table thead th {
  background-color: #faf5ff;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
}

.pricing-table tbody th {
  font-weight: 700;
  color: var(--text-main);
}

.pricing-table tbody tr:last-child th,
.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-table .row-highlight {
  background-color: #f5f3ff;
}

.price-tag {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-soft-text);
  white-space: nowrap;
}

.pricing-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-inverse-muted);
  text-align: center;
}

/* Reviews */
.rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-soft-text);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.review-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.9rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.05rem 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-primary);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
}

.faq-answer p {
  margin: 0.85rem 0 0;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-hero-end));
  color: var(--text-inverse);
  border: 1px solid rgba(216, 180, 254, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-banner h2 {
  margin: 0 0 0.45rem;
  font-size: 1.6rem;
}

.cta-banner p {
  margin: 0;
  color: var(--text-inverse-muted);
}

/* Subpages & Articles */
.page-banner {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-hero-end));
  color: var(--text-inverse);
  padding: 2.75rem 0;
}

.page-banner h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.3;
}

.page-banner p {
  margin: 0;
  color: var(--text-inverse-muted);
  max-width: 68ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-inverse-muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: #f3e8ff;
}

.article-layout {
  max-width: 840px;
  margin: 0 auto;
}

.article-card {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.article-card h2,
.article-card h3 {
  color: var(--text-main);
}

.article-card p,
.article-card li {
  color: var(--text-secondary);
}

.related-box {
  margin-top: 2rem;
  padding: 1.35rem;
  border-radius: var(--radius-md);
  background: #f5f3ff;
  border: 1px solid var(--border-light);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.article-body h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.32rem;
  color: var(--text-main);
}

.article-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text-main);
}

.article-body p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: var(--text-secondary);
}

.article-body li + li {
  margin-top: 0.4rem;
}

.related-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.related-links {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

/* Footer */
.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-inverse-muted);
  padding: 2.5rem 0;
  border-top: 1px solid rgba(216, 180, 254, 0.25);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.footer-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.mt-md {
  margin-top: var(--space-md);
}

.text-center {
  text-align: center;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0;
  }

  .site-nav {
    gap: 0.25rem;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .section {
    padding: 2.75rem 0;
  }

  .hero-actions .btn,
  .cta-banner .btn {
    width: 100%;
  }

  .article-card {
    padding: 1.25rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-gradient-text {
    background-position: 0% 50%;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
