/* ========================================
   ВЕСЕННИЙ ПЕРЕПОЛОХ — Styles
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100dvh;
  background: #bbdefb;
  color: #3e3e3e;
  line-height: 1.6;
}

/* --- App Container --- */
.app {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  transition: background 1s ease;
}

/* --- Floating Headlines BG --- */
.headlines-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.headlines-bg>div {
  position: absolute;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(180, 120, 160, 0.18);
  opacity: 0;
  backface-visibility: hidden;
  animation: headline-float 14s linear infinite;
}

.headlines-bg>div:nth-child(1) {
  left: 5vw;
  top: 8vh;
  animation-delay: 0s;
}

.headlines-bg>div:nth-child(2) {
  left: 55vw;
  top: 12vh;
  animation-delay: 1.8s;
}

.headlines-bg>div:nth-child(3) {
  left: 15vw;
  top: 25vh;
  animation-delay: 3.6s;
}

.headlines-bg>div:nth-child(4) {
  left: 60vw;
  top: 35vh;
  animation-delay: 5.4s;
}

.headlines-bg>div:nth-child(5) {
  left: 8vw;
  top: 48vh;
  animation-delay: 7.2s;
}

.headlines-bg>div:nth-child(6) {
  left: 50vw;
  top: 55vh;
  animation-delay: 9s;
}

.headlines-bg>div:nth-child(7) {
  left: 20vw;
  top: 65vh;
  animation-delay: 0.9s;
}

.headlines-bg>div:nth-child(8) {
  left: 65vw;
  top: 72vh;
  animation-delay: 2.7s;
}

.headlines-bg>div:nth-child(9) {
  left: 10vw;
  top: 82vh;
  animation-delay: 4.5s;
}

.headlines-bg>div:nth-child(10) {
  left: 45vw;
  top: 88vh;
  animation-delay: 6.3s;
}

.headlines-bg>div:nth-child(11) {
  left: 25vw;
  top: 15vh;
  animation-delay: 8.1s;
}

.headlines-bg>div:nth-child(12) {
  left: 70vw;
  top: 45vh;
  animation-delay: 10s;
}

.headlines-bg>div:nth-child(13) {
  left: 35vw;
  top: 75vh;
  animation-delay: 11.5s;
}

.headlines-bg>div:nth-child(14) {
  left: 5vw;
  top: 60vh;
  animation-delay: 12.5s;
}

.headlines-bg>div:nth-child(15) {
  left: 55vw;
  top: 20vh;
  animation-delay: 13.2s;
}

@keyframes headline-float {
  0% {
    transform: scale(0.6) rotate(-1deg);
    opacity: 0;
    filter: blur(6px);
  }

  15% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }

  35% {
    opacity: 1;
    filter: blur(0);
  }

  60% {
    opacity: 0;
  }

  100% {
    transform: scale(2.5) rotate(1deg);
    opacity: 0;
    filter: blur(4px);
  }
}

/* --- Screen-specific BG --- */
.bg-screen-intro {
  background: linear-gradient(135deg, #d8c4e0 0%, #dcc0d8 35%, #e0bcd0 65%, #e0c4c8 100%);
}

.bg-screen-space {
  background: linear-gradient(135deg, #d5d0e8 0%, #c4c0d8 30%, #b8c4d8 60%, #c9d4e0 100%);
}

/* --- Dynamic BG (warmth stages: cold → warm, soft) --- */
.bg-warm-0 {
  background: linear-gradient(135deg, #d6e6f0 0%, #cdd5e0 50%, #d8d2e0 100%);
}

.bg-warm-1 {
  background: linear-gradient(135deg, #d2e4e8 0%, #d0ddd8 50%, #d8e0d5 100%);
}

.bg-warm-2 {
  background: linear-gradient(135deg, #d8e0d5 0%, #dfe5d0 50%, #e8e4cc 100%);
}

.bg-warm-3 {
  background: linear-gradient(135deg, #e8e4cc 0%, #e8dcc4 50%, #e5d5c4 100%);
}

.bg-warm-4 {
  background: linear-gradient(135deg, #e5d5c4 0%, #e4ccc8 50%, #e0ccd5 100%);
}

.bg-warm-5 {
  background: linear-gradient(135deg, #e8d0d8 0%, #e0c0d0 30%, #d8c4dc 60%, #d5e0d5 100%);
}

[class*="bg-warm-"],
[class*="bg-screen-"] {
  transition: background 1.2s ease;
}

/* --- Typewriter / Intro animation --- */
.typewriter-line {
  min-height: 1.5em;
}

.cursor {
  display: inline;
  color: #ce93d8;
  font-weight: 300;
  animation: blink-cursor 1s steps(1) infinite;
}

@keyframes blink-cursor {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.intro-conclusion {
  font-weight: 600;
  font-size: 1rem !important;
  color: #444 !important;
}

.btn--visible {
  opacity: 1 !important;
}

/* --- Marquee (ticker) --- */
.marquee {
  overflow: hidden;
  width: 100%;
  margin-bottom: 0.5rem;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee__text {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-scroll 3s linear infinite;
  padding-left: 0;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f48fb1, #81c784);
  border-radius: 0 3px 3px 0;
  transition: width 0.5s ease;
}

.progress-text {
  position: fixed;
  top: 10px;
  right: 16px;
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
}

/* --- Corner Blocks --- */
.corner {
  position: fixed;
  top: 16px;
  z-index: 101;
  font-size: 1.3rem;
}

.corner--right {
  right: 16px;
  top: 30px;
}

.corner--left {
  left: 16px;
  top: 30px;
}

.corner-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Screen --- */
.screen {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: absolute;
  inset: 0;
  padding: 1rem;
  overflow-y: auto;
}

/* --- Card --- */
.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 2rem 2rem 1.8rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  text-align: center;
  margin: auto 0;
}

.card--wide {
  max-width: 680px;
}

.card__badge {
  display: inline-block;
  background: linear-gradient(135deg, #f48fb1, #ce93d8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.card__emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #2d2d2d;
}

.card__subtitle {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 1.2rem;
}

.card__text {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.card__list {
  list-style: none;
  text-align: left;
  margin: 1rem auto 1.2rem;
  max-width: 380px;
}

.card__list li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: #555;
}

.card__list li::before {
  content: "• ";
  color: #f48fb1;
  font-weight: 700;
}


/* --- Stats --- */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

.stat-label {
  color: #777;
}

.stat-value {
  font-weight: 700;
  color: #81c784;
}

/* --- Hero Grid --- */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero-card {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #f3e5f5;
  border-radius: 14px;
  padding: 1rem 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  transition: all 0.25s ease;
}

.hero-card:hover {
  border-color: #ce93d8;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(206, 147, 216, 0.2);
}

.hero-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}

.hero-card__name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #2d2d2d;
}

.hero-card__title {
  font-size: 0.7rem;
  color: #999;
  line-height: 1.3;
}

.btn--select {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  margin-top: 0.4rem;
  background: linear-gradient(135deg, #f48fb1, #ce93d8);
  color: #fff;
  transition: all 0.2s ease;
}

.btn--select:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(244, 143, 177, 0.3);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  margin-top: 0.5rem;
}

.btn--primary {
  background: linear-gradient(135deg, #f48fb1, #ce93d8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(244, 143, 177, 0.3);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(244, 143, 177, 0.4);
}

.btn--secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.btn--secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

.btn--answer {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 2px solid #f3e5f5;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  font-size: 0.88rem;
  color: #444;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn--answer:hover:not(:disabled) {
  border-color: #ce93d8;
  background: #fce4ec20;
}

.btn--answer:disabled {
  cursor: default;
  opacity: 0.7;
}

.btn--correct {
  border-color: #4caf50 !important;
  background: rgba(76, 175, 80, 0.12) !important;
  color: #2e7d32 !important;
  opacity: 1 !important;
}

.btn--wrong {
  border-color: #f44336 !important;
  background: rgba(244, 67, 54, 0.10) !important;
  color: #c62828 !important;
  opacity: 1 !important;
}

/* --- Situation --- */
.situation-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.situation-icon {
  font-size: 1.4rem;
}

.situation-text {
  font-weight: 500;
  color: #444;
  background: rgba(244, 143, 177, 0.06);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.2rem;
}

.answers {
  text-align: left;
  margin-bottom: 0.5rem;
}

.result-block {
  margin-top: 0.5rem;
}

.result-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.result-text {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.lizard-says {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
  background: rgba(129, 199, 132, 0.08);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0 1rem;
}

/* --- System Report --- */
.system-report {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}

/* --- AI Report Animation --- */
.cursor--green {
  color: #81c784;
}

.ai-probability {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.ai-probability--visible {
  opacity: 1;
}

.ai-story {
  margin: 1.2rem 0 1rem;
  text-align: center;
}

.ai-story__line {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.ai-line-zoom {
  display: inline-block;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 2s ease, opacity 2s ease;
}

.ai-line-zoom--in {
  transform: scale(1);
  opacity: 1;
}

.ai-story__team {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.3rem;
  margin-bottom: 0.8rem;
}

.ai-highlight-team {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ce93d8, #f48fb1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-highlight-spring {
  font-weight: 800;
  background: linear-gradient(135deg, #81c784, #aed581, #dce775);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.compliment-title {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  color: #555;
}

.compliment-text {
  font-size: 0.95rem;
  color: #ce93d8;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* --- Finale --- */
.finale-title {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #81c784, #aed581, #dce775, #f48fb1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}

.finale-compliment {
  margin: 1rem 0;
}

/* --- Confetti --- */
.confetti-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  background: var(--color);
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall var(--dur) ease-in var(--delay) infinite;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(calc(var(--rot) + 720deg));
    opacity: 0;
  }
}

/* --- Thanks --- */
.thanks-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 1rem;
  background: linear-gradient(90deg,
      #e91e63, #ce93d8, #81c784, #ffc107, #f48fb1, #e91e63);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.thanks-lines {
  text-align: center;
  margin: 1rem 0;
}

.thanks-line {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.15rem;
  min-height: 1.4em;
}

.thanks-congrats {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f48fb1, #ce93d8, #81c784);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 1rem 0 0.5rem;
}

.team-photo {
  margin-bottom: 1.2rem;
}

.team-photo__placeholder {
  background: linear-gradient(135deg, #fce4ec, #e8f5e9);
  border-radius: 14px;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: #999;
  border: 2px dashed #ddd;
}

.team-photo__img {
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: block;
}

.thanks-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .card {
    padding: 1.5rem 1.2rem 1.4rem;
    border-radius: 16px;
  }

  .card__title {
    font-size: 1.2rem;
  }

  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .hero-card {
    padding: 0.7rem 0.3rem;
  }

  .hero-card__avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .hero-card__name {
    font-size: 0.75rem;
  }

  .hero-card__title {
    font-size: 0.62rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .progress-text {
    font-size: 0.65rem;
  }
}

@media (max-width: 380px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}