/* Theme tokens derived from the public scanpack theme (purple / pink CTA). */
:root {
  --app-background-color: #7013bc;
  --app-loader-color: #fff;
  --text-color: #ffffff;
  --secondary-text-color: rgba(255, 255, 255, 0.82);
  --link-color: #ff2e78;
  --cta-background: linear-gradient(to right, #f12283 0%, #ff4b43 100%);
  --cta-color: #fff;
  --cta-disabled-bg: rgba(255, 255, 255, 0.18);
  --cta-disabled-color: rgba(255, 255, 255, 0.5);
  --card-max-width: 420px;
  --spacing: 10px;
  --font-main: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--app-background-color);
  background-image: radial-gradient(
    circle at 50% 0%,
    #8a2fd6 0%,
    var(--app-background-color) 60%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Loader ---------- */
#appLoader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background-color: var(--app-background-color);
  z-index: 10;
}

#appLoader[hidden] {
  display: none;
}

.loader {
  width: 130px;
  height: 130px;
}

.arrow {
  fill: var(--app-loader-color);
}

.loader__spinner {
  stroke: var(--app-loader-color);
  transform-origin: center;
  animation: spin 1.4s linear infinite;
}

.animationEnabled .loader__logo .arrow {
  animation: pulse 1.8s ease-in-out infinite;
}

#appLoader em {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--secondary-text-color);
  letter-spacing: 0.02em;
}

@keyframes spin {
  to {
    stroke-dashoffset: -690;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader__spinner,
  .animationEnabled .loader__logo .arrow {
    animation: none;
  }
}

/* ---------- App / card ---------- */
.app {
  width: 100%;
  max-width: var(--card-max-width);
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease both;
}

.app[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card {
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 28px 24px;
  backdrop-filter: blur(6px);
}

.card__title {
  margin: 0 0 12px;
  font-size: 1.6rem;
  line-height: 1.2;
}

.card__lead {
  margin: 0 0 18px;
  color: var(--secondary-text-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card__lead strong {
  color: var(--text-color);
}

.facts {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facts li {
  position: relative;
  padding-left: 24px;
  font-size: 0.85rem;
  color: var(--secondary-text-color);
  line-height: 1.4;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cta-background);
}

/* ---------- Consent + CTA ---------- */
.consent {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.consent__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--secondary-text-color);
  cursor: pointer;
}

.consent__check input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--link-color);
  flex: 0 0 auto;
}

.link,
.footer__link {
  color: var(--link-color);
  text-decoration: none;
}

.link:hover,
.footer__link:hover {
  text-decoration: underline;
}

.cta {
  appearance: none;
  border: 0;
  border-radius: 4em;
  padding: 16px 24px;
  font-family: inherit;
  font-weight: bold;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--cta-color);
  background: var(--cta-background);
  box-shadow: 4px 15px 13px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.cta:hover:not(:disabled) {
  transform: translateY(-1px);
}

.cta:active:not(:disabled) {
  transform: translateY(0);
}

.cta:disabled {
  background: var(--cta-disabled-bg);
  color: var(--cta-disabled-color);
  box-shadow: none;
  cursor: not-allowed;
}

.cta.is-loading {
  opacity: 0.8;
  pointer-events: none;
}

.status {
  margin: 16px 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--secondary-text-color);
}

.status.is-error {
  color: #ffd2d2;
}

.status.is-success {
  color: #d6ffb0;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-family: "Roboto Condensed", var(--font-main);
  font-size: 0.8rem;
  color: var(--secondary-text-color);
}

.footer__sep {
  opacity: 0.5;
}

/* ---------- Simple content pages ---------- */
.doc {
  max-width: 640px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 32px 28px;
  line-height: 1.6;
}

.doc h1 {
  margin-top: 0;
}

.doc a {
  color: var(--link-color);
}
