:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --card: rgba(22, 24, 31, 0.88);
  --card-border: rgba(255,255,255,0.08);
  --text: #f6f7fb;
  --muted: #a6abba;
  --input: #11131a;
  --input-border: rgba(255,255,255,0.10);
  --accent: #e6e8ef;
  --accent-text: #101116;
  --success: #8bd6aa;
  --danger: #ff9eaa;
  --shadow: 0 30px 90px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 15%, rgba(255,255,255,.06), transparent 32rem),
    var(--bg);
  color: var(--text);
}

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

.card {
  width: min(100%, 680px);
  border: 1px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f3f4f7;
  color: #101116;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

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

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -.035em;
}

.subtitle {
  margin: 18px 0 28px;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 650;
  color: #d8dbe4;
}

.input-row,
.link-row {
  display: flex;
  gap: 10px;
}

input {
  min-width: 0;
  flex: 1;
  height: 50px;
  border: 1px solid var(--input-border);
  background: var(--input);
  color: var(--text);
  border-radius: 13px;
  padding: 0 15px;
  outline: none;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus {
  border-color: rgba(255,255,255,.27);
  box-shadow: 0 0 0 4px rgba(255,255,255,.045);
}

button {
  height: 50px;
  border: 0;
  border-radius: 13px;
  padding: 0 19px;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

button.secondary {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
}

.status-card,
.result-card,
.error-card {
  margin-top: 18px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,.035);
  border-radius: 16px;
  padding: 16px;
}

.status-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  color: #daddE7;
  font-size: 13px;
}

#status-percent {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fafafa, #bfc5d2);
  transition: width .25s ease;
}

.result-copy {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.result-copy strong,
.result-copy span {
  display: block;
}

.result-copy span:not(.success-dot) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.success-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(139,214,170,.09);
}

.error-card {
  color: var(--danger);
  line-height: 1.45;
  font-size: 13px;
}

footer {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: #757b89;
  font-size: 12px;
}

.dot { opacity: .55; }
.hidden { display: none !important; }

@media (max-width: 620px) {
  .shell { padding: 16px; }
  .card { padding: 24px 18px; border-radius: 20px; }
  .input-row, .link-row { flex-direction: column; }
  button { width: 100%; }
}
