/* ===== ОБЩИЕ СТИЛИ ===== */

/* Сброс стилей и базовые настройки */
* {
    padding: 0;
    margin: 0;
    outline: none;
    box-sizing: border-box;
}

/* Переменные для светлой темы */
body {
    --header-bg: rgba(255, 255, 255, 0.88);
    --white: #ffffff;
    --black: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --grad-start: #7DC247;
    --grad-end:   #FFD400;
    --main-gradient: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    --grad-start-hover: var(--grad-end);
    --grad-end-hover:   var(--grad-start);
}


/* Переменные для темной темы */
body.dark {
    --header-bg: rgba(6, 6, 6, 0.7);
    --white: #ffffff;
    --black: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --grad-start: #7DC247;
    --grad-end:   #FFD400;
    --main-gradient: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    --grad-start-hover: var(--grad-end);
    --grad-end-hover:   var(--grad-start);
}

@keyframes swap {
  0% {
    --grad-start: #7DC247;
    --grad-end: #FFD400;
}
100% {
    --grad-start: #FFD400;
    --grad-end: #7DC247;
}
}


@property --grad-start {
  syntax: '<color>';
  initial-value: #7DC247;
  inherits: true;
}

@property --grad-end {
  syntax: '<color>';
  initial-value: #FFD400;
  inherits: true;
}


/* Базовые стили элементов */
a {
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

svg {
    max-width: 100%;
    max-height: 100%;
}

input[type="radio"],
input[type="checkbox"] {
    display: none;
}

button, a {
    cursor: pointer;
}

button:disabled, a:disabled {
    cursor: default;
}

/* Контейнер */
.wrap {
    max-width: 1300px;
    padding: 0 15px;
    margin: 0 auto;
    position: relative;
}

header {
   --height: 91px;
   position: relative;
   z-index: 2;
   background: var(--header-bg);   
}

header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--black);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    height: var(--height);
}

header .wrap .logo svg {
    max-width: 51px;
    max-height: 45px;
}

header .wrap nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;

}


header .wrap nav ul li a {
    color: var(--black);
    transition: color .2s ease;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 16px;
    height: var(--height);
    display: flex;
    align-items: center;
    justify-content: center;
}

header .wrap nav ul li a:hover {
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    transition:
    color .2s ease,
    --grad-start .2s ease,
    --grad-end .2s ease;
}

header .wrap .theme-switch {
    /* height: var(--height); */
    aspect-ratio: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 85px;
    border-radius: 24px;
    overflow: hidden;
    height: 40px;
    border: 2px solid rgba(99, 93, 93, 0.14);
}

header .wrap .theme-switch svg {
    fill: #5F6A6E;
    transition: all .2s ease;
    width: 34px;
    height: 34px;
    position: relative;
    z-index: 2;
    padding: 6px;
    transition: all .45s ease;
}

header .wrap .theme-switch::after {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--main-gradient);
    transform: translateX(calc(-50% - 4px));
    border-radius: 20px;
    transition: all .45s ease;
    z-index: 1;
}



body.dark .theme-switch::after {
    transform: translateX(calc(50% + 4px));
}


.theme-switch svg:first-of-type {
    fill: var(--white)!important;
    stroke: var(--white)!important;
    transform: rotate(180deg);
}

.theme-switch svg:last-of-type {
    fill: #5F6A6E;
    stroke: #5F6A6E;
    transform: rotate(-360deg);
}

.site-search {
    position: relative;
    width: 300px;
    height: 40px;
    border: 1px solid rgba(99, 93, 93, 0.14);
    border-radius: 44px;
    display: flex;
    align-items: center;
    padding-left: 40px; /* место для иконки */
    background-color: #fff;
    box-sizing: border-box;
}

/* Инпут */
.site-search input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 12px;
    color: #9FB3BA;
    background: transparent;
    padding: 0;
}

/* Кнопка с SVG слева */
.site-search .search-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.site-search .search-btn svg {
    width: 12px;
    height: 12px;
}

/* Плейсхолдер */
.site-search input::placeholder {
    color: #9FB3BA;
    font-size: 12px;
}

/* Hover эффект */
.site-search:hover {
    border-color: rgba(125, 194, 71, 0.88);
}

/* Градиент на SVG через CSS-переменные */
.site-search .search-btn svg path {
    fill: url(#search-gradient); /* или одноцветный через var(--grad-start) */
}

header .wrap .bookmarks {
  border-radius: 444px;  
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all ease .4s;
}

header .wrap .bookmarks:hover {
 animation: swap .35s forwards; 
}

header .wrap .bookmarks svg {
    width: 12px;
    height: 16px;
    fill: var(--white);
}

/*Киностудии*/

.studios {
    padding: 40px 0 0 0;
}

.studios .wrap h2 {
    text-transform: uppercase;
    color: var(--black);
    font-size: 20px;
    font-weight: 700;
}

.studios .wrap .item-studios {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 0 0 0;
}

.studios .wrap .studio-block {
    flex: 1 1 calc((100% - 4 * 20px) / 5);
    height: 140px;
    border-radius: 22px;
    background: linear-gradient(to bottom, #183018, #181D30);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.studios .wrap .studio-block img {
    max-width: 80%;
    max-height: 60%;
    width: auto;
    height: auto;
    display: block;
}


.popular-categories {
 padding: 40px 0 0 0; 
}

.popular-categories .wrap h2 {
  text-transform: uppercase;
  color: var(--black);
  font-size: 20px;
  font-weight: 700;  
}

.popular-categories .wrap .categories-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 0 0 0;
}

.popular-categories .wrap .categories-grid .category-block {
    position: relative;
    flex: 1 1 0; 
    max-width: 216px;
    aspect-ratio: 216 / 211;
    overflow: hidden;
    border-radius: 12px;
    min-width: 120px;
}

.popular-categories .wrap .categories-grid .category-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.2s ease;
    border-radius: 12px;
    pointer-events: none;
}

/* При наведении */
.popular-categories .wrap .categories-grid .category-block:hover::before {
    background: rgba(0, 0, 0, 0.35);
}

.popular-categories .wrap .categories-grid .category-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.popular-categories .wrap .categories-grid .category-block::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    pointer-events: none;
}

.popular-categories .wrap .categories-grid .category-block span {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(0,0,0,0.6);
}

/* ===========================
   Секция видео
=========================== */
.video-list {
    padding: 40px 0 0 0;
}

.video-list .wrap {
    display: flex;
    flex-direction: column;
}

.video-list .wrap h2 {
    text-transform: uppercase;
    color: var(--black);
    font-size: 20px;
    font-weight: 700;
    text-align: left;
}

/* ===========================
   Сетка карточек
=========================== */
.video-list .wrap .movie-card {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px 20px; /* row-gap 30px, column-gap 20px */
    padding: 25px 0 0 0;
}

/* ===========================
   Обертка карточки (для bookmark)
=========================== */
.video-list .wrap .movie-card .card-wrapper {
    position: relative; /* родитель для абсолютной кнопки */
}

/* ===========================
   Сама карточка
=========================== */
.video-list .wrap .movie-card .card-wrapper .card-link {
    display: block;
    position: relative;
    text-decoration: none;
}

/* ===========================
   Постер
=========================== */
.video-list .wrap .movie-card .card-wrapper .card-link .poster img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===========================
   Бейджи в левом верхнем углу
=========================== */
.video-list .wrap .movie-card .card-wrapper .card-link .poster .overlay-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: absolute;
    left: 10px;
    top: 10px;
}

.video-list .wrap .movie-card .card-wrapper .card-link .poster .overlay-left .badge {
    background: linear-gradient(
        180deg,
        #183018 0%,
        rgba(24, 29, 48, 0.66) 100%
    );
    padding: 10px;
    border-radius: 6px;
    max-width: 60px;
    max-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
}

.video-list .wrap .movie-card .card-wrapper .card-link .poster .overlay-left .badge img {
    border-radius: 0 !important;
}

/* svg внутри второго и третьего бейджей */
.video-list .wrap .movie-card .card-wrapper .card-link .poster .overlay-left .badge:nth-of-type(2) svg {
    fill: #FF7B00;
    width: 12px;
    height: 12px;
    margin-top: 1px;
}

.video-list .wrap .movie-card .card-wrapper .card-link .poster .overlay-left .badge:nth-of-type(3) svg {
    fill: #FFBB00;
    width: 20px;
    height: 10px;
    margin-top: 1px;
}

/* ===========================
   Теги под постером
=========================== */
.video-list .wrap .movie-card .card-wrapper .card-link .tags {
    padding: 7px 0 0 0;  
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.video-list .wrap .movie-card .card-wrapper .card-link .tags span {
    font-size: 10px;
    color: #C5CC1F; 
    font-weight: 600;
    padding: 8px;
    background: #252724;
    border-radius: 8px;
}

/* ===========================
   Название фильма
=========================== */
.video-list .wrap .movie-card .card-wrapper .card-link .title {
    color: var(--black);
    font-size: 14px;
    padding: 10px 0 0 0;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===========================
   Кнопка "Добавить в закладки"
=========================== */
.video-list .wrap .movie-card .card-wrapper .bookmark-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 31px;
    height: 31px;
    border-radius: 6px;
    background: rgba(97, 170, 41, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.video-list .wrap .movie-card .card-wrapper .bookmark-btn svg {
    width: 9px;
    height: 112px;
    fill: var(--white);
}

.video-list .wrap .movie-card .card-wrapper .bookmark-btn:hover {
    background: rgba(97, 170, 41, 1);
}

.video-list .wrap .more-wrapper {
    display: flex;
    justify-content: center; /* центрируем кнопку */
    margin-top: 20px;        /* отступ сверху */
}

.video-list .wrap .more-wrapper .more {
        display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    height: 45px;
    padding: 0 30px;
    border-radius: 444px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
    transition: all 0.2s ease;
    text-align: center;
    line-height: 45px;
    border: none;
}

.video-list .wrap .more-wrapper .more svg {
    fill: var(--black);
    width: 14px;
    height: 16px;
}

/* Анимация градиента при наведении */
.video-list .wrap .more-wrapper .more:hover {
    animation: swap .4s forwards;
}


.best-section {
    padding: 40px 0 0 0;
}

.best-section .wrap {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* ===== Общие стили для всех блоков ===== */
.best-section .wrap .best {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    border-radius: 22px;
    padding: 35px 40px 40px 40px; /* базовый паддинг */
    overflow: hidden;
    min-height: 300px; /* универсальная минимальная высота */
}

/* Картинка */
.best-section .wrap .best img {
    position: absolute;
    right: 0;
    bottom: -30px;
    overflow: hidden;
}

/* Ссылка */
.best-section .wrap .best a {
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--black);
    position: relative;
    z-index: 2; /* выше фоновых элементов */
}

/* <b> внутри ссылки */
.best-section .wrap .best a b {
    font-weight: 800;
    font-size: 31px;
}

/* Описание */
.best-section .wrap .best span {
    font-weight: 300;
    font-size: 17px;
    color: var(--black);
}

/* Кнопка со стрелкой */
.best-section .wrap .best .best-link {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    z-index: 1;
    left: 35px;
    top: 330px; /* по умолчанию, можно переопределить в конкретном блоке */
    background: var(--black);
}

.best-section .wrap .best .best-link::after {
    content: "Смотреть прямо сейчас";
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: var(--black);
    font-weight: 600;
    white-space: nowrap;
}

.best-section .wrap .best .best-link svg {
    width: 6px;
    height: 9px;
    fill: #fff;
    position: absolute;
    top: 50%;
    left: 7px;
    transform: translateY(-50%) rotate(-90deg);
    z-index: 10;
}

/* ===== Различия для отдельных блоков ===== */
.best-section .wrap .best.one {
    background: var(--main-gradient);
    height: 662px;
}


