:root {
  --ink: #eef4ff;
  --muted: #91a1ba;
  --soft: #bac7da;
  --line: rgba(185, 204, 235, 0.15);
  --line-strong: rgba(185, 204, 235, 0.28);
  --panel: rgba(18, 29, 49, 0.78);
  --panel-solid: #111c30;
  --background: #08111f;
  --orange: #ff9f68;
  --orange-strong: #f27b3d;
  --blue: #78b8ff;
  --green: #86e1ba;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -4%, rgba(75, 131, 211, 0.24), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(238, 121, 61, 0.16), transparent 28%),
    linear-gradient(145deg, #08111f 0%, #0d192b 54%, #101a2a 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 42px 0 30px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 11px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

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

h1 {
  max-width: 680px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.subtitle {
  max-width: 540px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(17, 29, 49, 0.48);
  color: var(--soft);
}

.privacy-note strong,
.privacy-note span {
  display: block;
}

.privacy-note strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.privacy-note span:not(.privacy-icon) {
  color: var(--muted);
  font-size: 11px;
}

.privacy-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: rgba(134, 225, 186, 0.12);
  color: var(--green);
  font-size: 20px;
}

.workspace-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.workspace-card {
  padding: clamp(22px, 4vw, 34px);
}

.result-card {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
  border-color: rgba(134, 225, 186, 0.24);
  background: linear-gradient(145deg, rgba(21, 48, 56, 0.86), rgba(17, 29, 49, 0.88));
}

.is-hidden {
  display: none;
}

.section-heading,
.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h2 {
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.045em;
}

.text-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
}

.text-button:hover {
  color: var(--ink);
}

textarea {
  display: block;
  width: 100%;
  min-height: 126px;
  resize: vertical;
  padding: 18px 19px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  outline: 0;
  color: var(--ink);
  background: rgba(5, 13, 26, 0.62);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea::placeholder {
  color: #62738e;
}

textarea:focus {
  border-color: rgba(120, 184, 255, 0.76);
  box-shadow: 0 0 0 4px rgba(120, 184, 255, 0.1);
}

.controls-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
}

.mode-switch {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-switch legend {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.mode-option {
  display: block;
  min-width: 166px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(9, 19, 34, 0.5);
  color: var(--soft);
  transition: 160ms ease;
}

.mode-option:hover,
.mode-option.is-selected {
  border-color: rgba(120, 184, 255, 0.55);
  background: rgba(72, 119, 177, 0.14);
}

.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-option strong,
.mode-option small {
  display: block;
}

.mode-option strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.mode-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.primary-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  font-weight: 700;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button {
  min-width: 144px;
  padding: 14px 19px;
  color: #251307;
  background: linear-gradient(135deg, #ffb27e, var(--orange-strong));
  box-shadow: 0 10px 25px rgba(242, 123, 61, 0.18);
}

.primary-button:hover,
.copy-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  padding: 7px 11px;
  border: 1px solid rgba(134, 225, 186, 0.24);
  border-radius: 999px;
  color: var(--green);
  background: rgba(134, 225, 186, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.result-url-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px 15px 18px;
  border: 1px solid rgba(134, 225, 186, 0.22);
  border-radius: 16px;
  background: rgba(4, 15, 23, 0.5);
}

.result-url {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #d7ffe9;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  text-decoration: none;
}

.result-url:hover {
  text-decoration: underline;
}

.resolved-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.copy-button {
  flex: 0 0 auto;
  padding: 10px 13px;
  color: #d7ffe9;
  background: rgba(134, 225, 186, 0.15);
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.stat-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 19, 34, 0.38);
}

.stat-item span,
.stat-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat-item strong {
  display: inline-block;
  margin: 7px 5px 3px 0;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: -0.04em;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.detail-panel {
  min-height: 108px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(9, 19, 34, 0.36);
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.detail-title h3 {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-orange {
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 159, 104, 0.55);
}

.dot-blue {
  background: var(--blue);
  box-shadow: 0 0 12px rgba(120, 184, 255, 0.55);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag,
.empty-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.tag {
  color: var(--soft);
  background: rgba(145, 161, 186, 0.12);
}

.tag em {
  margin-left: 6px;
  color: var(--muted);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  font-style: normal;
}

.empty-tag {
  color: var(--muted);
  background: rgba(145, 161, 186, 0.06);
}

.how-it-works {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
  align-items: start;
  padding: 38px 6px 30px;
}

.how-it-works h2 {
  font-size: clamp(22px, 3vw, 32px);
}

.how-it-works > p {
  padding-top: 21px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--soft);
  background: rgba(145, 161, 186, 0.12);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}

footer {
  color: #60718a;
  font-size: 11px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(134, 225, 186, 0.3);
  border-radius: 12px;
  color: #d7ffe9;
  background: #122a2a;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 700px) {
  .app-shell {
    width: min(100% - 22px, 980px);
    padding-top: 26px;
  }

  .hero,
  .controls-row,
  .how-it-works {
    display: block;
  }

  .privacy-note {
    width: fit-content;
    min-width: 0;
    margin-top: 22px;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mode-option {
    min-width: 0;
  }

  .primary-button {
    width: 100%;
    margin-top: 16px;
  }

  .result-url-wrap {
    display: block;
  }

  .copy-button {
    width: 100%;
    margin-top: 12px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    padding-inline: 2px;
  }

  .how-it-works > p {
    padding-top: 16px;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 48px;
  }

  .stats-grid {
    gap: 7px;
  }

  .stat-item {
    padding: 12px 10px;
  }

  .stat-item strong {
    font-size: 22px;
  }
}
