:root {
  color-scheme: light;
  --pink: #fb7299;
  --pink-light: #fc9ab8;
  --pink-soft: #fff0f5;
  --pink-border: #fde3ec;
  --blue: #1890ff;
  --blue-bg: #eef8ff;
  --green: #52c41a;
  --green-light: #73d13d;
  --ink: #22232a;
  --muted: #6b7078;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(251, 114, 153, 0.10), transparent 28%),
    linear-gradient(180deg, #f9fafc, #f0f2f5);
}

.container { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card {
  position: relative;
  width: min(100%, 380px);
  min-height: 570px;
  padding: 29px 24px 22px;
  overflow: hidden;
  text-align: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(32, 36, 50, 0.11);
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--pink), var(--pink-light)); }

.demo-badge { width: fit-content; margin: 0 auto 12px; padding: 6px 11px; color: #a34c69; font-size: 11px; font-weight: 700; border: 1px solid var(--pink-border); border-radius: 999px; background: var(--pink-soft); }
.illustration { position: relative; width: 154px; height: 142px; margin: 0 auto 5px; }
.screen { position: absolute; left: 50%; top: 22px; width: 118px; height: 92px; transform: translateX(-50%); border: 7px solid #34343c; border-radius: 22px; background: linear-gradient(145deg, #ffd4e1, #fff0f5); box-shadow: 0 12px 28px rgba(251, 114, 153, 0.20); }
.screen__ear { position: absolute; top: -23px; width: 8px; height: 23px; border-radius: 999px; background: #34343c; transform-origin: bottom; }
.screen__ear--left { left: 26px; transform: rotate(-30deg); }
.screen__ear--right { right: 26px; transform: rotate(30deg); }
.screen__eye { position: absolute; top: 33px; width: 7px; height: 7px; border-radius: 50%; background: #34343c; }
.screen__eye--left { left: 30px; }
.screen__eye--right { right: 30px; }
.screen__mouth { position: absolute; left: 50%; top: 45px; width: 25px; height: 13px; transform: translateX(-50%); border-bottom: 4px solid #34343c; border-radius: 50%; }
.spark { position: absolute; color: var(--pink); font-weight: 900; }
.spark--one { left: 4px; top: 35px; font-size: 25px; }
.spark--two { right: 3px; top: 59px; font-size: 18px; }
.spark--three { left: 29px; bottom: 8px; color: #ffd35b; font-size: 12px; }

h1 { margin: 0; font-size: 26px; letter-spacing: -0.04em; }
.subtitle { margin: 9px 0 18px; color: var(--muted); font-size: 13px; }
.detection-status { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 15px; color: var(--blue); font-size: 13px; font-weight: 650; border: 1px solid #a7dbff; border-radius: 12px; background: var(--blue-bg); transition: 220ms ease; }
.loading-dots { display: inline-flex; gap: 4px; }
.loading-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: dots 1.1s infinite; }
.loading-dots i:nth-child(1) { animation-delay: -0.24s; }
.loading-dots i:nth-child(2) { animation-delay: -0.12s; }
.progress-bar { height: 6px; margin-top: 17px; overflow: hidden; border-radius: 999px; background: #f0f0f0; transition: 220ms ease; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--pink-light)); animation: progress 1.25s linear forwards; }
.is-hidden { height: 0 !important; margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; border-width: 0 !important; opacity: 0 !important; overflow: hidden !important; }

.error-content, .success-content { display: none; }
.error-content.is-visible, .success-content.is-visible { display: block; animation: rise 420ms ease both; }
.result-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 17px 0 8px; }
.result-row strong, .success-content > strong { font-size: 18px; }
.result-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; font-size: 22px; font-weight: 500; border-radius: 50%; }
.result-icon--error { background: var(--pink); }
.result-desc { margin: 0 0 15px; color: #555b65; font-size: 13px; line-height: 1.65; }
.steps { padding: 6px 15px; text-align: left; border: 1px solid var(--pink-border); border-radius: 12px; background: #fff8fa; }
.step { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; padding: 10px 0; }
.step + .step { border-top: 1px solid #f8e9ee; }
.step > span { display: grid; place-items: center; width: 22px; height: 22px; color: var(--pink); font-size: 10px; font-weight: 800; border-radius: 7px; background: #ffe6ee; }
.step p { margin: 0; color: #4d525a; font-size: 13px; line-height: 1.6; }
.step b { color: var(--pink); }
.secondary-button, .primary-button { width: 100%; margin-top: 16px; padding: 12px 16px; color: #fff; font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 11px; cursor: pointer; }
.secondary-button { background: linear-gradient(90deg, var(--pink), var(--pink-light)); }
.primary-button { background: var(--blue); }
.success-content { padding: 31px 0 5px; }
.success-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 15px; color: #fff; font-size: 30px; font-weight: 900; border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--green-light)); box-shadow: 0 8px 24px rgba(82, 196, 26, 0.25); }
.success-content p { margin: 9px 0 0; color: var(--green); font-size: 13px; }
footer { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; padding-top: 15px; color: #b0b3b9; font-size: 10.5px; line-height: 1.5; border-top: 1px solid #f0f0f2; }
.footer-shield { display: grid; place-items: center; width: 16px; height: 16px; color: #fff; font-size: 10px; border-radius: 50%; background: #c8cbd1; }

@keyframes dots { 0%, 80%, 100% { opacity: .4; transform: scale(.35); } 40% { opacity: 1; transform: scale(1); } }
@keyframes progress { from { width: 0; } to { width: 100%; } }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) { .container { padding: 14px; } .card { min-height: 550px; padding: 25px 18px 19px; } .illustration { transform: scale(.92); margin-top: -4px; margin-bottom: -2px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition: none !important; } }
