:root {
  --bg: #0f1115;
  --card: #191c23;
  --fg: #eef1f6;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --accent-2: #3a6fd8;
  --err: #ff6b6b;
  --ok: #4ade80;
  --border: #2a2f3a;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.head { text-align: center; margin-bottom: 28px; }
h1 { font-size: 1.8rem; margin: 0 0 8px; }
.tagline { color: var(--muted); margin: 0 auto; max-width: 34rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.hidden { display: none; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

input[type="url"], input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  background: #11141a;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-2); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* URL field with an in-field paste icon on the right. */
.input-wrap { position: relative; margin-bottom: 14px; }
.input-wrap input[type="url"] {
  margin-bottom: 0;
  padding-right: 44px; /* leave room for the icon */
}

.paste-icon {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.paste-icon:hover { color: var(--fg); background: rgba(255, 255, 255, 0.07); }
.paste-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.paste-icon:disabled { opacity: 0.5; cursor: not-allowed; }
.paste-icon svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .paste-icon { transition: none; }
}

.status { color: var(--muted); min-height: 1.4em; margin: 12px 0 0; }
.status.ok { color: var(--ok); }
.error { color: var(--err); min-height: 1.2em; margin: 8px 0 0; }

.supported { color: var(--muted); font-size: 0.85rem; margin: 20px 0 4px; }
.notice { color: var(--muted); font-size: 0.8rem; margin: 8px 0 0; }
.muted { color: var(--muted); }
.foot { text-align: center; font-size: 0.8rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid var(--muted); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .btn { transition: none; }
}
