@font-face {
  font-family: 'Inter';
  src: url('Inter-Thin.ttf') format('truetype');
  font-style: normal;
  font-weight: 100;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-ExtraLight.ttf') format('truetype');
  font-style: normal;
  font-weight: 200;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-Light.ttf') format('truetype');
  font-style: normal;
  font-weight: 300;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-ExtraBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 800;
}
@font-face {
  font-family: 'Inter';
  src: url('Inter-Black.ttf') format('truetype');
  font-style: normal;
  font-weight: 900;
}

:root {
  --white-color: #ffffff;
  --black-color: #000000;
  --primary-color: #f84d4f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  min-height: 100dvh;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  color: var(--black-color);
}

header, footer {
  flex: 0 0 auto;
}


.container {
  max-width: 390px;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}


.header__container {
  padding-top: 10px;
}

.header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.header__logo {
  max-width: 155px;
}

.header__logo img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header__age {
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
  font-weight: 400;
  color: var(--black-color);
}

.header__menu {
  max-width: 36px;
}

.header__menu img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.header__search {
  display: flex;
  align-items: stretch;
}

.header__search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #00000029;
  background: var(--white-color);
  border-radius: 3px;
  padding: 8px 10px;
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
  font-weight: 500;
  color: var(--black-color);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.header__search-icon {
  aspect-ratio: 1 / 1;
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FF504B;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.header__video-name {
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
  color:  var(--black-color);
  line-height: 1.05;
  margin: 4px 0 5px;
}

.main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: none;
}

.main__content {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  max-width: 390px;
  background: url('main.png') no-repeat center;
  background-size: cover;
  padding: 28px 12px 86px;
}

.main__close {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  aspect-ratio: 1 / 1;
  background: #5d5d5dcc;
  border: none;
  text-decoration: none;
  color: var(--white-color);
  z-index: 10;
}

.main__close span {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(45deg) scale(0.74);
  position: relative;
}

.main__close span::before,
.main__close span::after {
  content: '';
  position: absolute;
  background: var(--white-color);
}

.main__close span::before {
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 2px;
}

.main__close span::after {
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
}

.main__title {
  text-align: center;
  color: var(--white-color);
  font-size: clamp(1.25rem, 0.8056rem + 2.2222vw, 1.5rem);
  line-height: 0.95;
  font-weight: 600;
  text-wrap: balance;
}

.main__button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 8px;
  background: #FFFFFF26;
  border: 2px solid #ffffffd3;
  border-radius: 0;
  color: var(--white-color);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.main__button img {
  width: 58px;
  display: block;
  object-fit: contain;
}

.main__button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(1.25rem, 0.8056rem + 2.2222vw, 1.5rem);
  line-height: 0.95;
}

.main__button-text span {
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
}

.main__button-description {
  color: var(--white-color);
  text-align: center;
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
  line-height: 1;
  text-wrap: balance;
}

.main__button.agree {
  display: none;
}

.main__player {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.main__player-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 10px;
  padding-bottom: 10px;
}

.main__play {
  width: 1rem;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.main__time {
  color: var(--white-color);
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
  line-height: 1;
}

.main__line {
  width: 90%;
  margin: 0 auto;
  height: 2px;
  border-radius: 3px;
  background: #6E6E6E;
  position: relative;
}


.main__views {
  padding: 12px 10px;
  max-width: 160px;
  margin: 0 auto;
  display: block;
}

.main__views img {
  width: 100%;
  display: block;
}

.footer {
  flex: 0 0 auto;
}

.footer__text {
  text-align: center;
  color: #6f6f6f;
  font-size: clamp(0.75rem, 0.4028rem + 1.7241vw, 0.875rem);
  line-height: 1;
  position: relative;
}

.footer__text a {
  color: inherit;
}

.footer__default {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.footer__agree {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}

.loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 20;
  justify-content: center;
  align-items: center;
}

.loaderItem {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: #fff #fff transparent transparent;
  animation: rotation 1s linear infinite;
}

.loaderItem::after,
.loaderItem::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent transparent #ff3d00 #ff3d00;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  animation: rotationBack 0.5s linear infinite;
}

.loaderItem::before {
  width: 32px;
  height: 32px;
  border-color: #fff #fff transparent transparent;
  animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

body.agree .footer__default {
  opacity: 0;
}

body.agree .footer__agree {
  opacity: 1;
}

body.agree .main__button.agree {
  display: flex;
}

body.agree .main__button.default {
  display: none;
}

body.loader .loading {
  display: flex;
}

body.loader .main__button.agree,
body.loader .main__button.default,
body.loader .main__title,
body.loader .main__button-description {
  display: none;
}

body.close .main__close {
  display: block;
}
