@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200..900&display=swap');


/* css/styles.css — замените целиком */

:root{
  --font-display: "Unbounded", sans-serif;
  --font-body: "Unbounded", sans-serif;

  --text: #ffffff;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --wrap: 1100px;

  --purple: #b52cff;
  --purple-2: #ff4ad8;

  --orange: #ff9b2a;
  --orange-2: #ff7a00;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
html{ background: #000; }

[hidden]{ display: none !important; }

/* Фон отдельным fixed-слоем: НЕ “ломается” при появлении новых блоков и нет черной полосы */
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100%;
  position: relative;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000 url("../img/background.webp") center bottom / cover no-repeat;
  transform: translateZ(0);
  /*  background: #000 url(../img/background.webp) center bottom / cover no-repeat;*/
}


@media (max-width: 991px) {
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(45deg, #f39125, #ff7a02);
    transform: translateZ(0);
    background-position: 65% 4%;
    }}

.wrap{
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  position: relative;
  z-index: 1;
}

/* Header */
.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 16px;
    position: relative;
}

.brand{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.brand__logo{
  width: 62px;
  height: 62px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

.brand__text{
  flex: 1 1 auto;
  min-width: 0;
}

.title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(20px, 2.6vw, 30px);
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.title__text{
  display: inline-block;
  position: relative;
  padding-bottom: 22px;
}

@media (max-width: 991px) {
    .title__text{
text-align: center;
        font-size: 17px;
    }}

.title__text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    height: 20px;
    background: url("../img/lights.png");
    background-repeat: repeat;
    background-position: left bottom;
    pointer-events: none;
    width: 100%;
    background-size: contain;
}

/* На компе заголовок во всю ширину строки */
@media (min-width: 900px){
  .title{ 
    display: block;
        width: 100%;
        text-align: center;
  }
  .title__text{ display: block; width: 100%; }
}

.subtitle {
    margin: 0;
    font-weight: 600;
    font-size: clamp(12px, 1.6vw, 16px);
    text-transform: uppercase;
    letter-spacing: .3px;
    text-shadow: 0 8px 20px rgba(0,0,0,.35);
    text-align: center;
    font-size: 18px;
}


@media (max-width: 991px) {
   .subtitle {
font-size: 15px;
        text-transform: math-auto;
    }}

.hero__plashka {
    width: min(300px, 36vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 30px rgba(0,0,0,.35));
    align-self: start;
    margin-top: 18px;
    position: absolute;
    right: -43px;
    bottom: -56px;
    z-index: 5;
}

/* Hint */
.hint{
  margin: 10px 0 12px;
  display: inline-block;
  max-width: 560px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(180deg, var(--purple), var(--purple-2));
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  border: 2px solid rgba(255,255,255,.25);
}

/* Doors */
.doors{
  margin-top: 10px;
}

.doors__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
    justify-items: center;
}

.door{
  width: 100%;
  max-width: 220px;              /* на десктопе */
  aspect-ratio: 3 / 5;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
  outline: none;
  transform: translateZ(0);
}

.door:disabled{ cursor: default; }

/* слой “за дверью” */
.door__behind{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}

.behind__content{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.98);
  transition: opacity .25s ease .35s, transform .25s ease .35s;
}

.behind__pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: rgba(255,255,255,.24);
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    position: relative;
    right: -20px;
    color: #fff;
    font-family: var(--font-display);
}

@media (max-width: 991px) {
.behind__pill {
    padding: 6px 8px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .24);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    position: relative;
    right: -12px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 8px;

    }}

/* картинки двери (закрытая/открытая) */
.door__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.35));
}

.door.is-open .door__img--open{
  animation: doorOpenPop .22s ease-out both;
}

@keyframes doorOpenPop{
  from{ transform: translateY(2px); filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); }
  to  { transform: translateY(0);  filter: drop-shadow(0 18px 35px rgba(0,0,0,.35)); }
}

.door.is-open:not(.is-winner) .behind__content--lose{
  opacity: 1;
  transform: scale(1);
}

.door.is-open.is-winner .behind__content--win{
  opacity: 1;
  transform: scale(1);
}

/* Car */
.car{
  width: min(220px, 90%);
  height: auto;
  object-fit: contain;
  transform: translateX(22%) scale(.98);
  filter: drop-shadow(0 20px 32px rgba(0,0,0,.40));
  opacity: 0;
      position: relative;
    right: 20px;
}

.door.is-open.is-winner .car{
  opacity: 1;
  animation: carOut .85s cubic-bezier(.12,.9,.2,1) .10s both;
}



@media (max-width: 991px) {
  .door.is-open.is-winner .car{
right: 11px;
    }}


@keyframes carOut{
  from { transform: translateX(42%) scale(.98); }
  to   { transform: translateX(0%) scale(1); }
}

/* Result block */
.result{ margin-top: 14px; }

.card{
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

.card__title{
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 26px);
  text-transform: uppercase;
  text-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.deposit {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
    margin: 10px auto 14px;
    padding: 10px 14px;
    width: 100%;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

@media (max-width: 991px) {
   .deposit {
    padding: 4px;
    }}



.deposit__label{ font-weight: 800; opacity: .95; }

.deposit__value{
  display: inline-flex;
  gap: 12px;
  align-items: baseline;
  font-weight: 900;
}

@media (max-width: 991px) {
.deposit__value{
    align-items: center;
    }}


.deposit__old {
    opacity: .85;
    position: relative;
    text-decoration: none;
}
.deposit__old::before {
    content: "";
    width: 140%;
    height: 3px;
    background: #3e0158;
    position: absolute;
    display: block;
    transform: rotate(156deg);
    left: -14px;
    top: 7px;
}

.deposit__new{
  font-size: 22px;
  letter-spacing: .2px;
}

.cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(520px, 100%);
  padding: 14px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: .8px;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--purple), var(--purple-2));
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
  transition: transform .15s ease, filter .15s ease;
}

.cta:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.pay{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  opacity: .98;
}


@media (max-width: 991px) {
.pay{
  display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px;
    align-items: center;
    margin-top: 12px;
    opacity: .98;
    }}

.pay img{
  height: 22px;
  width: auto;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.22));
}

.timer {
    margin: 14px auto 0;
    width: min(520px, 100%);
    text-align: center;
    background: linear-gradient(180deg, var(--orange), var(--orange-2));
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 10px 0 0;
}

.timer__label{
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .6px;
  font-size: 12px;
  opacity: .95;
  margin-bottom: 8px;
}

.timer__boxes {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: none;
}

@media (max-width: 991px) {
  .timer__boxes {
    padding: 6px;
    }}



.tbox{ display: grid; gap: 2px; justify-items: center; }

.tbox__val {
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}



.tbox__lab{
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: .95;
}

.tsep{
  font-family: var(--font-display);
  font-size: 26px;
  opacity: .9;
}

/* Мобилка компактнее, но двери в ряд */
@media (max-width: 820px){
  .wrap{ width: min(980px, calc(100% - 14px)); padding: 14px 0 18px; }

  .hero{ grid-template-columns: 1fr; gap: 10px; }
  .brand__logo{ width: 52px; height: 52px; }
  
  .hero__plashka{
           width: 84%;
        justify-self: end;
        margin-top: 4px;
        bottom: -78px;
        right: 5%;
    }

  .hint{ border-radius: 18px; max-width: 100%; }

  .doors__grid{ gap: 10px; }
  .door{ max-width: 150px; }
}

@media (max-width: 420px){
  .doors__grid{ 
    gap: 8px;

 }
  .door{ max-width: 120px; }
  .pay img{ height: 12px; }
  .tbox__val{ font-size: 30px; }
}

@media (prefers-reduced-motion: reduce){
  .behind__content, .cta{ transition: none !important; }
  .door.is-open .door__img--open{ animation: none !important; }
  .door.is-open.is-winner .car{
    animation: none !important;
    transform: translateX(0%) scale(1) !important;
    opacity: 1 !important;
  }
}

@media (max-width: 991px) {
.deposit__new {
   font-size: 18px;
    }}
    
    /* 1) Главный контейнер занимает высоту экрана и работает как flex-колонка */
.wrap{
  width: min(var(--wrap), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  position: relative;
  z-index: 1;

  min-height: 100svh;           /* важно для мобилок */
  display: flex;
  flex-direction: column;
}

/* 2) Секция дверей занимает “середину” экрана */
.doors{
  margin-top: 0;                /* убираем сдвиг вниз */
  flex: 1 1 auto;               /* занимает всё свободное место */
  display: flex;
  flex-direction: column;
  justify-content: center;       /* вертикальный центр */
  align-items: center;           /* горизонтальный центр */
  text-align: center;
  gap: 10px;
}

/* если нужно — чуть поджать внутри */
.doors__grid{
  width: 100%;
  justify-items: center;
}




/* CSS: добавь/замени эти куски в css/styles.css */

/* 1) Плавная смена плашки (чтобы не “дёргало”) */
.hero__plashka{
  transition: opacity .18s ease;
}
.hero__plashka.is-fade{
  opacity: 0;
}

/* 2) Анимация появления второго экрана без “скачка”:
      держим result в DOM, но схлопнутым по высоте */
.result{
  margin-top: 0;          /* если раньше было margin-top — убираем, сделаем через padding */
  height: 0;              /* схлопнуто */
  overflow: hidden;
  padding-top: 0;
  transition:
    height .65s cubic-bezier(.2,.9,.2,1),
    padding-top .65s cubic-bezier(.2,.9,.2,1);
  will-change: height, padding-top;
}

/* внутренности “проявляются” отдельно (красивее) */
.result .card{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease .10s, transform .35s ease .10s;
  will-change: opacity, transform;
}

.result.is-visible{
  padding-top: 14px; /* отступ сверху при раскрытии */
}

.result.is-visible .card{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .result{
    transition: none !important;
  }
  .result .card{
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__plashka{
    transition: none !important;
  }
}


.cta{
    animation: strong-pulse 1.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes strong-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}




