:root {
  --bg: #05100b;
  --bg2: #0a1f16;
  --green: #35d07f;
  --green-soft: rgba(53, 208, 127, 0.16);
  --ink: #eaf5ef;
  --muted: #7f9a8d;
  --danger: #ef5f6b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(120% 120% at 50% 0%, var(--bg2) 0%, var(--bg) 55%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 22px calc(28px + env(safe-area-inset-bottom));
  overflow: hidden;
  text-align: center;
}

/* Ambient glow behind the mark */
.glow {
  position: absolute;
  top: 22%;
  width: min(520px, 90vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--green-soft) 0%, transparent 62%);
  filter: blur(6px);
  pointer-events: none;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hidden { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Loading spinner ---- */
.spinner {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Animated check ---- */
.check-svg, .cross-svg { width: min(180px, 46vw); height: auto; }

.check-ring {
  fill: none;
  stroke: var(--green);
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 14px rgba(53, 208, 127, 0.55));
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: draw 0.7s ease forwards;
}
.check-mark {
  fill: none;
  stroke: var(--green);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(53, 208, 127, 0.7));
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: draw 0.4s 0.55s ease forwards;
}
/* Gentle continuous pulse of the glow once drawn */
.check { animation: pulse 2.6s 1.1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(53, 208, 127, 0)); transform: scale(1); }
  50%      { transform: scale(1.03); }
}

/* ---- Not-verified cross ---- */
.cross-ring {
  fill: none; stroke: var(--danger); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  animation: draw 0.7s ease forwards;
  opacity: 0.85;
}
.cross-mark {
  fill: none; stroke: var(--danger); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 96; stroke-dashoffset: 96;
  animation: draw 0.4s 0.5s ease forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.title {
  margin: 4px 0 0;
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 800;
  letter-spacing: 0.3px;
}
.title.dim { color: var(--muted); }

.accolade {
  margin: 2px 0 0;
  font-size: clamp(18px, 5.2vw, 26px);
  font-weight: 700;
  color: var(--green);
}

.vehicle {
  margin: 0;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 600;
  color: var(--ink);
  opacity: 0.85;
}

.sub, .muted { color: var(--muted); font-size: 14px; margin: 2px 0 0; }

.brand {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.brand-name {
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.7;
}
.playstore {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(53, 208, 127, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.playstore:hover {
  background: rgba(53, 208, 127, 0.12);
  border-color: rgba(53, 208, 127, 0.6);
  transform: translateY(-1px);
}
.playstore svg { flex: none; }

@media (prefers-reduced-motion: reduce) {
  .panel, .check, .check-ring, .check-mark, .cross-ring, .cross-mark, .spinner {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
  }
}
