@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --black: #1a1a1a;
  --red: #fa4141;
  --red-dark: #e02e2e;
  --gray-mid: #999999;
  --gray-light: #b7b7b7;
  --gray-bg: #f3f3f3;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-bg);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: var(--black);
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  padding: 40px 44px 36px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
}

.logo {
  height: 26px;
  margin-bottom: 28px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.25;
}

.lede {
  font-size: 14px;
  line-height: 1.6;
  color: #4a4a4a;
  margin: 0 0 24px;
}

.steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: #4a4a4a;
  line-height: 1.5;
}

.steps .n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

form { margin-top: 4px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
}

.url-row {
  display: flex;
  gap: 10px;
}

input[type="url"] {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--black);
  transition: border-color 0.15s ease;
}

input[type="url"]:focus {
  outline: none;
  border-color: var(--black);
}

button, .btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  cursor: pointer;
  background: var(--black);
  color: var(--white);
  white-space: nowrap;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

button:hover, .btn:hover { background: var(--red); }
button:disabled { background: var(--gray-light); cursor: default; }

.btn.secondary {
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--gray-light);
}
.btn.secondary:hover { border-color: var(--red); color: var(--red); background: var(--white); }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
button.loading .spinner { display: inline-block; }
button.loading .btn-label { opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  background: #fff1f1;
  border: 1px solid var(--red);
  color: #a11616;
  font-size: 13px;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.footer-note {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-bg);
  font-size: 11px;
  color: var(--gray-mid);
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 12px;
  color: var(--gray-mid);
  text-decoration: none;
}
.back-link:hover { color: var(--red); }

.progress-track {
  background: var(--gray-bg);
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
  margin: 22px 0 10px;
  position: relative;
}
.progress-bar {
  background: var(--red);
  height: 100%;
  width: 0%;
  border-radius: 8px;
  transition: width 0.3s ease;
}
.progress-bar.indeterminate {
  width: 35% !important;
  position: absolute;
  animation: indeterminate 1.3s ease-in-out infinite;
}
@keyframes indeterminate {
  0% { left: -35%; }
  100% { left: 100%; }
}
.status-label { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.status-sub { font-size: 12px; color: var(--gray-mid); }
