:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-soft: #edf5ff;
  --text: #142033;
  --muted: #64748b;
  --line: #dbe7f6;
  --primary: #1767ff;
  --primary-dark: #0f4ed8;
  --primary-light: #42a5ff;
  --accent: #0d8bff;
  --accent-soft: #eaf4ff;
  --warning: #b45309;
  --shadow: 0 18px 48px rgba(23, 103, 255, 0.14);
  --shadow-soft: 0 10px 32px rgba(20, 32, 51, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 420px),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

textarea,
input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

textarea:focus,
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 103, 255, 0.24);
  outline-offset: 2px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  padding: 12px;
}

input,
select {
  padding: 0 12px;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 231, 246, 0.86);
  background: rgba(247, 251, 255, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  color: #0f2a52;
  font-weight: 800;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(23, 103, 255, 0.2);
}

.nav-links {
  gap: 8px;
}

.nav-links a {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--primary-dark);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 76% 24%, rgba(23, 103, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #edf6ff 52%, #f7fbff 100%);
  overflow: hidden;
}

.hero::before {
  position: absolute;
  inset: 140px auto auto -90px;
  width: 420px;
  height: 420px;
  border: 28px solid rgba(23, 103, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 64px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
  color: #0f2a52;
}

h2 {
  margin-bottom: 10px;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-text {
  max-width: 680px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 18px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.hero-tags span {
  border: 1px solid rgba(23, 103, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
  max-width: 680px;
  padding: 8px;
  border: 1px solid rgba(23, 103, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.search-panel input {
  border: 0;
  background: transparent;
}

.search-panel button,
.tool-actions button,
.copy-btn {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-weight: 700;
}

.search-panel button:hover,
.tool-actions button:hover,
.copy-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.hero-brand-panel {
  position: relative;
  display: grid;
  gap: 18px;
  align-self: end;
}

.hero-logo-wrap {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid rgba(23, 103, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 50% 48%, rgba(23, 103, 255, 0.14), transparent 58%);
  box-shadow: var(--shadow);
}

.hero-logo {
  width: min(220px, 68%);
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 22px 36px rgba(23, 103, 255, 0.22));
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-stats div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(23, 103, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  padding: 16px;
}

.hero-stats strong {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  color: var(--muted);
}

.category-band,
.tools-section,
.features,
.contact {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.category-band {
  padding: 26px 0 10px;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-list button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 16px;
  box-shadow: var(--shadow-soft);
}

.category-list button[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-weight: 800;
}

.tools-section {
  padding: 36px 0 56px;
}

.section-heading {
  margin-bottom: 22px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.tool-card:hover {
  border-color: rgba(23, 103, 255, 0.34);
  box-shadow: 0 16px 38px rgba(23, 103, 255, 0.12);
  transform: translateY(-2px);
}

.tool-card header {
  padding: 20px 20px 0;
}

.tool-category {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
}

.tool-card p {
  color: var(--muted);
}

.tool-body {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-actions button,
.copy-btn {
  padding: 0 14px;
}

.secondary {
  border: 1px solid var(--line);
  background: #fff !important;
  color: var(--text) !important;
}

.secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark) !important;
}

.output {
  min-height: 46px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.result-row code {
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 0 56px;
}

.feature {
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.feature p,
.contact p {
  color: var(--muted);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 44px 0;
}

.contact-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 24px max(16px, calc((100% - 1180px) / 2));
  color: var(--muted);
}

.footer-main,
.footer-compliance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-main {
  color: var(--text);
  font-weight: 700;
}

.footer-compliance {
  justify-content: flex-end;
  font-size: 14px;
}

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

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.legal-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.legal-content a {
  color: var(--primary-dark);
  font-weight: 800;
}

@media (max-width: 820px) {
  .hero-inner,
  .tool-grid,
  .features {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 48px 0 42px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .contact,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-compliance {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .search-panel,
  .inline-grid,
  .result-row {
    grid-template-columns: 1fr;
  }

  .search-panel button {
    width: 100%;
  }

  h1 {
    font-size: 38px;
  }
}
