:root {
  color-scheme: dark;
  --bg: #07101e;
  --panel: rgba(17, 29, 48, .88);
  --panel-2: #16243a;
  --text: #f4f7fb;
  --muted: #a9b7ca;
  --line: rgba(255,255,255,.11);
  --accent: #ff7a18;
  --accent-2: #ff9f43;
  --danger: #ff6b6b;
  --success: #38d996;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(255,122,24,.18), transparent 32rem),
    radial-gradient(circle at 100% 25%, rgba(37,99,235,.18), transparent 35rem),
    var(--bg);
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(720px, calc(100% - 28px));
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #15100c;
  font-weight: 900;
  font-size: 26px;
  box-shadow: 0 12px 32px rgba(255,122,24,.25);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 { margin: 0; font-size: clamp(23px, 5vw, 32px); }
h2 { margin: 0 0 8px; font-size: clamp(25px, 6vw, 38px); line-height: 1.08; }
h3 { margin: 0; }
p { line-height: 1.55; }

.panel {
  padding: clamp(20px, 5vw, 34px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
}

.intro p {
  margin: 0 0 24px;
  color: var(--muted);
}

label {
  display: block;
  margin: 16px 0 8px;
  color: #dce5f0;
  font-size: 13px;
  font-weight: 750;
}

.url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

input, select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #0b1627;
  transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus {
  border-color: rgba(255,159,67,.8);
  box-shadow: 0 0 0 4px rgba(255,122,24,.12);
}

button, .link-button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 850;
}

.primary {
  display: inline-grid;
  width: 100%;
  place-items: center;
  margin-top: 14px;
  padding: 0 18px;
  color: #17110b;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 13px 28px rgba(255,122,24,.2);
}

.primary:disabled {
  cursor: not-allowed;
  filter: grayscale(.65);
  opacity: .6;
}

.secondary {
  padding: 0 17px;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.notice {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(255,107,107,.35);
  border-radius: 13px;
  color: #ffdede;
  background: rgba(255,107,107,.1);
}

.notice.info {
  color: #dcecff;
  border-color: rgba(96,165,250,.3);
  background: rgba(59,130,246,.1);
}

.preview {
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0c1728;
}

.preview img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  background: #050b13;
}

.preview-body { padding: 18px; }

.preview h3 {
  margin: 4px 0 10px;
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1.25;
}

.source {
  margin: 0;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.metadata span:not(:empty) {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.progress-card, .result-card {
  margin-top: 20px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0c1728;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

progress {
  width: 100%;
  height: 12px;
  margin-top: 13px;
  accent-color: var(--accent);
}

.progress-card p, .result-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.result-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
  border-color: rgba(56,217,150,.3);
}

.success-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #06130d;
  background: var(--success);
  font-weight: 900;
}

.result-card .link-button { grid-column: 1 / -1; }

footer {
  padding: 10px 12px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

[hidden] { display: none !important; }

@media (max-width: 460px) {
  .url-row { grid-template-columns: 1fr; }
  .secondary { width: 100%; }
}
