:root {
  color-scheme: dark;
  --ink: #f5f6ff;
  --muted: #969db9;
  --cyan: #7cf7ff;
  --violet: #8b7cff;
  --pink: #ff72d2;
  --panel: rgba(11, 14, 34, .76);
  --border: rgba(154, 168, 255, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: #03040b;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, #111635 0, #050713 38%, #020309 76%);
}

.aurora {
  position: fixed;
  z-index: -2;
  width: 44rem;
  height: 44rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .12;
  pointer-events: none;
  animation: drift 15s ease-in-out infinite alternate;
}

.aurora-one { top: -20rem; left: -15rem; background: var(--violet); }
.aurora-two { right: -20rem; top: 35%; background: var(--pink); animation-delay: -7s; }

.site-header, main, footer { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -.04em;
}

.brand-two { color: var(--cyan); }

.privacy-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #c0c5da;
  background: rgba(9, 12, 29, .5);
  font-size: .76rem;
  letter-spacing: .04em;
}

.pulse { width: 7px; height: 7px; border-radius: 50%; background: #75ffc6; box-shadow: 0 0 10px #75ffc6; animation: pulse 2s ease-in-out infinite; }

.intro { max-width: 850px; padding: 58px 0 42px; }
.intro h1 { margin: 13px 0 19px; font-size: clamp(2.25rem, 5.4vw, 4.7rem); line-height: 1; letter-spacing: -.06em; font-weight: 600; }
.intro p:not(.section-kicker) { max-width: 790px; margin: 0 0 12px; color: #a4abc4; font-size: .98rem; line-height: 1.72; }
.intro code { color: #c4cae0; font: .9em "DM Mono", monospace; }

.converter-shell { position: relative; }

.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(17,21,48,.88), var(--panel));
  box-shadow: 0 24px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(20px);
}

.panel-heading, .panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.panel-heading { border-bottom: 1px solid var(--border); }
.panel-heading > div { display: flex; align-items: center; gap: 13px; }
.panel h3 { margin: 0; font-size: .92rem; font-weight: 500; letter-spacing: .01em; }
.step { color: var(--cyan); font: 500 .68rem "DM Mono", monospace; }

.upload-button, button { font: inherit; }
.upload-button {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px; cursor: pointer;
  color: #d9dcf0; border: 1px solid rgba(124,247,255,.22); border-radius: 9px; background: rgba(124,247,255,.06); font-size: .76rem;
  transition: border-color .2s, background .2s, transform .2s;
}
.upload-button:hover { border-color: rgba(124,247,255,.55); background: rgba(124,247,255,.11); transform: translateY(-1px); }
.upload-button svg, button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.textarea-wrap { position: relative; min-height: 220px; }
textarea {
  display: block; width: 100%; min-height: 220px; padding: 24px; resize: vertical; outline: none;
  border: 0; color: #dfe7ff; background: rgba(3,5,16,.28); font: 400 .79rem/1.75 "DM Mono", monospace;
}
textarea::placeholder { color: #646b88; }
textarea:focus { box-shadow: inset 0 0 0 1px rgba(124,247,255,.3); }

.drop-hint { position: absolute; right: 22px; bottom: 16px; color: #575e79; font-size: .67rem; pointer-events: none; }
.dragging { border-color: rgba(124,247,255,.7); box-shadow: 0 0 35px rgba(124,247,255,.12); }
.dragging .textarea-wrap::after { content: "RELEASE TO LOAD KEY"; position: absolute; inset: 10px; display: grid; place-items: center; border: 1px dashed var(--cyan); border-radius: 12px; color: var(--cyan); background: rgba(5,11,27,.94); font: 500 .78rem "DM Mono"; letter-spacing: .12em; }

.panel-footer { min-height: 62px; border-top: 1px solid var(--border); color: #727a98; font-size: .72rem; }
.text-button { border: 0; padding: 5px; cursor: pointer; color: #858da9; background: none; font-size: .72rem; }
.text-button:hover { color: var(--ink); }

.transfer-row { height: 75px; display: flex; align-items: center; justify-content: center; }
.transfer-row > span { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, rgba(124,247,255,.35)); }
.transfer-row > span:last-child { transform: rotate(180deg); }
.transfer-node { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(124,247,255,.32); border-radius: 50%; color: var(--cyan); background: #0b1024; box-shadow: 0 0 24px rgba(124,247,255,.12); }
.transfer-node svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }

.output-panel { border-color: rgba(139,124,255,.25); }
.format-badge { padding: 6px 10px; border: 1px solid rgba(139,124,255,.25); border-radius: 7px; color: #aaa0ff; background: rgba(139,124,255,.07); font: 500 .62rem "DM Mono"; }
.output-panel textarea { color: #cbd1ff; }
.empty-orbit { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%,-50%); opacity: .18; }
.empty-orbit span { position: absolute; inset: 7px; border: 1px solid var(--violet); border-radius: 50%; }
.empty-orbit i { position: absolute; inset: 0; border: 1px solid var(--cyan); border-radius: 50%; transform: rotateX(65deg) rotateZ(-18deg); }
.has-output .empty-orbit { display: none; }

.status-line { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #727a98; }
.status-line.success { color: #9eeac8; }
.status-line.success .status-dot { background: #75ffc6; box-shadow: 0 0 9px #75ffc6; }
.status-line.error { color: #ff9db1; }
.status-line.error .status-dot { background: #ff6c8a; box-shadow: 0 0 9px #ff6c8a; }

.output-footer { flex-wrap: wrap; }
.actions { display: flex; gap: 9px; }
.actions button { display: flex; align-items: center; gap: 8px; border-radius: 9px; padding: 10px 15px; cursor: pointer; font-size: .75rem; transition: transform .2s, filter .2s, opacity .2s; }
.actions button:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.15); }
.actions button:disabled { cursor: not-allowed; opacity: .35; }
.secondary-button { color: #ccd1e5; border: 1px solid var(--border); background: rgba(255,255,255,.035); }
.primary-button { color: #090b19; border: 0; background: linear-gradient(110deg, var(--cyan), #b1a7ff); font-weight: 600 !important; box-shadow: 0 0 24px rgba(124,247,255,.14); }

.how-it-works { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; padding: 125px 0 100px; }
.section-kicker { color: var(--cyan); font: 500 .65rem "DM Mono"; letter-spacing: .18em; }
.how-it-works h2 { max-width: 390px; margin: 14px 0 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; letter-spacing: -.05em; }
.section-copy { max-width: 450px; margin: 22px 0 0; color: #858da8; font-size: .84rem; line-height: 1.7; }
.how-it-works ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.how-it-works li { position: relative; display: flex; gap: 18px; padding: 0 0 32px; }
.how-it-works li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 36px; bottom: 2px; width: 1px; background: linear-gradient(var(--violet), rgba(139,124,255,.08)); }
.how-it-works li > span { flex: 0 0 33px; height: 33px; display: grid; place-items: center; border: 1px solid rgba(139,124,255,.35); border-radius: 50%; color: #b5adff; background: #0a0d20; font: .67rem "DM Mono"; }
.how-it-works strong { display: block; margin: 4px 0 7px; font-size: .94rem; font-weight: 500; }
.how-it-works small { display: block; color: #858da8; font-size: .78rem; line-height: 1.55; }
.how-it-works code { color: #aeb7d7; font: .75rem "DM Mono"; }

.faq { padding: 0 0 110px; }
.faq-heading { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: end; margin-bottom: 38px; }
.faq-heading h2 { max-width: 600px; margin: 0; font-size: clamp(1.8rem, 3.7vw, 3rem); line-height: 1.07; letter-spacing: -.045em; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.faq article { padding: 27px 28px; border: 1px solid var(--border); border-radius: 17px; background: rgba(11,14,34,.62); backdrop-filter: blur(15px); }
.faq h3 { margin: 0 0 11px; font-size: .96rem; font-weight: 500; }
.faq p { margin: 0; color: #858da8; font-size: .8rem; line-height: 1.68; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 27px 0 36px; border-top: 1px solid rgba(154,168,255,.1); color: #646b84; font-size: .69rem; }
footer span:first-child { color: #9198b0; font-weight: 600; }

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

@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 3px #75ffc6; } }
@keyframes drift { to { transform: translate(80px, 50px) scale(1.12); } }

@media (max-width: 720px) {
  .site-header, main, footer { width: min(100% - 24px, 1120px); }
  .site-header { min-height: 76px; }
  .privacy-pill { font-size: 0; padding: 10px; }
  .intro { padding: 38px 0 34px; }
  .panel-heading, .panel-footer { padding: 16px; }
  textarea { padding: 18px 16px; min-height: 250px; font-size: .72rem; }
  .textarea-wrap { min-height: 250px; }
  .drop-hint { display: none; }
  .output-footer { align-items: stretch; }
  .actions { width: 100%; }
  .actions button { flex: 1; justify-content: center; }
  .how-it-works { grid-template-columns: 1fr; gap: 45px; padding: 95px 0 75px; }
  .faq { padding-bottom: 75px; }
  .faq-heading { grid-template-columns: 1fr; gap: 13px; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq article { padding: 23px 21px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
