:root {
  --bg-primary: #0f0f14;
  --bg-secondary: #16161d;
  --bg-card: #1c1c25;
  --bg-card-hover: #23232e;
  --border: #2a2a38;
  --text-primary: #f2f2f5;
  --text-secondary: #a0a0b0;
  --text-muted: #6f6f80;
  --accent: #00d4aa;
  --accent-light: #5df7d1;
  --accent-dark: #00a884;
  --accent-rgb: 0, 212, 170;
  --danger: #ff6b6b;
  --warning: #f7c948;
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(15, 15, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text-primary);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

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

.nav a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav a.btn-primary {
  color: #0f0f14;
  background: var(--accent);
  margin-left: 6px;
}

.nav a.btn-primary:hover {
  background: var(--accent-light);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #0f0f14;
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #0f0f14;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero */
.hero {
  padding: 70px 0 55px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 560px;
}

.hero-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.hero-meta-item .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 85%, rgba(15,15,20,0.4));
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  display: block;
}

/* Section */
.section {
  padding: 56px 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 1.4rem;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Highlights */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.highlight-card .number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}

.highlight-card .label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Content sections */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.content-block h3 {
  font-size: 1.25rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-block ul,
.content-block ol {
  margin-left: 20px;
  color: var(--text-secondary);
}

.content-block li {
  margin-bottom: 8px;
}

.content-block li strong {
  color: var(--text-primary);
}

/* Download section */
.download-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.download-card h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.download-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.version-tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Code block */
.code-block {
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--accent-light);
  overflow-x: auto;
  margin: 16px 0;
  position: relative;
}

.code-block .copy-hint {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  user-select: none;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--bg-secondary);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.data-table td {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
}

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

.faq-item p {
  padding: 0 22px 18px;
  color: var(--text-secondary);
}

/* Step cards */
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.step-number {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #0f0f14;
  font-weight: 900;
  font-size: 1.2rem;
  border-radius: 12px;
}

.step-content h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 44px 0 24px;
  margin-top: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.footer-col p,
.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 8px;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Page header */
.page-header {
  padding: 48px 0 36px;
  text-align: center;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
}

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

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

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

.breadcrumb span {
  color: var(--text-muted);
  margin: 0 6px;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-inner,
  .content-grid {
    grid-template-columns: 1fr;
  }
  .hero-image {
    order: -1;
  }
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 14px 20px;
    gap: 6px;
  }
  .nav.active {
    display: flex;
  }
  .nav a {
    width: 100%;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero {
    padding: 40px 0 30px;
  }
  .section {
    padding: 40px 0;
  }
  .highlight-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .download-card {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.65rem;
  }
  .btn-group {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

/* ==================== QR Download Modal ==================== */
.qr-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qr-modal-overlay.active {
  display: flex;
}

.qr-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  max-width: 540px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: qr-modal-in 0.28s ease-out;
}

@keyframes qr-modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}

.qr-modal-close:hover {
  color: var(--text-primary);
}

.qr-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.qr-modal-body {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.qr-modal-qr {
  flex-shrink: 0;
  text-align: center;
}

.qr-modal-info {
  flex: 1;
  min-width: 0;
}

/* QR code wrapper with animated pulsing border */
.qr-code-wrapper {
  padding: 10px;
  border: 3px solid rgba(0, 212, 170, 0.35);
  border-radius: 14px;
  background: #fff;
  display: inline-block;
  animation: qr-border-pulse 2.2s ease-in-out infinite;
}

.qr-code-wrapper img {
  display: block;
  border-radius: 6px;
}

.qr-modal-qr .qr-code-wrapper img {
  width: 200px;
  height: 200px;
}

@keyframes qr-border-pulse {
  0%, 100% {
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.15), 0 0 0 0 rgba(0, 212, 170, 0.06);
  }
  50% {
    border-color: rgba(0, 212, 170, 0.85);
    box-shadow: 0 0 22px rgba(0, 212, 170, 0.4), 0 0 0 4px rgba(0, 212, 170, 0.06);
  }
}

.qr-scan-tip {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 14px;
  line-height: 1.6;
}

.qr-scan-tip strong {
  color: var(--accent);
  font-weight: 700;
}

.qr-feature-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.qr-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 7px;
  line-height: 1.5;
}

.qr-feature-list li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.qr-warning {
  background: rgba(247, 201, 72, 0.08);
  border: 1px solid rgba(247, 201, 72, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 14px;
}

.qr-warning strong {
  color: var(--warning);
  font-size: 0.88rem;
  display: block;
  margin-bottom: 2px;
}

.qr-warning p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin: 0;
}

/* Visible QR code display (download page) */
.qr-visible-display {
  text-align: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.qr-visible-display .qr-code-wrapper img {
  width: 180px;
  height: 180px;
}

.qr-visible-tip {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 14px;
  line-height: 1.6;
}

.qr-visible-tip strong {
  color: var(--accent);
}

/* Responsive modal */
@media (max-width: 580px) {
  .qr-modal {
    padding: 28px 20px 24px;
  }

  .qr-modal-body {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .qr-modal-qr .qr-code-wrapper img {
    width: 180px;
    height: 180px;
  }

  .qr-modal-info {
    width: 100%;
  }
}
