:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(17, 20, 27, 0.82);
  --panel-strong: #141820;
  --line: rgba(255, 255, 255, 0.1);
  --muted: #8f98a8;
  --text: #f5f7fb;
  --accent: #90f86c;
  --accent-deep: #62d83e;
  --danger: #ff7d7d;
  --warning: #ffd36b;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -15%, rgba(103, 217, 66, 0.12), transparent 35%),
    linear-gradient(180deg, #090c11 0%, var(--bg) 55%);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

button, textarea { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.08;
  pointer-events: none;
}
.ambient-one { top: 20%; left: -190px; background: #62ff79; }
.ambient-two { right: -220px; bottom: 10%; background: #5dc8ff; }

.site-header {
  width: min(1120px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(144, 248, 108, 0.5);
  border-radius: 9px;
  color: var(--accent);
  background: rgba(144, 248, 108, 0.08);
  font-size: 14px;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #b4bdca;
  background: rgba(255,255,255,0.025);
  font-size: 12px;
}

.privacy-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(144,248,108,0.75);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-link {
  padding: 8px 11px;
  border-radius: 8px;
  color: #aeb7c5;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  transition: color .18s, background .18s;
}
.header-link:hover,
.header-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.055);
}
.header-link.purchase-link {
  border: 1px solid rgba(144,248,108,0.24);
  color: #bdf8a8;
  background: rgba(144,248,108,0.055);
}
.header-link.purchase-link:hover { background: rgba(144,248,108,0.11); }

main {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 82px 0 56px;
}

.hero { text-align: center; margin-bottom: 48px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}
.hero h1 span {
  color: transparent;
  background: linear-gradient(95deg, #fff 12%, #9df67c 82%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-copy {
  max-width: 620px;
  margin: 24px auto 26px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.format-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}
.format-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #acb5c3;
  background: rgba(255,255,255,0.025);
  font-size: 12px;
}
.format-list b { color: var(--accent); font-size: 11px; }
.format-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
}

.converter-card {
  position: relative;
  padding: clamp(24px, 4.5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 30px 100px rgba(0,0,0,0.35);
  backdrop-filter: blur(22px);
}
.converter-card::before {
  position: absolute;
  inset: 0 12% auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(144,248,108,0.55), transparent);
}

.card-heading, .result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.card-heading { margin-bottom: 28px; }
.card-heading h2, .result-heading h2 { margin: 0; font-size: 23px; letter-spacing: -0.025em; }

.line-counter {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0,0,0,0.18);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}
.line-counter.over { color: var(--danger); border-color: rgba(255,125,125,0.4); }

.input-label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
  color: #dbe0e8;
  font-size: 13px;
  font-weight: 700;
}
.input-label span {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
}

textarea {
  display: block;
  width: 100%;
  min-height: 245px;
  resize: vertical;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  outline: none;
  color: #e5eaf1;
  background: rgba(5, 7, 10, 0.72);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.75;
  transition: border-color .2s, box-shadow .2s;
}
textarea::placeholder { color: #505867; }
textarea:focus {
  border-color: rgba(144,248,108,0.5);
  box-shadow: 0 0 0 3px rgba(144,248,108,0.07);
}

.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: transform .18s, opacity .18s, border-color .18s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.55; }
.button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 150px;
  color: #0b1408;
  background: linear-gradient(135deg, #a4fa85, var(--accent-deep));
  box-shadow: 0 10px 28px rgba(98,216,62,0.14);
}
.button.primary svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.button.ghost { border: 1px solid var(--line); color: var(--muted); background: transparent; }

.message {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255,125,125,0.28);
  border-radius: 9px;
  color: #ffc0c0;
  background: rgba(255,125,125,0.07);
  font-size: 13px;
}
.message.info {
  border-color: rgba(144,248,108,0.25);
  color: #bcf6a8;
  background: rgba(144,248,108,0.06);
}

.progress { margin-top: 22px; color: var(--muted); font-size: 12px; }
.progress-track { height: 3px; margin-bottom: 10px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,0.08); }
.progress-track i {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loading 1.2s ease-in-out infinite alternate;
}
@keyframes loading { from { transform: translateX(-80%); } to { transform: translateX(240%); } }

.result-panel { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.result-heading { align-items: center; margin-bottom: 18px; }
.result-heading span { color: var(--muted); font-size: 12px; }

.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.download-card {
  display: grid;
  grid-template-columns: 37px 1fr 20px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-align: left;
  cursor: pointer;
  background: rgba(255,255,255,0.025);
  transition: border-color .18s, background .18s, transform .18s;
}
.download-card:hover {
  transform: translateY(-2px);
  border-color: rgba(144,248,108,0.35);
  background: rgba(144,248,108,0.045);
}
.download-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 9px;
  color: var(--accent);
  background: rgba(144,248,108,0.08);
  font-size: 11px;
  font-weight: 850;
}
.download-logo {
  display: block;
  width: 37px;
  height: 37px;
  border-radius: 9px;
  object-fit: cover;
}
.download-card strong, .download-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.download-card strong { margin-bottom: 4px; font-size: 13px; }
.download-card small { color: var(--muted); font-size: 10px; }
.download-card > svg { width: 18px; fill: none; stroke: #788292; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.failure-list {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,211,107,0.22);
  border-radius: 9px;
  color: #e8c978;
  background: rgba(255,211,107,0.05);
  font-size: 12px;
  line-height: 1.7;
}
.failure-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}
.failure-heading strong { display: block; }
.copy-errors {
  padding: 5px 9px;
  border: 1px solid rgba(255,211,107,0.28);
  border-radius: 6px;
  color: #f1d78f;
  background: rgba(255,211,107,0.07);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.copy-errors:hover { background: rgba(255,211,107,0.13); }

.privacy-note {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 680px;
  margin: 28px auto 0;
  padding: 15px 18px;
  color: var(--muted);
}
.privacy-note .shield {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(144,248,108,0.3);
  border-radius: 50%;
  color: var(--accent);
  font-size: 12px;
}
.privacy-note strong { display: block; margin-bottom: 3px; color: #cbd2dc; font-size: 12px; }
.privacy-note p { margin: 0; font-size: 11px; line-height: 1.6; }

.guide-page { width: min(820px, calc(100% - 40px)); padding-top: 72px; }
.guide-hero { max-width: 670px; margin-bottom: 38px; }
.guide-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}
.guide-hero h1 span {
  color: transparent;
  background: linear-gradient(95deg, #fff 12%, #9df67c 82%);
  background-clip: text;
  -webkit-background-clip: text;
}
.guide-hero > p:last-child {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.guide-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 64px;
}
.guide-index a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #c4cbd5;
  background: rgba(255,255,255,0.025);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.guide-index a:hover { border-color: rgba(144,248,108,0.35); }
.guide-index b,
.guide-index img {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.guide-index b {
  color: var(--accent);
  background: rgba(144,248,108,0.08);
  font-size: 10px;
}
.guide-section { margin-bottom: 64px; scroll-margin-top: 24px; }
.guide-section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.guide-section-heading > span,
.guide-section-heading > img {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
}
.guide-section-heading > span {
  border: 1px solid rgba(144,248,108,0.16);
  color: var(--accent);
  background: rgba(144,248,108,0.07);
  font-size: 11px;
  font-weight: 850;
}
.guide-section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -0.03em; }
.guide-section-heading .eyebrow { margin-bottom: 5px; }
.guide-steps { border-top: 1px solid var(--line); }
.guide-steps article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.guide-steps article > span {
  color: #697282;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}
.guide-steps h3 { margin: 0 0 7px; font-size: 15px; }
.guide-steps p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.guide-steps code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #c7f5b7;
  background: rgba(144,248,108,0.07);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.guide-figure {
  margin: 18px 0 2px;
}
.guide-figure img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 12px;
  background: #eef1f3;
}
.guide-figure figcaption {
  margin-top: 8px;
  color: #697282;
  font-size: 11px;
}
.guide-warning {
  margin: -12px 0 28px;
  padding: 16px 18px;
  border: 1px solid rgba(255,211,107,0.2);
  border-radius: 11px;
  color: #d9c17f;
  background: rgba(255,211,107,0.045);
}
.guide-warning strong { display: block; margin-bottom: 5px; font-size: 12px; }
.guide-warning p { margin: 0; font-size: 11px; line-height: 1.65; }
.guide-back { width: fit-content; text-decoration: none; }

footer {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: #596170;
  text-align: center;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
footer span { margin: 0 7px; color: var(--accent); }

@media (max-width: 720px) {
  main { padding-top: 58px; }
  .hero { margin-bottom: 34px; }
  .hero h1 { font-size: clamp(38px, 12vw, 56px); }
  .download-grid { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 40px 1fr 20px; }
  .guide-index { grid-template-columns: 1fr; margin-bottom: 48px; }
}

@media (max-width: 480px) {
  .site-header, main, footer { width: min(100% - 24px, 920px); }
  .site-header { height: 66px; }
  .privacy-pill { padding: 7px 9px; }
  .privacy-pill { display: none; }
  .header-actions { gap: 2px; }
  .header-link { padding: 7px 8px; }
  .guide-body .brand > span:last-child { display: none; }
  .guide-body .header-link { padding-inline: 6px; font-size: 10px; }
  main { padding-top: 44px; }
  .hero-copy { font-size: 14px; }
  .format-list span { font-size: 10px; }
  .converter-card { padding: 21px 16px; border-radius: 16px; }
  .input-label { display: block; }
  .input-label span { display: block; margin-top: 5px; }
  textarea { min-height: 280px; padding: 14px; }
  .form-actions { display: grid; grid-template-columns: 1fr auto; }
  .button.primary { min-width: 0; }
  .result-heading { align-items: flex-end; }
  .guide-page { width: min(100% - 24px, 820px); }
  .guide-hero h1 { font-size: 40px; }
  .guide-section { margin-bottom: 48px; }
  .guide-steps article { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
}
