// Базовые стили (до 320px) - Очень компактные размеры для iPhone SE/5s
.main {
  display: flex;
  flex-direction: column;
  justify-content: center;

  &__container {
    padding-top: 15px;
    padding-bottom: 60px;
    position: relative;
  }

  &__title {
    font-size: 22px;
    font-weight: 900;
    color: $c-black;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.25;
    padding: 0 8px;

    .main__subtitle {
      display: block;
      font-size: 14px;
      font-weight: 500;
      color: $c-black;
      opacity: 0.7;
      margin-top: 8px;
      line-height: 1.3;

      strong {
        color: $c-green;
        font-weight: 700;
        font-size: 16px;
      }
    }
  }

  .main__features {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 18px 0;
    flex-wrap: wrap;

    .feature {
      background: rgba(118, 27, 134, 0.08);
      color: $c-black;
      padding: 5px 10px;
      border-radius: 16px;
      font-size: 12px;
      font-weight: 500;
      white-space: nowrap;
    }
  }

  &__illustration {
    display: block;
    width: 100%;
    max-width: 240px;
    margin: 0 auto 20px;
    object-fit: contain;
    max-height: 160px;
    border-radius: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: #f9f9f9;
    animation: floatGame 6s ease-in-out infinite;
    transform-origin: center;
  }

  &__button {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  &__link {
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    color: $c-white;
    width: 100%;
    max-width: 240px;
    padding: 16px 15px;
    border-radius: 40px;
    background: $c-primary;
    text-align: center;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: pulseGame 2.2s infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    &:active {
      transform: scale(0.98);
      box-shadow: 0 4px 12px rgba(178, 42, 201, 0.3);
    }
  }

  &__pay {
    text-align: center;
    color: $c-black;
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 15px;
    line-height: 1.3;
    padding: 0 10px;
  }

  &__back {
    font-size: 14px;
    color: $c-black;
    opacity: 0.7;
    text-decoration: underline;
    width: max-content;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
  }
}

// Селект для маленьких экранов
.customselect {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0 auto 20px;
  max-width: 160px;
  width: 100%;

  button {
    color: $c-black;
    text-align: center;
    opacity: 0.8;
    font-size: 14px;
    width: 100%;
    padding: 10px;
    background: $c-white;
    border-radius: 100px;
    border: 1px solid $c-black;
    cursor: pointer;
  }

  ul {
    position: absolute;
    top: 100%;
    width: 100%;
    display: none;
    list-style: none;
    background: $c-white;
    z-index: 2;
    border-radius: 0 0 12px 12px;
    border: 1px solid $c-black;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: -1px;
  }

  ul li {
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
  }

  ul li:hover {
    background: rgba(178, 42, 201, 0.1);
  }

  &.open {
    button {
      border-radius: 16px 16px 0 0;
    }
    ul {
      display: block;
    }
  }
}

// Хедер для маленьких экранов
.header {
  &__container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 10px;
  }

  &__logo-wrapper {
    flex: 1;
    text-align: center;
  }

  &__logo {
    max-width: 140px;
    height: auto;
  }

  &__danger-wrapper {
    flex: 0 0 auto;
    padding-left: 10px;
  }

  &__danger {
    width: 26px;
    height: 26px;
  }
}

// 320px и выше (нормальные мобильные)
@media (min-width: 320px) {
  .main {
    &__container {
      padding-top: 18px;
      padding-bottom: 65px;
    }

    &__title {
      font-size: 24px;

      .main__subtitle {
        font-size: 15px;

        strong {
          font-size: 17px;
        }
      }
    }

    .main__features {
      gap: 12px;
      margin: 20px 0;

      .feature {
        font-size: 13px;
        padding: 6px 12px;
      }
    }

    &__illustration {
      max-width: 260px;
      max-height: 170px;
    }

    &__link {
      font-size: 19px;
      max-width: 260px;
      padding: 17px 15px;
    }

    &__pay {
      font-size: 12px;
    }

    &__back {
      font-size: 15px;
    }
  }

  .customselect {
    max-width: 170px;

    button {
      font-size: 15px;
      padding: 11px;
    }
  }

  .header {
    &__logo {
      max-width: 150px;
    }

    &__danger {
      width: 28px;
      height: 28px;
    }
  }
}

// 375px и выше
@media (min-width: $breakpoint-375) {
  .main {
    &__container {
      padding-top: 20px;
      padding-bottom: 70px;
    }

    &__title {
      font-size: 26px;
      margin-bottom: 18px;

      .main__subtitle {
        font-size: 16px;
        margin-top: 10px;

        strong {
          font-size: 18px;
        }
      }
    }

    .main__features {
      gap: 14px;
      margin: 22px 0;

      .feature {
        font-size: 14px;
        padding: 7px 14px;
      }
    }

    &__illustration {
      max-width: 280px;
      max-height: 180px;
    }

    &__link {
      font-size: 20px;
      max-width: 280px;
      padding: 18px 15px;
    }

    &__pay {
      font-size: 13px;
    }

    &__back {
      font-size: 16px;
    }
  }

  .customselect {
    max-width: 180px;

    button {
      font-size: 16px;
      padding: 12px;
    }
  }

  .header {
    &__logo {
      max-width: 160px;
    }

    &__danger {
      width: 30px;
      height: 30px;
    }
  }
}

// 425px и выше
@media (min-width: $breakpoint-425) {
  .main {
    &__container {
      padding-top: 22px;
      padding-bottom: 75px;
    }

    &__title {
      font-size: 28px;

      .main__subtitle {
        font-size: 17px;

        strong {
          font-size: 19px;
        }
      }
    }

    &__illustration {
      max-width: 300px;
      max-height: 190px;
    }

    &__link {
      font-size: 21px;
      max-width: 300px;
      padding: 20px 15px;
    }
  }
}

// 768px и выше
@media (min-width: $breakpoint-768) {
  .main {
    &__container {
      padding-top: 25px;
      padding-bottom: 80px;
    }

    &__title {
      font-size: 32px;

      .main__subtitle {
        font-size: 18px;

        strong {
          font-size: 20px;
        }
      }
    }

    .main__features {
      gap: 16px;
      margin: 24px 0;

      .feature {
        font-size: 15px;
        padding: 8px 16px;
      }
    }

    &__illustration {
      max-width: 320px;
      max-height: 200px;
    }

    &__link {
      font-size: 22px;
      max-width: 320px;
      padding: 22px 15px;
    }

    &__pay {
      font-size: 14px;
    }
  }
}

// Анимации остаются без изменений
@keyframes pulseGame {
  0% {
    box-shadow: 0 0 0 0 rgba(178, 42, 201, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(178, 42, 201, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(178, 42, 201, 0);
  }
}

@keyframes floatGame {
  0%,
  100% {
    transform: translateY(0) rotate(0.5deg);
  }
  50% {
    transform: translateY(-8px) rotate(-0.5deg);
  }
}
