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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #0f172a;
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.container--narrow {
  width: min(760px, calc(100% - 40px));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: #e2e8f0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-logo,
.footer-brand img {
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.nav-desktop {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  color: #475569;
}

.nav-desktop a:hover {
  color: #2563eb;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: #334155;
  border-radius: 2px;
  margin-inline: auto;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 110;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100%;
  background: #fff;
  z-index: 120;
  padding: 80px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 1.05rem;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

body.nav-open .nav-drawer {
  transform: translateX(0);
}

.nav-drawer a {
  color: #334155;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(59, 130, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(99, 102, 241, 0.12), transparent),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 70%);
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 999px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-subtitle {
  margin: 8px 0 16px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: #2563eb;
}

.hero-desc {
  margin: 0 0 20px;
  color: #64748b;
  max-width: 28em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tag {
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.btn-ghost {
  background: #fff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.btn-light {
  background: #fff;
  color: #2563eb;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-banner {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.hero-qr-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
  border: 1px solid #e2e8f0;
}

.hero-qr-label {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #64748b;
}

.hero-qr {
  margin-inline: auto;
  border-radius: 12px;
}

.hero-qr-hint {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero-tags,
  .hero-actions {
    justify-content: center;
  }
}

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

.section--muted {
  background: #fff;
}

.section--tools {
  background: #fff;
  border-radius: 24px 24px 0 0;
  margin-top: -16px;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.04);
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-mark {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #6366f1);
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.section-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.feature-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Invite */
.invite-strip {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  padding: 28px 0;
}

.invite-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.invite-badge {
  flex-shrink: 0;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.invite-text {
  flex: 1;
  min-width: 200px;
}

.invite-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.invite-desc {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
  line-height: 1.5;
}

/* Tools */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.cat-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.cat-tab:hover {
  border-color: #bfdbfe;
  color: #2563eb;
}

.cat-tab.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tool-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 16px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
}

body.tool-modal-open {
  overflow: hidden;
}

.tool-item:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.tool-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.tool-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.tool-name {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: #334155;
}

.tool-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  color: #fff;
  line-height: 1.3;
}

.tool-tag--hot {
  background: #ef4444;
}

.tool-tag--new {
  background: #10b981;
}

.tool-tag--rec {
  background: #f97316;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tool usage modal */
.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tool-modal[hidden] {
  display: none;
}

.tool-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.tool-modal-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(88vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  animation: tool-modal-in 0.22s ease;
}

@keyframes tool-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tool-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.tool-modal-close:hover {
  background: #e2e8f0;
  color: #334155;
}

.tool-modal-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-right: 28px;
}

.tool-modal-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.tool-modal-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.tool-modal-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.tool-modal-intro {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
}

.tool-modal-steps {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.65;
}

.tool-modal-steps li + li {
  margin-top: 8px;
}

.tool-modal-tip {
  margin: 0 0 20px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #92400e;
  background: #fffbeb;
  border-radius: 12px;
  border: 1px solid #fde68a;
  line-height: 1.5;
}

.tool-modal-cta {
  width: 100%;
  text-align: center;
}

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.benefit-card {
  padding: 24px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.benefit-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #2563eb;
}

.benefit-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: #0f172a;
}

.faq-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
}

.faq-a {
  padding: 0 20px 18px;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.65;
}

/* CTA */
.cta {
  background: linear-gradient(160deg, #1e3a8a 0%, #312e81 100%);
  color: #fff;
  padding: 56px 0;
}

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

.cta-title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.cta-desc {
  margin: 0;
  opacity: 0.85;
}

.cta-qr {
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cta-qr img {
  margin-inline: auto;
  border-radius: 10px;
  background: #fff;
}

.cta-brand {
  margin: 12px 0 0;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 32px;
  font-size: 0.9rem;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  font-weight: 600;
}

.footer-heading {
  margin: 0 0 12px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a:hover,
.footer-legal a:hover {
  color: #fff;
}

.footer-contact {
  margin: 0;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-copy:empty {
  display: none;
}

.footer-icp {
  margin: 0;
}

.footer-icp.is-hidden {
  display: none;
}

.footer-icp a {
  color: #94a3b8;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-icp a:hover {
  color: #e2e8f0;
}

.footer-legal a {
  color: #94a3b8;
}

#icpLink {
  color: #64748b;
  font-size: 0.85rem;
}

#icpLink:hover {
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Legal pages */
.page-legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.page-legal h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.page-legal .back {
  display: inline-block;
  margin-bottom: 24px;
  color: #2563eb;
}

.page-legal h2 {
  font-size: 1.1rem;
  margin-top: 28px;
}

.page-legal p,
.page-legal li {
  color: #475569;
  line-height: 1.7;
}

.page-legal .legal-icp {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.page-legal .legal-icp a {
  color: #64748b;
}
