:root {
  --bg: #07040f;
  --ink: #f6f2ff;
  --muted: #b7abd0;
  --line: rgba(196, 181, 253, 0.18);
  --lila: #c4b5fd;
  --lila-mid: #a78bfa;
  --lila-deep: #6d28d9;
  --ok: #34d399;
  --err: #fb7185;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Sora", "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(50% 40% at 50% -10%, rgba(109, 40, 217, 0.35), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  width: min(640px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.head {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.4), 0 12px 30px rgba(109, 40, 217, 0.35);
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lila-mid);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.lede {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

code {
  font-size: 0.88em;
  color: var(--lila);
}

.panel,
.result {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.15rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.drop {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  min-height: 180px;
  padding: 1.25rem;
  border: 1px dashed rgba(167, 139, 250, 0.45);
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.06);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop:hover,
.drop.is-drag {
  border-color: var(--lila-mid);
  background: rgba(139, 92, 246, 0.12);
}

.drop strong {
  font-family: var(--display);
  font-size: 1.05rem;
}

.drop span {
  color: var(--muted);
  font-size: 0.88rem;
}

.drop em {
  margin-top: 0.4rem;
  font-style: normal;
  color: var(--lila);
  font-size: 0.85rem;
}

.token {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lila);
}

.token input,
.link-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.75rem 0.9rem;
  outline: none;
}

.token input:focus,
.link-row input:focus {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn {
  width: 100%;
  border: 0;
  cursor: pointer;
  min-height: 2.85rem;
  border-radius: 980px;
  font: inherit;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(135deg, #c4b5fd, #7c3aed 55%, #5b21b6);
  box-shadow: 0 12px 30px rgba(109, 40, 217, 0.35);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn.ghost {
  width: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 0 1rem;
}

.status {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.status.ok {
  color: var(--ok);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.status.err {
  color: var(--err);
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.28);
}

.status.pending {
  color: var(--lila);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.result {
  margin-top: 1rem;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  margin: 0.55rem 0 1rem;
}

.preview {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c0814;
}

.preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #0c0814;
}
