:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --bg: #07130f;
  --card: rgba(14, 31, 24, 0.94);
  --card-border: rgba(93, 220, 154, 0.17);
  --text: #f2fff8;
  --muted: #9cb8aa;
  --green: #31d982;
  --green-dark: #0b9f59;
  --danger: #ff7272;
  --success: #4ce39a;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(42, 210, 125, 0.13), transparent 32rem),
    radial-gradient(circle at 90% 86%, rgba(23, 125, 83, 0.16), transparent 28rem),
    linear-gradient(145deg, #050d0a, var(--bg));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.24;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
}

.editor-card {
  width: min(100%, 560px);
  padding: clamp(28px, 6vw, 48px);
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}

.icon-wrap {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  place-items: center;
  border: 1px solid rgba(77, 226, 151, .28);
  border-radius: 18px;
  color: var(--green);
  background: linear-gradient(145deg, rgba(52, 221, 135, .18), rgba(52, 221, 135, .05));
  box-shadow: 0 12px 32px rgba(24, 199, 108, .12);
}

.icon-wrap svg { width: 30px; fill: currentColor; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(28px, 6vw, 40px); letter-spacing: -.03em; }

.description {
  max-width: 430px;
  margin: 16px auto 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

form { text-align: left; }

label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  color: var(--text);
  font: 500 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
  border: 1px solid rgba(168, 207, 187, .2);
  border-radius: 13px;
  background: rgba(3, 13, 9, .62);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input::placeholder { color: #698276; }
input:hover { border-color: rgba(93, 220, 154, .35); }
input:focus { border-color: var(--green); background: rgba(3, 13, 9, .85); box-shadow: 0 0 0 4px rgba(49, 217, 130, .11); }
input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 114, 114, .09); }

.input-hint { margin: 8px 2px 20px; color: #718d7f; font-size: 12px; }

button {
  display: flex;
  width: 100%;
  height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: #032315;
  font-size: 15px;
  font-weight: 800;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #57e99f, #26cc76);
  box-shadow: 0 12px 28px rgba(26, 204, 113, .2);
  transition: transform .18s, box-shadow .18s, filter .18s;
}

button:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 16px 35px rgba(26, 204, 113, .29); }
button:active { transform: translateY(0); }
button:focus-visible { outline: 3px solid rgba(87, 233, 159, .4); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .72; transform: none; filter: none; }
button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.status {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  line-height: 1.55;
  border-radius: 11px;
}

.status.show { display: block; }
.status.error { color: #ffc2c2; border: 1px solid rgba(255, 114, 114, .22); background: rgba(255, 114, 114, .08); }
.status.success { color: #b6f8d7; border: 1px solid rgba(76, 227, 154, .22); background: rgba(76, 227, 154, .08); }

.download-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border: 0;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: #6f8f7f;
  font-size: 11px;
  line-height: 1.5;
}

.security-note svg { flex: 0 0 auto; width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 480px) {
  .editor-card { padding: 30px 20px; border-radius: 22px; }
  .description { font-size: 14px; }
  input { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
