* {
  box-sizing: border-box;
}

:root {
  --page-bg-1: #07111f;
  --page-bg-2: #101d33;
  --card-bg: rgba(255, 255, 255, 0.96);
  --text: #152033;
  --muted: #697386;
  --line: #dbe2ec;
  --accent: #2563eb;
  --success: #159447;
  --danger: #d64545;
}

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

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(57, 117, 255, 0.25), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.14), transparent 30%),
    linear-gradient(145deg, var(--page-bg-1), var(--page-bg-2));
}

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

.card {
  width: min(100%, 480px);
  padding: 30px;
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
  font-size: 25px;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
}

.subtitle {
  margin: 10px auto 22px;
  max-width: 360px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.captcha-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #e8edf5;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(245, 248, 252, 0.9);
  color: var(--muted);
  font-size: 14px;
}

.slider-wrap {
  position: relative;
  height: 56px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f3f6fa;
  user-select: none;
  touch-action: none;
}

.slider-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, .18), rgba(14, 165, 233, .2));
  border-right: 1px solid rgba(37, 99, 235, .32);
}

.slider-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 58px;
  color: #768198;
  font-size: 13px;
  font-weight: 650;
}

.slider-button {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 7px 18px rgba(37, 99, 235, .28);
  cursor: grab;
  font-size: 20px;
  touch-action: none;
}

.slider-button:active {
  cursor: grabbing;
}

.slider-wrap.success {
  border-color: rgba(21, 148, 71, .45);
  background: #effbf3;
}

.slider-wrap.success .slider-progress {
  background: rgba(21, 148, 71, .18);
}

.slider-wrap.success .slider-button {
  background: var(--success);
}

.slider-wrap.failed {
  border-color: rgba(214, 69, 69, .55);
  animation: shake .35s ease;
}

.status {
  min-height: 24px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.refresh-button {
  margin-top: 4px;
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  color: #526078;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.refresh-button:hover {
  background: #edf2f8;
}

.note {
  margin: 15px 0 0;
  color: #9aa3b2;
  font-size: 11px;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 520px) {
  .page {
    padding: 14px;
  }

  .card {
    padding: 22px 16px;
    border-radius: 20px;
  }
}
