:root {
  --bg: #3008a1;
  --bg-deep: #1f056e;
  --bg-glow: #4a1fd4;
  --gold: #e9ba2f;
  --gold-soft: #c9a84c;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.88);
  --btn: #0082e6;
  --btn-border: #ffffff;
  --option-bg: #0082e6;
  --progress-track: rgba(255, 255, 255, 0.18);
  --progress-fill: linear-gradient(90deg, #e9ba2f, #f3d56a);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  --max: 32rem;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-glow), transparent 55%),
    radial-gradient(800px 500px at 100% 100%, rgba(233, 186, 47, 0.12), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 0.65rem 1.25rem 2rem;
}

.shell {
  width: 100%;
  max-width: var(--max);
  min-height: calc(100dvh - 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shell:has(.analyze) {
  gap: 0.45rem;
}

.header {
  display: flex;
  justify-content: center;
  padding: 0;
  line-height: 0;
}

.logo {
  display: block;
  width: 72px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: -0.2rem 0 -0.35rem;
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--progress-track);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--progress-fill);
  box-shadow: 0 0 16px rgba(233, 186, 47, 0.45);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen {
  display: none;
  flex-direction: column;
  gap: 1.35rem;
  animation: fade-up 0.45s ease both;
}

.screen.is-active {
  display: flex;
}

.screen:has(.analyze) {
  flex: 1;
  gap: 0;
}

.headline {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.35rem, 4.6vw, 1.65rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.headline--sm {
  font-size: clamp(1.15rem, 3.8vw, 1.35rem);
  font-weight: 800;
}

.headline--soft {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.subhead {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
}

.subhead strong {
  color: var(--text);
  font-weight: 800;
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.4rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: var(--btn);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: none;
  border: 2px solid #fff;
  box-shadow: 0 3px 0 #fff;
  text-decoration: none;
  transform-origin: center;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  filter: brightness(1.05);
  transform: none;
}

.cta:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #fff;
}

.cta--pulse {
  animation: pulse 1.6s ease-in-out infinite;
}

.cta--gold {
  background: linear-gradient(180deg, #f0c94a, #d4a31a);
  color: #1a0a3a;
  border-color: #ffe8a3;
  box-shadow: 0 10px 28px rgba(233, 186, 47, 0.35);
}

.cta.is-hidden,
.cta[hidden],
.hide {
  display: none !important;
}

.cta--fixed-bottom {
  position: fixed !important;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
  width: min(calc(100% - 2.2rem), var(--max));
  margin: 0;
  transform: translateX(-50%);
}

.cta--fixed-bottom:hover,
.cta--fixed-bottom:active {
  transform: translateX(-50%);
  filter: brightness(1.05);
}

.cta--fixed-bottom.is-visible {
  animation: pulse-soft 1.8s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 8px 22px rgba(0, 130, 230, 0.35);
  }
  50% {
    transform: translateX(-50%) scale(1.035);
    box-shadow: 0 12px 30px rgba(0, 130, 230, 0.55);
  }
}

.options {
  display: grid;
  gap: 0.75rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: var(--option-bg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.option:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  border-color: rgba(255, 255, 255, 0.5);
}

.option:active {
  transform: scale(0.985);
}

.option__emoji {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}

.option__text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.analyze {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 5.75rem;
}

.analyze__body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.analyze__texts {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
  margin-top: 0.35rem;
}

.analyze__texts:not(.is-ready) {
  display: none;
}

.analyze__loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 48vh;
}

.analyze__loader.is-done {
  min-height: 0;
  margin-top: 2rem;
  justify-content: flex-start;
}

.analyze-bar {
  position: relative;
  width: 100%;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.analyze-bar__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e9ba2f 0%, #f3d56a 50%, #e9ba2f 100%);
}

.analyze-bar__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.analyze__status {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.reveal-line {
  display: none;
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.4;
}

.reveal-line.is-on {
  display: block;
  animation: fade-up 0.55s ease both;
}

.reveal-line--emphasis {
  font-size: 1.125rem;
}

.cta--underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cards-wrap {
  margin-top: 0.25rem;
}

.video-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

.video-wrap vturb-smartplayer {
  display: block;
  width: 100%;
}

.footer-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Card selection (from original, adapted) */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 0 20px;
  overflow: hidden;
}

.cs-card {
  width: 100%;
  aspect-ratio: 1 / 1.65;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cs-card.cs-inactive {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
  transition: opacity 0.5s ease;
}

.cs-card.cs-done {
  pointer-events: none;
  cursor: default;
}

.cs-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 7px;
}

.cs-card.cs-flipped .cs-card-inner {
  transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .cs-card:not(.cs-flipped):not(.cs-inactive):not(.cs-done):hover .cs-card-inner {
    transform: translateY(-5px) scale(1.04);
    transition: transform 0.22s ease;
    filter: brightness(1.15) drop-shadow(0 0 10px rgba(201, 168, 76, 0.55));
  }
}

.cs-back,
.cs-front {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.cs-back {
  border: 1.5px solid #c9a84c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.cs-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.cs-front {
  transform: rotateY(180deg);
  border: 2px solid #c9a84c;
  box-shadow:
    0 0 24px rgba(201, 168, 76, 0.5),
    0 6px 22px rgba(0, 0, 0, 0.55);
  background: #f5edd8;
}

.cs-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.cs-card.cs-flipped::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 11px;
  border: 1px solid #c9a84c;
  animation: cs-aura 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes cs-aura {
  0%,
  100% {
    opacity: 0.15;
    box-shadow: 0 0 6px rgba(201, 168, 76, 0.15);
  }
  50% {
    opacity: 0.85;
    box-shadow:
      0 0 22px rgba(201, 168, 76, 0.5),
      0 0 44px rgba(201, 168, 76, 0.15);
  }
}

.cs-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #c9a84c;
  color: #0a0710;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.4s ease 0.8s;
  pointer-events: none;
}

.cs-card.cs-flipped .cs-badge {
  opacity: 1;
}

.cs-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  animation: cs-spark var(--dur, 0.9s) ease forwards var(--delay, 0s);
}

@keyframes cs-spark {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
  }
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 380px) {
  .cs-grid {
    gap: 2px;
  }

  .option {
    padding: 0.85rem 0.8rem;
  }

  .option__text {
    font-size: 0.92rem;
  }
}

.gracias {
  gap: 0.35rem;
  justify-content: flex-start;
}

.gracias__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  animation: fade-up 0.5s ease both;
}

.gracias__seal {
  width: 68px;
  height: 68px;
  margin: 0.35rem auto 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1a0a3a;
  background: radial-gradient(circle at 35% 30%, #f6de7a, #d4a31a 62%, #b8860b);
  box-shadow:
    0 0 0 6px rgba(233, 186, 47, 0.16),
    0 10px 28px rgba(233, 186, 47, 0.38);
}

.gracias__kicker {
  margin: 0;
  text-align: center;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.gracias__card {
  width: 100%;
  display: grid;
  gap: 0.95rem;
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(233, 186, 47, 0.28);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.gracias__step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.8rem;
  align-items: start;
}

.gracias__step p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.gracias__num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #f3d56a, #d4a31a);
  color: #1a0a3a;
  font-size: 0.82rem;
  font-weight: 800;
}

.gracias__url {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.58);
  word-break: break-all;
}

.gracias .cta--gold {
  margin-top: 0.15rem;
}
