:root {
  --bg: #faf9f6;
  --bg-elevated: #ffffff;
  --bg-subtle: #f2f0eb;
  --text: #18181b;
  --text-muted: #52525b;
  --border: #e4e4e7;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --sage: #10b981;
  --coral: #f97316;
  --violet: #8b5cf6;
  --blue: #3b82f6;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 1120px;
}

[data-theme="dark"] {
  --bg: #0c0c0f;
  --bg-elevated: #141419;
  --bg-subtle: #1c1c24;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 36px -12px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background-color: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Hero */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  max-width: 780px;
  margin: 0 auto 20px;
}

.hero p {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.hero-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--bg-elevated);
  max-width: 960px;
  margin: 0 auto;
}

.hero-banner img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-top: 4px;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.app-card.hidden {
  display: none;
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
}

.tone-blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.tone-sage { background: rgba(16, 185, 129, 0.12); color: #059669; }
.tone-coral { background: rgba(249, 115, 22, 0.12); color: #ea580c; }
.tone-violet { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.tone-amber { background: rgba(245, 158, 11, 0.14); color: #d97706; }

[data-theme="dark"] .tone-blue { color: #60a5fa; }
[data-theme="dark"] .tone-sage { color: #34d399; }
[data-theme="dark"] .tone-coral { color: #fb923c; }
[data-theme="dark"] .tone-violet { color: #a78bfa; }
[data-theme="dark"] .tone-amber { color: #fbbf24; }

.category-tag {
  font-size: 0.76rem;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.app-card h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.app-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.platforms {
  display: flex;
  gap: 6px;
}

.platform-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.status-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.value-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

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

.value-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Legal & Support Pages */
.page-header {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.prose {
  max-width: 780px;
  padding-bottom: 64px;
}

.prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 32px 0 12px;
  letter-spacing: -0.015em;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 12px;
}

.prose ul {
  padding-left: 22px;
  margin-bottom: 16px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Support Form */
.support-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding-bottom: 64px;
}

.card-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
}

.form-control:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

textarea.form-control {
  min-height: 130px;
  resize: vertical;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h4 {
  font-size: 0.98rem;
  font-weight: 650;
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-left {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-left strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 48px 0 36px;
  }
}
