* {
  padding: 0;
  margin: 0;
  border: 0;
}

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

:focus, :active {
  outline: none;
}

a:focus, a:active {
  outline: none;
}

nav, footer, header, aside {
  display: block;
}

html, body {
  height: 100%;
  width: 100%;
  font-size: 100%;
  line-height: 1;
  font-size: 14px;
  -ms-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

input, button, textarea {
  font-family: inherit;
  border-radius: 0;
}

input::-ms-clear {
  display: none;
}

button {
  cursor: pointer;
}

button::-moz-focus-inner {
  padding: 0;
  border: 0;
}

a, a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

ul li {
  list-style: none;
}

img {
  vertical-align: top;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: 400;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

a {
  color: inherit;
}

input[type=number] {
  -moz-appearance: textfield;
}

html {
  scroll-behavior: smooth;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: grid;
  justify-content: center;
  align-items: center;
  z-index: 1030;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.3s ease 0s;
  overflow-y:auto;
  padding: 40px 0;
}
.popup.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.popup>p{
  position: fixed; left: 0; top: 0; width: 100%;height: 100%;
  cursor: pointer;
  z-index: 0;
}
.popup__close {}
.popup__content {
  z-index: 1;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap:30px;
  padding: 40px 30px;
  line-height: 1.3;
  max-width: 700px;
  width: calc(100% - 30px);
  margin-left: 15px;
  text-align: center;
  position: relative;
  background-image: url('../img/lottery_back.jpg'); 
}
.popup__content:last-child{
  display: none;
}
.popup__action.hide{
  display: none;
}
.popup__action.hide ~ .popup__content:last-child{
  display: flex;
}
.popup__wrapper {
  background-image: linear-gradient(to bottom, rgb(155, 207, 252), rgb(0, 0, 0));
  border-radius: 10px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap:30px;
}
.popup__discount {
  font-size: 32px;
  font-style: italic;
}
.popup__wrapper>span{
  font-size: 20px;
}
.popup__wrapper>p{
  padding: 15px;
  border:2px dashed #fff;
  border-radius: 10px;
  font-size: 24px;
}
.popup__content input{
  padding: 15px;
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
  border:1px solid #fff;
}
.popup__content input.error{
  border-color: red;
  animation: input 1s linear 1 forwards;
}
.popup__content .popup__close{
  position: absolute;
  right: 15px;
  top: 15px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.popup__title {
  font-weight: 700;
  font-size: 64px;
}
.popup__subtitle{
  font-size: 30px;
}
.popup__text {
  font-size: 20px;
}
.popup__descr {
  font-size: 16px;
  font-style: italic;
}
.popup__body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:15px;
}
@media(max-width: 600px){
  .popup__subtitle{
    font-size: 25px;
  }
  .popup__title{
    font-size: 36px;
  }
  .popup__content{
    gap:20px;
    padding: 30px 15px;
  }
  .popup__body{
    gap:5px;
  }
  .popup__wrapper{
    padding: 20px;
    gap:20px;
  }
}
.popup__body button{
  border-radius: 10px;
  color: #fff;
  padding: 20px 10px;
  font-size: 20px;
  background-color: rgb(155, 155, 155);
  font-weight: bold;  
  transition: all 0.3s ease 0s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup__body button.active{
  pointer-events: none;
}
.popup__body button:hover{
  opacity: 0.7;
}
.popup__body button.active>span{
  display: none;
}
.popup__body button>svg{
  display: none;
  width: 35px;
  will-change: transform;
  height: 35px;
  border-radius: 50%;
  animation: rotate 1.5s linear infinite;
}
.popup__body button.active>svg{
  display: block;
}
@keyframes rotate{
  0%{
    transform:rotate(0);
  }
  100%{
    transform:rotate(360deg);
  }
}
@keyframes input{
  0%{
    transform:translateX(0px);
  }
  30%{
    transform:translateX(-10px);
  }
  50%{
    transform:translateX(10px);
  }
  70%{
    transform:translateX(-5px);
  }
  100%{
    transform:translateX(0px);
  }
}
.popup__card {
  color: #000;
  font-size: 16px;
  background: rgb(198, 226, 245);
  padding: 20px 10px;
  border-radius: 10px;
  border:2px solid #fff;
  transition: all 0.1s ease 0s;
}
.popup__card:nth-child(1){
  order:1;
}
.popup__card:nth-child(2){
  order:2;
}
.popup__card:nth-child(3){
  order:3;
}
.popup__body button{
  order:5;
}
.popup__card:nth-child(6){
  order:9;
}
.popup__card:nth-child(4){
  order:6;
}
.popup__card:nth-child(7){
  order:8;
}
.popup__card:nth-child(8){
  order:7;
}
.popup__card:nth-child(9){
  order:4;
}
.popup__card.active{
  color: #fff;
  background: limegreen;
  border-color:limegreen;
}
.popup__card span{
  font-size: 24px;
  font-weight: 700;
}