/* Cùng bộ màu, font, bo góc với slider_template / verify_template */
:root {
  --bg-page: #f6f8fa;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --green: #10b981;
  --green-light: #ecfdf5;
  --red: #ef4444;
  --red-light: #fef2f2;
  --border: #f1f5f9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.card {
  width: 100%;
  max-width: 390px;
  padding: 36px 24px 28px;
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.03),
    0 12px 28px -4px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  user-select: none;
}

.card.shake { animation: shake 0.35s; }

@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.06);
}

.badge-icon { position: relative; width: 76px; height: 76px; }
.badge-icon .icon-shield { width: 34px; height: 34px; transition: opacity 0.2s; }

.icon-ring {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  transform: rotate(-90deg);
  opacity: 0;
}
.ring-bg { stroke: var(--border); stroke-width: 4; }
.ring-fg { stroke: var(--blue); stroke-width: 4; }

.countdown {
  position: absolute;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
}

.is-verifying .icon-ring { opacity: 1; }
.is-verifying .icon-shield { opacity: 0; }
.is-done .badge-icon { background: var(--green-light); color: var(--green); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }

.card-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 22px;
}

/* ---------- Nút xác minh ---------- */
.verify-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.45);
  animation: pulse 1.8s ease-in-out infinite;
  transition: transform 0.12s, filter 0.2s;
}
.verify-btn:hover { filter: brightness(1.05); }
.verify-btn:active { transform: scale(0.97); }
.verify-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.4); outline-offset: 2px; }


@keyframes pulse {
  50% { box-shadow: 0 10px 28px -2px rgba(37, 99, 235, 0.6); }
}

/* ---------- Badge 18+ ---------- */
.age-badge { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Ô tích "Tôi đã đủ 18 tuổi" ---------- */
.age-check {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.age-check input { position: absolute; opacity: 0; pointer-events: none; }
.age-box {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.age-box svg { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.age-check:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.age-check input:checked + .age-box { background: var(--blue); border-color: var(--blue); }
.age-check input:checked + .age-box svg { opacity: 1; }
.age-check input:focus-visible + .age-box { outline: 3px solid rgba(37, 99, 235, 0.4); outline-offset: 2px; }

.verify-btn:disabled {
  cursor: not-allowed;
  background: #cbd5e1;
  box-shadow: none;
  animation: none;
}

/* ---------- Thanh tiến trình ---------- */
.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--blue-light);
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue) 0%, #60a5fa 100%);
}
.is-done .progress-bar { background: var(--green); }

.caption {
  margin-top: 18px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}

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

@media (max-width: 380px) {
  .card { padding: 30px 18px 24px; }
  .card-title { font-size: 18px; }
}
