:root {
  --bg: #0b1220;
  --bg-alt: #111a2e;
  --surface: #162238;
  --surface-hover: #1c2b47;
  --border: #263552;
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --primary-ink: #082f49;
  --accent: #34d399;
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1140px;
  --space-section: 4.5rem;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}

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

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

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

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover {
  background-color: #7dd3fc;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

/* Sections */
section {
  padding: var(--space-section) 0;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.75rem;
}

.section-header h2 {
  font-size: 1.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

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

/* Hero */
.hero {
  padding: 4rem 0 4.5rem;
}

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

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.22;
  margin: 0 0 1rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

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

.hero-stats {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  list-style: none;
  padding-left: 0;
}

.hero-stats li strong {
  display: block;
  font-size: 1.25rem;
  color: var(--primary);
}

.hero-stats li span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.media-frame {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.feature-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.65rem;
}

/* Pricing Table */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  text-align: left;
}

.pricing-table caption {
  padding: 1rem 1.25rem;
  font-weight: 700;
  text-align: left;
  color: var(--text);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

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

.pricing-table thead th {
  background: rgba(11, 18, 32, 0.55);
  color: var(--primary);
  font-size: 0.95rem;
}

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

.price-tag {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
}

/* Reviews */
.review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stars {
  color: #fbbf24;
  font-weight: 700;
}

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

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.faq-item summary {
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
}

.faq-item summary::after {
  content: "−";
  color: var(--primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.faq-item:not([open]) summary::after {
  content: "+";
}

.faq-body {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.faq-body p {
  margin: 0;
}

/* Article & Subpage Layout */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

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

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

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

.article-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.4rem;
  color: var(--text);
}

.article-content h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--primary);
}

.article-content p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
}

.article-content ul {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  color: var(--text-muted);
}

.article-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-actions {
  margin-top: 2.25rem;
  text-align: center;
}

/* Footer */
.site-footer {
  background: #070c16;
  border-top: 1px solid var(--border);
  padding: 2.75rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-col h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Responsive @media */
@media (max-width: 960px) {
  .hero-grid,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --space-section: 3rem;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav {
    width: 100%;
  }
  .hero {
    padding: 2.5rem 0 3rem;
  }
  .hero-actions .btn,
  .article-cta .btn {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
