/* =========================================================
   HurryDeer Browser — Official Site Styles
   Modern, flat, SEO-friendly, fully self-contained.
   ========================================================= */

/* CSS Variables */
:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-900: #1e3a8a;

  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-rose: #f43f5e;

  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-elevated: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.04);
  --shadow: 0 4px 6px -1px rgb(15 23 42 / 0.06), 0 2px 4px -2px rgb(15 23 42 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.04);

  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --container: 1200px;
  --nav-height: 72px;

  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 350ms ease;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --bg-elevated: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.25);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.25);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.25);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-subtitle {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 640px;
}
.text-center { text-align: center; }
.text-center .section-subtitle { margin-inline: auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.875rem;
  font-weight: 600;
}
[data-theme="dark"] .badge { background: rgba(59,130,246,0.15); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  box-shadow: 0 8px 22px -4px rgba(37, 99, 235, 0.45);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--brand-200); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--brand-600); background: var(--brand-50); }

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
[data-theme="dark"] .header { background: rgba(11,17,32,0.85); }
.header.scrolled { box-shadow: var(--shadow); }

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}
.logo svg { width: 32px; height: 32px; }

.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  display: inline-flex;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav a:hover, .nav a.active { color: var(--brand-600); background: var(--brand-50); }
[data-theme="dark"] .nav a:hover, [data-theme="dark"] .nav a.active { background: rgba(59,130,246,0.12); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.icon-btn:hover { color: var(--brand-600); border-color: var(--brand-200); }
.icon-btn svg { width: 1.25rem; height: 1.25rem; }

.menu-toggle { display: inline-flex; }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  z-index: 99;
  background: var(--bg);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a.active { color: var(--brand-600); }
.mobile-menu .btn { margin-top: 1rem; width: 100%; }

@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-toggle { display: none; }
}

/* Hero */
.hero {
  position: relative;
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 5rem;
  background:
    radial-gradient(circle at 85% 10%, rgba(59,130,246,0.10) 0%, transparent 35%),
    radial-gradient(circle at 15% 80%, rgba(139,92,246,0.08) 0%, transparent 35%),
    var(--bg);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -50% -20% 0 -20%;
  background:
    radial-gradient(circle at 30% 20%, rgba(59,130,246,0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(139,92,246,0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6,182,212,0.08) 0%, transparent 40%);
  filter: blur(60px);
  animation: heroGlow 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes heroGlow {
  from { transform: translateX(-2%) translateY(-2%) scale(1); opacity: 0.8; }
  to { transform: translateX(2%) translateY(2%) scale(1.05); opacity: 1; }
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; }
}

.hero-badge { margin-bottom: 1.25rem; }
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero h1 span { color: var(--brand-600); }
.hero-desc {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}
.hero-actions .btn { padding: 0.875rem 1.75rem; }

.hero-stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-600);
}
.hero-stat span { font-size: 0.875rem; color: var(--text-muted); }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual::before {
  content: '';
  position: absolute;
  width: 80%;
  height: 80%;
  top: 10%;
  background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 65%);
  filter: blur(40px);
  animation: heroGlow 12s ease-in-out infinite alternate-reverse;
  pointer-events: none;
  z-index: 0;
}
.browser-mockup {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.browser-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.browser-dot { width: 10px; height: 10px; border-radius: 50%; }
.browser-dot.red { background: #ef4444; }
.browser-dot.yellow { background: #f59e0b; }
.browser-dot.green { background: #22c55e; }
.browser-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem 0;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  max-width: 160px;
}
.browser-tab.active {
  background: var(--bg);
  color: var(--text-primary);
  font-weight: 600;
}
.browser-tab svg { flex-shrink: 0; color: var(--brand-600); }
.browser-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-tab-close {
  margin-left: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
}
.browser-addressbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.browser-addressbar svg { flex-shrink: 0; color: #22c55e; }
.browser-addressbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-body {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}
.fingerprint-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.fingerprint-card svg {
  flex-shrink: 0;
  width: 48px; height: 48px;
  color: var(--brand-600);
}
.fingerprint-card h4 { font-weight: 700; }
.fingerprint-card p { font-size: 0.875rem; color: var(--text-muted); }

/* Marquee */
.platforms {
  padding: 2.5rem 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.platforms p {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.marquee {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 35s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}
.feature-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-600);
  margin-bottom: 1rem;
}
[data-theme="dark"] .feature-icon { background: rgba(59,130,246,0.12); }
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.125rem; font-weight: 700; }
.feature-card p { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--text-secondary); }

/* Use cases tabs */
.tabs { margin-top: 2.5rem; }
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition-fast);
}
.tab-btn:hover { border-color: var(--brand-200); }
.tab-btn.active {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.usecase-card {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
@media (min-width: 1024px) { .usecase-card { grid-template-columns: 1fr 1fr; } }
.usecase-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-600), var(--accent-violet));
  color: #fff;
}
.usecase-visual svg { width: 120px; height: 120px; opacity: 0.95; }
.usecase-content h3 { font-size: 1.5rem; font-weight: 800; }
.usecase-content p { margin-top: 0.75rem; color: var(--text-secondary); }
.usecase-content ul { margin-top: 1rem; }
.usecase-content li {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.375rem 0;
  color: var(--text-secondary);
}
.usecase-content li svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--brand-600);
  margin-top: 2px;
}

/* Comparison */
.compare-table {
  width: 100%;
  margin-top: 2.5rem;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-table th, .compare-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th { background: var(--bg-soft); font-weight: 700; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table td:nth-child(3) { color: var(--brand-600); font-weight: 700; }
.compare-table svg { width: 20px; height: 20px; }

/* Pricing */
.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 0.375rem;
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.pricing-toggle button {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
}
.pricing-toggle button.active { background: var(--brand-600); color: #fff; }
.save-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--accent-rose);
  color: #fff;
  font-weight: 700;
}

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: start;
}
@media (min-width: 1024px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.pricing-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.pricing-card.featured {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 2px var(--brand-600), var(--shadow-lg);
}
.pricing-card .popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-full);
  background: var(--brand-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.pricing-card h3 { font-size: 1.25rem; font-weight: 700; }
.pricing-card .price {
  margin-top: 1rem;
  font-size: 2.5rem;
  font-weight: 900;
}
.pricing-card .price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pricing-card p { color: var(--text-secondary); margin-top: 0.5rem; }
.pricing-card ul { margin: 1.5rem 0; }
.pricing-card li {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.pricing-card li svg { width: 18px; height: 18px; color: var(--brand-600); }
.pricing-card .btn { width: 100%; }

.pricing-card .free-price,
.pricing-card .enterprise-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-600);
}

.pricing-config {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.config-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.config-row:last-of-type {
  margin-bottom: 0;
}

.config-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 5rem;
}

.config-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.config-select,
.config-number {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
}

.config-select {
  min-width: 5.5rem;
  cursor: pointer;
}

.config-number {
  width: 5rem;
  -moz-appearance: textfield;
}

.config-number::-webkit-outer-spin-button,
.config-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.config-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.config-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.config-total strong {
  color: var(--brand-600);
  font-size: 1.125rem;
}

/* Testimonials */
.testimonials {
  position: relative;
}
.testimonial-track {
  overflow: hidden;
  margin-top: 2.5rem;
}
.testimonial-slider {
  display: flex;
  transition: transform var(--transition-slow);
}
.testimonial-card {
  flex: 0 0 100%;
  padding: 0 0.5rem;
}
@media (min-width: 640px) { .testimonial-card { flex: 0 0 50%; } }
@media (min-width: 1024px) { .testimonial-card { flex: 0 0 33.333%; } }
.testimonial-inner {
  height: 100%;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stars { display: flex; gap: 0.25rem; color: #f59e0b; margin-bottom: 1rem; }
.stars svg { width: 18px; height: 18px; fill: currentColor; }
.testimonial-inner blockquote {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--accent-violet));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.testimonial-author strong { display: block; font-weight: 700; }
.testimonial-author span { font-size: 0.875rem; color: var(--text-muted); }

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.slider-btn {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
}
.slider-btn:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.slider-dots { display: flex; gap: 0.5rem; }
.slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 0;
  background: var(--border);
  transition: var(--transition-fast);
}
.slider-dot.active { background: var(--brand-600); width: 24px; border-radius: var(--radius-full); }

/* Stats section */
.stats-section { background: var(--bg-soft); }
.stats-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-box {
  text-align: center;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.stat-box .number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--brand-600);
  line-height: 1;
}
.stat-box .label { margin-top: 0.5rem; color: var(--text-secondary); font-size: 0.9375rem; }

/* Download */
.download-card {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 3rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand-700), var(--accent-violet));
  color: #fff;
  box-shadow: var(--shadow-xl);
}
@media (min-width: 1024px) { .download-card { grid-template-columns: 1fr auto; } }
.download-card h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
.download-card p { margin-top: 0.75rem; opacity: 0.9; max-width: 560px; }
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 600;
  transition: var(--transition-fast);
}
.download-btn:hover { background: rgba(255,255,255,0.22); }
.download-btn svg { width: 22px; height: 22px; }
.download-btn.primary-download { background: #fff; color: var(--brand-700); border-color: #fff; }
.download-btn.primary-download:hover { background: #f1f5f9; }

/* FAQ */
.faq-list { max-width: 820px; margin: 2.5rem auto 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-weight: 700;
}
.faq-question svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-muted); transition: transform var(--transition); }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}
.faq-item.open .faq-answer { max-height: 400px; padding-bottom: 1.25rem; }
.faq-answer p { color: var(--text-secondary); }

/* Contact */
.form-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-group input.error, .form-group textarea.error { border-color: var(--accent-rose); }
.field-error { color: var(--accent-rose); font-size: 0.8125rem; margin-top: 0.25rem; }
.form-success {
  display: none;
  padding: 1rem;
  border-radius: var(--radius);
  background: #dcfce7;
  color: #166534;
  margin-bottom: 1rem;
  font-weight: 600;
}
[data-theme="dark"] .form-success { background: rgba(34,197,94,0.15); color: #86efac; }
.form-success.visible { display: block; }

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); } }
.footer-brand p { margin-top: 1rem; color: var(--text-secondary); max-width: 320px; }
.footer-socials { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.footer-socials a {
  width: 2.25rem; height: 2.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.footer-socials a:hover { color: var(--brand-600); border-color: var(--brand-200); }
.footer-socials svg { width: 18px; height: 18px; }
.footer-links h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer-links a {
  display: block;
  padding: 0.375rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--brand-600); }

.newsletter { margin-top: 0.5rem; }
.newsletter-form { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.newsletter-form input {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.newsletter-form button { padding: 0.625rem 1.25rem; }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.back-to-top svg { width: 20px; height: 20px; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 110;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  transform: translateY(150%);
  transition: transform var(--transition-slow);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { color: var(--text-secondary); font-size: 0.9375rem; }
.cookie-banner a { color: var(--brand-600); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.5rem; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Auth, Modals & Payment
   ========================================================= */

.hidden-mobile { display: none !important; }
@media (min-width: 1024px) {
  .hidden-mobile { display: inline-flex !important; }
  .header-actions .auth-guest.hidden-mobile,
  .header-actions .auth-user.hidden-mobile { display: flex !important; }
  /* 登录态显隐由 JS 通过 body.authed 切换（!important 规则会覆盖内联样式） */
  body:not(.authed) .header-actions .auth-user.hidden-mobile { display: none !important; }
  body.authed .header-actions .auth-guest.hidden-mobile { display: none !important; }
}

.auth-guest,
.auth-user {
  align-items: center;
  gap: 0.5rem;
}

.auth-name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 已登录用户下拉框 */
.auth-user {
  position: relative;
}

.auth-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid transparent;
  border-radius: var(--radius, 0.5rem);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.auth-user-toggle:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
}

.auth-user-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform var(--transition-fast);
}

.auth-user-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.auth-user-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  padding: 0.75rem;
  border-radius: var(--radius, 0.5rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 120;
}

.auth-user-menu.open {
  display: flex;
}

.auth-user-email {
  padding: 0.5rem;
  border-radius: var(--radius, 0.5rem);
  background: var(--bg-soft);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-logout {
  width: 100%;
  justify-content: center;
  color: var(--danger, #dc2626);
}

.auth-user-logout:hover {
  color: var(--danger, #dc2626);
  background: rgba(220, 38, 38, 0.08);
}

.mobile-auth-guest,
.mobile-auth-user {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.mobile-auth-user {
  align-items: flex-start;
}

.mobile-auth-user .auth-name {
  padding: 0.5rem 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal {
  position: relative;
  width: min(100%, 420px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  transform: translateY(12px);
  transition: transform var(--transition);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal--payment {
  width: min(100%, 460px);
}

.modal h3 {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-soft);
  color: var(--text-primary);
}

.modal-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.modal-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font-weight: 600;
  cursor: pointer;
}

.modal-switch button:hover {
  text-decoration: underline;
}

.input-with-btn {
  display: flex;
  gap: 0.5rem;
}

.input-with-btn input {
  flex: 1;
  min-width: 0;
}

.input-with-btn .btn {
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.form-message {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-message.visible {
  display: block;
}

.form-message.form-error {
  background: #fee2e2;
  color: #991b1b;
}

[data-theme="dark"] .form-message.form-error {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
}

.form-message.form-success {
  background: #dcfce7;
  color: #166534;
}

[data-theme="dark"] .form-message.form-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

button:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Payment */
.payment-summary {
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.payment-summary strong {
  color: var(--brand-600);
  font-size: 1.25rem;
}

.payment-methods {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.payment-method:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.payment-method svg {
  color: var(--brand-600);
  /* 对勾默认隐藏，仅选中对应支付方式时展示 */
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.payment-method.selected {
  border-color: var(--brand-600);
  background: var(--brand-50);
}

.payment-method.selected svg {
  opacity: 1;
}

.payment-result {
  margin-top: 1rem;
  text-align: center;
}

.payment-result img {
  margin: 0 auto;
  max-width: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.payment-result p {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* =========================================================
   Homepage enhancements — Download & Contact redesign
   ========================================================= */

/* Hero enhancements */
.hero-content .badge {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12));
  color: var(--brand-700);
  border: 1px solid rgba(59,130,246,0.2);
}
.hero-visual { perspective: 1000px; }
.browser-mockup {
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotateX(0); }
  50% { transform: translateY(-10px) rotateX(2deg); }
}
.fingerprint-card {
  transition: transform var(--transition), box-shadow var(--transition);
}
.fingerprint-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

/* Download section redesign */
.download-content { max-width: 640px; }
.download-badge { margin-bottom: 1rem; }
.download-lead {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  opacity: 0.92;
  max-width: 520px;
}
.download-buttons { margin-top: 1.75rem; }
.download-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}
.download-btn.disabled:hover { background: rgba(255,255,255,0.06); }
.download-meta {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-size: 0.875rem;
  opacity: 0.9;
}
.download-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(245,158,11,0.18);
  color: #fef3c7;
  font-weight: 600;
}
.download-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.download-visual::before {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, transparent 70%);
  z-index: 0;
}
.download-visual svg { position: relative; z-index: 1; }
.version-tag {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  backdrop-filter: blur(4px);
}

/* Contact section redesign */
.contact-section {
  background:
    radial-gradient(circle at 10% 20%, rgba(59,130,246,0.08) 0%, transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(139,92,246,0.08) 0%, transparent 30%),
    var(--bg);
}
.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}
.contact-header .section-subtitle { margin-inline: auto; }
.contact-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }
.contact-info { display: grid; gap: 1.5rem; }
.contact-info-card,
.contact-social-card {
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.contact-info-card h3 { font-size: 1.25rem; font-weight: 800; }
.contact-info-card > p { margin-top: 0.5rem; color: var(--text-secondary); font-size: 0.9375rem; }
.contact-methods { margin-top: 1.25rem; display: grid; gap: 0.75rem; }
.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: inherit;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
a.contact-method:hover { border-color: var(--brand-200); background: var(--brand-50); }
.contact-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--brand-50);
  color: var(--brand-600);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-method strong { display: block; font-weight: 700; font-size: 0.9375rem; }
.contact-method span { color: var(--text-secondary); font-size: 0.9375rem; }
.contact-social-card h4 { font-size: 1.0625rem; font-weight: 700; }
.contact-social-card > p { margin-top: 0.375rem; color: var(--text-secondary); font-size: 0.9375rem; }
.contact-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.contact-socials a {
  width: 2.5rem; height: 2.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.contact-socials a:hover { color: var(--brand-600); border-color: var(--brand-200); background: var(--brand-50); }
.contact-socials svg { width: 18px; height: 18px; }

.form-card-header { margin-bottom: 1.25rem; }
.form-card-header h3 { font-size: 1.25rem; font-weight: 800; }
.form-card-header p { margin-top: 0.375rem; color: var(--text-secondary); font-size: 0.9375rem; }
.form-row {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.btn-large { width: 100%; padding: 0.875rem 1.5rem; font-size: 1rem; }
