html,
body,
#root {
  height: 100%;
}

html,
body {
  width: 100%;
  overflow: hidden;
}

body {
  height: 100vh;
  margin: 0;
  background-image: url("./bg.jpg");
  background-position: center top;
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-attachment: scroll;
  color: #2f2f34;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: scrollBackground 20s linear infinite;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.35);
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 30px 14px;
  box-sizing: border-box;
}

.intro {
  width: min(448px, 100%);
}

.intro-card {
  width: 100%;
  max-height: calc(100vh - 60px);
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 32px 22px 36px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  text-align: center;
  backdrop-filter: blur(4px);
}

.step-animate {
  animation: stepRise 420ms ease both;
}

.intro-card::-webkit-scrollbar {
  display: none;
}

.intro h1 {
  margin: 0;
  color: #2f2f32;
  font-size: clamp(27px, 5.2vw, 30px);
  font-weight: 800;
  line-height: 1.28;
}

.question-card {
  min-height: min(500px, calc(100vh - 60px));
  padding: 36px 24px;
}

.question-card h2 {
  margin: 0;
  color: #303033;
  font-size: clamp(25px, 5vw, 29px);
  font-weight: 800;
  line-height: 1.28;
}

.emoji {
  display: inline-block;
  font-size: 28px;
  vertical-align: 2px;
}

.intro-subtitle {
  margin: 24px auto 0;
  max-width: 330px;
  color: #6a6a6e;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
}

.choose-label {
  margin: 34px 0 18px;
  color: #ff4aa0;
  font-size: 18px;
  font-weight: 800;
  animation: chooseFloat 1.45s ease-in-out infinite;
}

.choose-label.compact {
  margin: 24px 0 28px;
  font-size: 17px;
}

.float-emoji {
  display: inline-block;
}

.custom-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  margin: 0 0 14px;
  padding: 22px 28px;
  border: none;
  border-radius: 16px;
  box-sizing: border-box;
  cursor: pointer;
  overflow: hidden;
  font-size: clamp(21px, 4.3vw, 23px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.custom-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.custom-button:hover::before {
  left: 100%;
}

.primary-button {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff;
  animation: buttonPulse 2s ease-in-out infinite;
}

.primary-button:hover {
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.38);
}

.outline-button {
  background: #ffffff;
  color: #ec4899;
  border: 2px solid #ec4899;
  box-shadow: none;
}

.outline-button:hover {
  background: rgba(236, 72, 153, 0.05);
  border-color: #f43f5e;
}

.button-emoji {
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.2));
}

.gif-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3.5);
  gap: 12px;
  margin-top: 22px;
  overflow: hidden;
  padding-bottom: 10px;
}

.gif-strip img {
  width: 100%;
  aspect-ratio: 1 / 1.33;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.image-question-card {
  width: min(448px, 100%);
}

.girl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}

.girl-option {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333336;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.girl-option img {
  width: 100%;
  aspect-ratio: 1 / 1.34;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.girl-option:hover img {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(236, 72, 153, 0.24);
}

.match-card {
  min-height: min(500px, calc(100vh - 60px));
}

.match-subtitle {
  margin: 16px 0 32px;
  color: #707078;
  font-size: 16px;
  font-weight: 700;
}

.match-track {
  width: min(280px, 82%);
  height: 10px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.15);
}

.match-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ec4899, #f43f5e);
  transform: scaleX(0);
  transform-origin: left center;
  animation: matchProgress 5s linear forwards;
}

.app-choice-card {
  min-height: min(500px, calc(100vh - 60px));
}

.app-choice-card h2 {
  max-width: 380px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(22px, 4.6vw, 25px);
}

.app-button {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff;
}

.telegram-button {
  background: linear-gradient(135deg, #1296db, #0564b8);
  color: #ffffff;
}

.telegram-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.result-card {
  width: min(448px, 100%);
  padding: 34px 25px 32px;
  text-align: left;
}

.result-card h2,
.result-card h3 {
  text-align: center;
}

.result-card h2 {
  margin: 0 0 18px;
  color: #303033;
  font-size: 28px;
  font-weight: 800;
}

.result-card h3 {
  margin: 24px 0 18px;
  color: #303033;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
}

.result-card p {
  margin: 0 0 16px;
  color: #66666d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.result-card .result-lead,
.result-card .result-strong {
  color: #626268;
  font-size: 18px;
  font-weight: 800;
}

.result-card ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: #333338;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.62;
}

.result-card li {
  margin-bottom: 12px;
}

.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.58);
}

.notice-modal {
  width: min(360px, 100%);
  padding: 30px 30px 34px;
  border-radius: 20px;
  box-sizing: border-box;
  background: rgba(255, 250, 253, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  text-align: left;
}

.warning-icon {
  text-align: center;
  font-size: 44px;
  line-height: 1;
}

.notice-modal h2 {
  margin: 18px 0 22px;
  color: #ec4899;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.22;
  text-align: center;
}

.notice-modal p {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.58;
}

.notice-modal .custom-button {
  min-height: 58px;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1.26;
}

.feature-box {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 228, 240, 0.82), rgba(255, 244, 248, 0.9));
  color: #ff3f9a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.65;
}

.feature-box p {
  margin: 0;
}

.leave-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.58);
}

.leave-modal {
  width: min(340px, 100%);
  padding: 32px 30px 36px;
  border-radius: 20px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 251, 0.98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.leave-photo {
  width: 120px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 32px rgba(236, 72, 153, 0.35);
}

.leave-modal h2 {
  margin: 24px 0 8px;
  color: #ff3f98;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
}

.leave-modal p {
  margin: 0 0 22px;
  color: #6b7280;
  font-size: 16px;
  font-weight: 700;
}

.exit-stay-btn {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #ffffff;
  margin-bottom: 12px;
  animation: buttonPulse 2s ease-in-out infinite;
}

.exit-leave-btn {
  background: #f8fafc;
  color: #6b7280;
  border: 2px solid #d8e0e8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.exit-leave-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

@keyframes scrollBackground {
  0% {
    background-position-y: 0;
  }

  100% {
    background-position-y: -1000px;
  }
}

@keyframes chooseFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes buttonPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.5);
  }
}

@keyframes stepRise {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes matchProgress {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

@media (max-width: 520px) {
  .page-shell {
    align-items: flex-start;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .intro-card {
    max-height: calc(100vh - 36px);
    padding: 28px 20px 30px;
    border-radius: 20px;
  }

  .question-card {
    min-height: calc(100vh - 36px);
  }

  .intro-subtitle {
    font-size: 19px;
  }

  .custom-button {
    padding: 18px 16px;
  }

  .feature-box {
    font-size: 15px;
  }

  .girl-grid {
    gap: 14px 10px;
  }

  .result-card h3 {
    font-size: 24px;
  }

  .result-card p {
    font-size: 15px;
  }

  .notice-modal {
    width: min(330px, 100%);
    padding: 28px 30px 32px;
  }

  .notice-modal h2 {
    font-size: 23px;
  }

  .notice-modal p {
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.55;
  }

  .notice-modal .custom-button {
    min-height: 56px;
    padding: 15px 18px;
    font-size: 20px;
  }
}
