@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ─────────────────────────────────────────
   CSS Custom Properties
───────────────────────────────────────── */
:root {
  --color-yellow:    #f7cf29;
  --color-yellow-glow: #f8cf29;
  --color-blue:      #29b0f8;
  --color-navbar:    #1d1637;
  --color-module:    #1d1637;
  --color-grad-from: #6f38fa;
  --color-grad-via:  #841484;
  --color-grad-to:   #1f1b5d;
  --color-overlay:   rgba(112, 55, 247, 0.9);
  --color-white:     #ffffff;
  --font-montserrat: 'Montserrat', sans-serif;
  --font-inter:      'Inter', sans-serif;
  --radius-card:     16px;
  --radius-btn:      11.892px;
  --transition:      0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

html {
  box-sizing: border-box;
  width: 100%;
}

body {
  font-family: var(--font-inter);
  background: linear-gradient(
    to bottom,
    var(--color-grad-from) 0%,
    var(--color-grad-via) 49.038%,
    var(--color-grad-to) 94.382%
  );
  min-height: 100vh;
  color: var(--color-white);
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────
   Navbar
───────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 31px;
  background: var(--color-navbar);
}

.navbar__container {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 125px;
  width: 100%;
  max-width: 1300px;
  z-index: 10;
}

.navbar__logo__img {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
}

/* ─────────────────────────────────────────
   Main section
───────────────────────────────────────── */
.main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 16px;
  width: 100%;
  min-height: 650px;
  background-image: url('../images/bg-main.jpg');
  background-size: cover;
  background-position: center top;
}

.main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  pointer-events: none;
  z-index: 0;
}

/* keep these classes for HTML compatibility but empty them */
.main__bg { display: none; }
.main__bg-img { display: none; }
.main__bg-overlay { display: none; }

/* ─────────────────────────────────────────
   Module / Card
───────────────────────────────────────── */
.module {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 600px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: #1d1637;
  overflow: hidden;
  z-index: 1;
}

.module:not(#step-0) {
  padding: 48px 16px;
}

.module__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  z-index: 1;
}

/* ─────────────────────────────────────────
   Steps visibility
───────────────────────────────────────── */
.step {
  display: none;
}

.step--active {
  display: flex;
}

/* ─────────────────────────────────────────
   Logo (inside module)
───────────────────────────────────────── */
.module-logo {
  width: 100%;
  max-width: 213px;
  height: auto;
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────
   Hero text block
───────────────────────────────────────── */
.hero__texts {
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 100%;
}

.hero__title {
  margin-bottom: 24px;
  font-family: var(--font-montserrat);
  font-weight: 700;
  font-size: 24px;
  color: var(--color-white);
  letter-spacing: -1.85px;
  line-height: 1.1;
}

.hero__subtitle {
  margin-bottom: 24px;
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-yellow);
  line-height: 1.4;
}

.hero__body {
  margin-bottom: 36px;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-white);
  line-height: 1.5;
}

/* ─────────────────────────────────────────
   CTA Button
───────────────────────────────────────── */
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 22px;
  background: var(--color-yellow);
  border-radius: var(--radius-btn);
  border: none;
  text-decoration: none;
  font-family: var(--font-montserrat);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-white);
  text-shadow: 1px 3px 3px rgba(29, 22, 55, 0.6);
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

#step-5 .btn-cta {
  font-size: 22px;
}

.btn-cta:hover {
  background: var(--color-yellow);
}

.btn-cta:active {
  transform: scale(0.98);
}

/* ─────────────────────────────────────────
   Question step
───────────────────────────────────────── */
.question__title {
  width: 100%;
  margin-bottom: 36px;
  font-family: var(--font-montserrat);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-white);
  text-align: center;
}

.question__options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 32px;
}

.question__options .btn-cta {
  font-size: 22px;
}

.question__counter {
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  color: var(--color-white);
}

/* ─────────────────────────────────────────
   Loading step
───────────────────────────────────────── */
.loader-bar {
  position: relative;
  width: 100%;
  height: 23px;
  margin-bottom: 36px;
  background: var(--color-blue);
  border-radius: 9999px;
  overflow: hidden;
}

.loader-bar__fill {
  width: 0%;
  height: 100%;
  border-radius: 9999px;
  background: var(--color-yellow);
  transition: width 2s linear;
}

.loading-items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  max-width: fit-content;
}

.loading-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.loading-item--visible {
  opacity: 1;
  transform: translateY(0);
}

.loading-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
}

.loading-item__text {
  font-family: var(--font-montserrat);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-white);
}

/* ─────────────────────────────────────────
   Final step
───────────────────────────────────────── */
.final__title {
  margin-bottom: 32px;
  font-family: var(--font-montserrat);
  font-weight: 700;
  font-size: 32px;
  color: var(--color-white);
  text-align: center;
}

.match-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.match-card.hidden {
  display: none;
}

.match-card__logo {
  max-width: 265px;
  min-width: 0;
}

.match-card__divider {
  flex-shrink: 0;
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.5);
}

.match-card__rating {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.match-card__score {
  font-family: var(--font-inter);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.859px;
  line-height: 1;
  color: var(--color-white);
  white-space: nowrap;
}

.match-card__stars {
  display: flex;
  gap: 3px;
}

.match-card__stars__icon {
  width: 15px;
  height: 15px;
}

.final__match-text {
  width: 100%;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  color: var(--color-white);
}

.final__cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.final__offer {
  font-family: var(--font-inter);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  color: var(--color-yellow);
}

/* Jerkmate logo variant */
.match-logo-jerkmate {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Text logos for other sites */
.match-logo-text {
  font-family: var(--font-montserrat);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.match-logo-text--slutroulette {
  color: #ff3366;
}

.match-logo-text--livefreefun {
  color: #00cc88;
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 45px 16px;
  background: var(--color-navbar);
}

.footer__logo__img {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
}

.footer__copyright {
  font-family: var(--font-montserrat);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  color: var(--color-white);
}

.footer__rta {
  display: block;
}

.footer__rta img {
  display: block;
  width: auto;
  height: 12px;
}

/* ─────────────────────────────────────────
   Responsive – Desktop (768px+)
───────────────────────────────────────── */
@media (min-width: 768px) {
  .navbar {
    padding: 35px 45px;
  }

  .navbar__logo__img {
    max-width: 300px;
  }

  .main {
    padding: 170px 64px;
  }

  .module {
    max-width: 852px;
    padding: 64px;
    gap: 32px;
  }

  .module-logo {
    margin-bottom: 32px;
  }

  .hero__title {
    margin-bottom: 16px;
    font-size: 52px;
    letter-spacing: -2.6px;
  }

  .hero__subtitle {
    margin-bottom: 32px;
    font-size: 24px;
  }

  .hero__body {
    margin-bottom: 64px;
  }

  .btn-cta {
    width: 100%;
    max-width: 448px;
    padding: 15px 22px;
    font-size: 30px;
  }
  
  .btn-cta:hover {
    background: var(--color-blue);
  }

  .question__title {
    font-size: 38px;
  }

  .loader-bar {
    margin-bottom: 32px;
  }

  .loading-item__text {
    font-size: 24px;
    white-space: nowrap;
  }

  .loading-item__icon {
    width: 24px;
    height: 24px;
  }

  .final__title {
    font-size: 64px;
  }

  .match-card {
    gap: 16px;
    width: auto;
    min-width: 500px;
    border-radius: 8px;
  }

  .match-card__logo {
    width: 100%;
    max-width: 363px;
  }

  .match-card__divider {
    height: 65px;
  }

  .match-card__score {
    font-size: 48px;
  }

  .match-card__stars {
    gap: 5px;
  }

  .match-card__stars__icon {
    width: 20px;
    height: 20px;
  }

  .footer {
    padding: 45px 50px;
  }
  
  .footer__logo__img {
    max-width: 402px;
  }
}

/* ─────────────────────────────────────────
   Animations
───────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step--active {
  animation: fadeInUp 0.3s ease forwards;
}