:root {
  --bg: #0b1020;
  --bg-soft: #121a30;
  --panel: #161f38;
  --panel-2: #1b2746;
  --border: #283457;
  --text: #eef2fb;
  --muted: #9aa6c5;
  --accent: #ff9a3c;
  --accent-2: #5b8cff;
  --good: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1c2748 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* topbar */
.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 32, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-weight: 800;
  color: #1a1206;
  background: linear-gradient(135deg, var(--accent), #ffd07a);
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.tag {
  font-size: 13px;
  color: var(--muted);
}

/* hero */
.hero {
  padding: 44px 0 22px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  margin: 0 0 14px;
  background: linear-gradient(120deg, #fff 25%, #ffd6a8 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: 17px;
  color: #cdd6ee;
  max-width: 760px;
  margin: 0;
}
.lead strong {
  color: #fff;
}

/* grid layout */
.grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}
@media (max-width: 880px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel {
  padding: 22px;
}
.panel-title {
  margin: 0 0 16px;
  font-size: 16px;
  color: #fff;
}
.output {
  min-height: 420px;
}

/* form */
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field em {
  color: var(--accent);
  font-style: normal;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
input,
select,
textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s, filter 0.15s, background 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffb867);
  color: #1a1206;
  flex: 1;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--panel-2);
}
.btn-mini {
  padding: 6px 12px;
  font-size: 12.5px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.btn-mini:hover {
  background: #243156;
}
.errbox {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.4);
  color: #ffc4cd;
  font-size: 13px;
}

/* empty */
.empty {
  display: grid;
  place-content: center;
  text-align: center;
  height: 100%;
  min-height: 380px;
  color: var(--muted);
  padding: 30px;
}
.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}

/* result */
.result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.result-head h2 {
  margin: 0;
  font-size: 19px;
}
.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
}
.chip {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: #cdd6ee;
}

.block {
  margin: 22px 0;
}
.block > h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.block > h3::before {
  content: "";
  width: 6px;
  height: 16px;
  border-radius: 3px;
  background: var(--accent);
}

/* titles */
.title-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.title-list li {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14.5px;
}

/* modules */
.module {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 11px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.module-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.module-num {
  font-weight: 800;
  color: var(--accent);
  font-size: 15px;
  min-width: 22px;
}
.module-name {
  font-weight: 700;
  font-size: 15px;
}
.module-headline {
  color: #fff;
  font-weight: 600;
  margin: 4px 0;
}
.module-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0;
}
.module-meta b {
  color: #cdd6ee;
  font-weight: 600;
}
.cmp-table {
  margin-top: 8px;
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.cmp-table td {
  border: 1px solid var(--border);
  padding: 6px 9px;
}
.cmp-table td:first-child {
  color: #cdd6ee;
}
.cmp-us {
  color: var(--good);
}
.cmp-them {
  color: var(--warn);
}

/* faq */
.faq-item {
  border-bottom: 1px dashed var(--border);
  padding: 10px 0;
}
.faq-q {
  font-weight: 600;
  color: #fff;
  margin: 0 0 3px;
}
.faq-a {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

/* ab tests */
.ab-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.ab-area {
  font-weight: 700;
  color: var(--accent-2);
}
.ab-metric {
  color: var(--muted);
  font-size: 12.5px;
}

/* how */
.how {
  padding: 24px;
  margin: 26px 0 40px;
}
.how h2 {
  margin: 0 0 16px;
  font-size: 18px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 880px) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .how-grid {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
}
.how-grid h3 {
  font-size: 14.5px;
  margin: 0 0 6px;
  color: #fff;
}
.how-grid p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.copied {
  color: var(--good) !important;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.footer p {
  margin: 0;
}
