:root {
  --background-color: #f8f8f8;
  --background-second: #f8f8f8;
  --text-color: #2d2d2d; /* Более теплый черный */
  --subtext-color: #666666; /* Серый для второстепенного текста */
  --btn-bg-color: #000000;
  --btn-bg-solid: #ace06d;
  --btn-text-color: #ffe632;
  --primary-gradient: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1); /* Современный градиент */
  --accent-color: #ff6b6b; /* Яркий акцентный цвет */
  --dark-bg: #1a1a1a; /* Темный фон заголовка */
  --light-bg: #ffffff; /* Белый фон */
  --shadow-color: rgba(0, 0, 0, 0.1); /* Мягкая тень */
  --tag-bg: #f0f0f0; /* Светло-серый фон тегов */
  --tag-text: #333333; /* Темный текст тегов */
  --tag-bold-bg: #2d2d2d; /* Темный фон для "Горячее" */
  --tag-bold-text: #ffffff; /* Белый текст для "Горячее" */
  --tag-red-bg: #ff6b6b; /* Ярко-розовый фон для "Новое" */
  --price-bg: #e6e6e6; /* Почти белый фон цены */
  --footer-text: #888888; /* Серый текст футера */
  --player-bg: #121212; /* Темный фон плеера */
  --btn-hover: #ff8e8e; /* Цвет при наведении на кнопку */
  --btn-active: #ff5c5c; /* Цвет при нажатии на кнопку */
}

/* === Сброс и базовые стили === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  position: relative;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: var(--text-color);
  font-weight: 400;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: var(--background-second);
  box-sizing: border-box;
  overflow: hidden;
  font-family: 'Manrope', sans-serif;
  /* Убираем конфликтующий стиль background: #fff; */
}

/* === Шрифты === */
@font-face {
  font-family: 'Manrope';
  src: url('Manrope-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'Manrope';
  src: url('Manrope-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Manrope';
  src: url('Manrope-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Manrope';
  src: url('Manrope-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Manrope';
  src: url('Manrope-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Manrope';
  src: url('Manrope-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Manrope';
  src: url('Manrope-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}

/* === Компоненты === */

div#app {
  width: 100%;
}

/* === Кнопки === */
.btn-confirm {
  width: 100%;
  background: var(--accent-color);
  border: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 16px; /* Больше скругление */
  padding: 12px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: white;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.btn-confirm:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
}

.btn-confirm:active {
  background: var(--btn-active);
  transform: translateY(0);
}

.reject {
  color: var(--text-color);
  font-family: Manrope, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 22px;
  letter-spacing: 0;
  text-align: center;
  text-decoration-line: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.reject:hover {
  color: var(--accent-color);
}

/* === Обертка и заголовок === */
.wrapper {
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.header {
  height: 48px; /* Чуть выше для комфорта */
  color: rgb(255, 255, 255);
  background: var(--dark-bg);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  padding: 0 12px;
}

body.close .header__close {
  display: flex;
}

.header__close {
  border-radius: 100%;
  border: 1px solid #333;
  width: 28px;
  height: 28px;
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background: #333;
  color: #fff !important;
  font-size: 18px;
  position: absolute;
  right: 12px;
  top: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.header__close:hover {
  background: #444;
}

.header .menu {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: 0px;
  width: 40px;
  background: url('menu.png') center center / 40px no-repeat;
}

.header .menu::after {
  content: '';
  position: absolute;
  top: 0px;
  left: 32px;
  width: 40px;
  height: 40px;
  background: url('search.png') center center / 40px no-repeat;
}

.header .logo {
  margin: 0 auto;
  font-size: 20px;
  position: absolute;
  left: 69px;
  top: 8px;
  display: flex;
  align-items: center;
  .logotype {
    color: #ffffff;
    border-radius: 8px;
    font-size: 16px;
    padding: 4px 8px;
    margin-right: 2px;
    float: left;
    font-weight: 900;
  }
}
.logotype {
  background: var(--primary-gradient);
  background-size: 400% 400%;
  animation: gradientMove 5s linear infinite;
  color: white;
  padding: 6px 10px;
  font-weight: 700;
}

.header .user {
  position: absolute;
  top: 0px;
  right: 60px; /* Сдвинуто от закрытия */
  width: auto;
  padding-left: 10px;
  font-size: 16px;
  line-height: 48px;
  font-weight: 600;
  color: var(--accent-color);
}

/* === Теги === */
.tags {
  text-align: left;
  padding: 8px;
  display: flex;
  gap: 8px; /* Современный способ вместо margin-right */
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 14px;
  line-height: 22px;
  border-radius: 20px; /* Круглые теги */
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  cursor: pointer;
  opacity: 0.7;
}

.tag:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

.tag.b {
  color: var(--tag-bold-text);
  font-weight: bold;
  background: var(--tag-bold-bg);
}

.tag.r {
  color: var(--tag-bold-text);
  font-weight: bold;
  background: var(--tag-red-bg);
}

.tag.r:hover {
  background: #ff5c5c;
}

/* === Основной контент === */
.middle-box {
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 10px;
  @media screen and (orientation: landscape) and (max-height: 415px) {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    align-items: center;
    .player {
      width: 100%;
    }
  }
}

.player {
  height: 45vh;
  background: url('player.png') center center / cover no-repeat var(--player-bg);
  margin: 0px auto 20px;
  position: relative;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  @media screen and (orientation: portrait) and (min-height: 668px) {
    height: 55vh;
  }
}

.player-title {
  position: absolute;
  top: 8px;
  left: 12px;
  max-width: 308px;
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.7);
  color: rgb(255, 255, 255);
  font-size: 14px;
  line-height: 20px;
  border-radius: 8px;
  font-weight: 500;
}

.player-bar {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  height: 36px;
  background: url('player-bar-bg.jpg') center center repeat-x;
  opacity: 0;
}

.player-bar::before,
.player-bar::after {
  content: '';
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
}

.player-bar::before {
  background: url('player-bar-left.jpg') left center no-repeat;
}

.player-bar::after {
  background: url('player-bar-right.jpg') right center no-repeat;
}

.btn-box {
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: -46px;
  z-index: 111;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  @media screen and (orientation: landscape) and (max-height: 415px) {
    top: 20px;
  }
}

.buy {
  @media screen and (orientation: landscape) and (max-height: 415px) {
    line-height: normal;
    display: flex;
    box-sizing: border-box;
    position: relative;
    justify-content: center;
    align-items: center;
  }
}

.btn {
  display: block;
  max-width: 480px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border: none;
  background: linear-gradient(
    135deg,
    rgba(45, 45, 45, 0.87),
    rgba(26, 26, 26, 0.55)
  ); /* Градиентная кнопка */
  color: rgb(255, 255, 255);
  font-size: 26px;
  line-height: 18vh;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  position: relative;
  z-index: 1;
  height: 24vh;
  border-radius: 16px;
  box-shadow: 0 6px 18px var(--shadow-color);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 320px) {
  .btn {
    display: block;
    max-width: 480px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    border: none;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    color: rgb(255, 255, 255);
    font-size: 24px;
    line-height: 26vh;
    opacity: 0.92;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    position: relative;
    z-index: 1;
    border-radius: 16px;
    box-shadow: 0 6px 18px var(--shadow-color);
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease;
  }
}

.btn-text {
  display: inline-block;
  padding-right: 40px;
  position: relative;
  width: 100%;
  @media screen and (orientation: landscape) and (max-height: 415px) {
    line-height: normal;
    display: flex;
    padding: 20% 40px 20% 0;
    box-sizing: border-box;
    position: relative;
    justify-content: center;
    align-items: center;
  }
}

.btn-text1 {
  line-height: normal;
  display: flex;
  padding: initial;
  box-sizing: border-box;
  position: relative;
  justify-content: center;
  align-items: center;
  @media screen and (orientation: landscape) and (max-height: 415px) {
    padding: initial;
  }
}

.btn-text::before {
  content: '';
  position: absolute;
  top: 50%;
  height: 0px;
  width: 0px;
  right: 40px;
  margin-top: -20px;
  border-width: 20px 0px 20px 20px;
  border-style: solid;
  border-color: transparent transparent transparent rgb(255, 255, 255);
  border-image: initial;
}

.price {
  color: var(--subtext-color);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-align: center;
  padding-top: 10px;
  font-family: 'Manrope', sans-serif;
}

.price-bg {
  display: inline-block;
  background: var(--price-bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  color: #979797;
}

.banner {
  @media screen and (orientation: landscape) {
    display: none;
  }
}

.meta {
  margin: 52px 0px 6px;
  @media screen and (orientation: landscape) and (max-height: 415px) {
    display: none;
  }
}

.meta + .meta {
  margin-top: 6px;
}

.meta img {
  display: block;
  max-width: 100%;
  margin: 0px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related {
  padding: 5px 5px 0px;
  display: flex;
  width: 100%;
  position: relative;
  @media screen and (orientation: landscape) and (max-height: 415px) {
    display: none;
  }
}

.related img {
  float: left;
  display: block;
  width: 50%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 4px;
}

.footer {
  position: fixed;
  bottom: 0px;
  left: 0px;
  width: 100%;
  padding-bottom: 2px;
  background: var(--light-bg);
  color: var(--footer-text);
  font-size: 10px;
  line-height: 0.9;
  text-align: center;
  box-sizing: border-box;
  border-top: 1px solid #e0e0e0;
  padding: 5px 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
}

.footer a {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--accent-color);
}

.footer,
.footer a {
  line-height: 1.2;
}

.control {
}

.control img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* === Медиа-запросы (оставлены без изменений, как требуется) === */
@media (max-height: 633px) {
}

@media (max-height: 558px) {
}

@media (max-height: 459px) {
  .player {
    height: 175px;
  }
}

@media (orientation: landscape) {
}

@media (max-width: 767px) and (orientation: landscape) {
  .player {
    height: 240px;
  }

  .btn {
    max-width: 320px;
    line-height: normal;
  }

  .btn-text::before {
    margin-top: -16px;
    border-width: 16px 0px 16px 16px;
    border-style: solid;
    border-color: transparent transparent transparent rgb(255, 255, 255);
    border-image: initial;
  }

  .tags,
  .player-bar,
  .related {
    display: none;
  }
}

@media (orientation: landscape) and (width: 568px) {
  body {
    width: 100%;
    height: 99%;
  }

  .wrapper {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 321px;
    overflow: hidden;
  }

  .footer {
    padding-bottom: 5px;
  }
}

@media (max-height: 319px) and (orientation: landscape) and (width: 568px) {
  .wrapper {
    height: 100%;
  }

  .footer {
    padding-bottom: 0px;
  }
}

@media (max-width: 480px) and (orientation: landscape) {
  .player {
    height: 90px;
  }
}

@media (min-width: 768px) and (orientation: landscape) {
  .wrapper {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-box {
  }
}

/* === Дополнительные стили === */
#finalize {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

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

.showThis {
  display: none;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

body.agree .hideThis {
  display: none;
  opacity: 0;
}
body.agree .showThis {
  display: flex;
  opacity: 1;
}
body.agree .footer__default {
  display: none;
}
body.agree .footer__agree {
  display: block;
}

.footer__default {
  display: block;
}
.footer__agree {
  display: none;
}

.loading {
  display: none;
}
body.loader .loading {
  width: 100%;
  position: absolute;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
  height: 100% !important;
}
body.loader .hideThis,
body.loader .showThis {
  display: none !important;
}

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

  &::after,
  &::before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid;
    border-color: transparent transparent #ff3d00 #ff3d00;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-sizing: border-box;
    animation: rotationBack 0.5s linear infinite;
    transform-origin: center center;
  }

  &::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);
  }
}

.btn.hide {
  display: none;
  opacity: 0;
  transition: opacity 1s ease-out;
}

h1.player__disclaimer {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
@media screen and (orientation: landscape) and (max-height: 600px) {
  .btn-text,
  .btn-text1 {
    padding: initial;
  }
  .middle-box {
    justify-content: flex-start;
  }
}
