@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@200..900&display=swap');
* {
    font-family: "Unbounded", sans-serif;
    margin: 0;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
h1,h2,h3,h4,a,p {
    margin: 0;
    padding: 0;
    text-decoration: none;
    
}
body {overflow: auto;}
.container {
    width: 90%;
    margin: 0 auto 0;
}
.movie-item img {
    width: 100%;
    aspect-ratio: 1 / 1.5;
    object-fit: cover;
    object-position: center center;
    display: block;
}
.movie-item {
    border-radius: 30px;
    
    overflow: hidden;
    flex-shrink: 0; 
    transition: transform 0.2s ease;
    
}
.card-img {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1.5;
    overflow: hidden;
}

.ratings-overlay {
    z-index: 2;
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(133, 133, 133, 0.4);
    padding: 5px 8px 5px 12px;
    border-radius: 0 0 20px 0;
    font-size: 14px;
    backdrop-filter: blur(2.5px);
}
.ratings-overlay.high {
    color: rgb(255, 249, 163);
    background-color: rgba(92, 75, 0, 0.4);
    
}
.ratings-overlay.midle {
    color: rgb(129, 209, 129);
    background-color: rgba(0, 75, 0, 0.4);
}
.ratings-overlay.low {
    color: rgb(255, 163, 163);
    background-color: rgba(75, 0, 0, 0.4);
}

.poster-type{
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px 12px 5px 8px;
    border-radius: 0 0 0 20px;
    font-size: 14px;
    backdrop-filter: blur(2.5px);
    background-color: rgba(53, 53, 53, 0.4);
    z-index: 2;
}
.poster-name {
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(6px);
    background-color: rgba(0, 0, 0, 0.301);
    max-height: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 8px 25px 10px;
    opacity: 0;
    transition: opacity ease-in-out 0.25s, transform 0.15s;
    transform: translateY(50px);
    z-index: 2;
}
.movie-item:hover .poster-name{
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
}
.movie-item:hover {
    transform: translateY(-5px);
}
.img-poster {
    opacity: 0;
    transition: opacity 0.35s ease;
    position: relative;
    z-index: 1;
}

.img-poster.loaded {
    opacity: 1;
}
.poster-skeleton {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg,
        rgba(37, 37, 37, 0.342) 25%,
        rgba(58, 58, 58, 0.404) 50%,
        rgba(34, 34, 34, 0.377) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.6s infinite linear;
    z-index: 0;
    transition: opacity 0.3s ease;
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.img-poster.loaded ~ .poster-skeleton,
.card-img:has(.img-poster.loaded) .poster-skeleton {
    opacity: 0;
    pointer-events: none;
}
.genre {
    font-size: 14px;
    opacity: 0.8;
    padding-bottom: 6px;
}
.search{
    opacity: 1;
    transition: opacity 2s ease;
}
/* ─── Модальное окно авторизации ─────────────── */
.modal {
    z-index: 99;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0);
    transition:
     opacity 0.25s ease,
     background-color 0.25s ease;
    
}
 
.modal.open {
    background-color: rgba(0, 0, 0, 0.315);
    opacity: 1;
    pointer-events: all;
}
 
#authModal .modal-content {
    background: rgb(44, 44, 44);
    border: 1px solid ;
    border-radius: 40px;
    width: 380px;
    padding: 28px 32px 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(16px);
    transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}
 
.modal.open .modal-content {
    transform: translateY(0);
}

body.modal.open{
    overflow: hidden;
}
 
/* ═══════════════════════════════════════════════
   Вкладки с плавно скользящим индикатором
═══════════════════════════════════════════════ */
 
.auth-tabs {
    position: relative;
    display: flex;
    background: rgb(34, 34, 34);
    border-radius: 30px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 0;
}
 
/* Скользящий фон-индикатор */
.auth-tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    
    border-radius: 30px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
 
.auth-tab-indicator.right {
    transform: translateX(100%);
}
 
.auth-tab {
    flex: 1;
    padding: 9px 0;
    border: none;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    border-radius: 30px;
    position: relative; /* поверх индикатора */
    transition: color 0.25s ease;
    z-index: 1;
}
 

 
/* ═══════════════════════════════════════════════
   Слайдер панелей
═══════════════════════════════════════════════ */
 
.auth-slider-wrap {
    overflow: hidden;
    
    height: 180px;
    position: relative;
}
 
/* Регистрация имеет больше полей — увеличиваем высоту когда активна */
.auth-slider-wrap.reg-active {
    height: 238px;
}
 
.auth-slider-wrap {
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
 
.auth-slider {
    display: flex;
    width: 200%; /* 2 панели по 50% каждая */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
 
.auth-slider.to-register {
    transform: translateX(-50%);
}
 
.auth-panel {
    width: 50%; /* каждая панель = половина слайдера = 100% ширины окна */
    box-sizing: border-box;
    padding-right: 2px; /* маленький отступ чтобы не обрезало тень на input */
    flex-shrink: 0;
}
 
/* ═══════════════════════════════════════════════
   Поля ввода
═══════════════════════════════════════════════ */
 
.auth-panel input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: rgb(34, 34, 34);
    border: 1px solid ;
    border-radius: 30px;
    padding: 11px 14px;
    font-size: 13px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
}
 

 

 
/* ═══════════════════════════════════════════════
   Статус под полем
═══════════════════════════════════════════════ */
 
.auth-status {
    font-size: 11px;
    min-height: 14px;
    margin: -5px 0 8px 4px;
}
 
/* ═══════════════════════════════════════════════
   Кнопка отправки
═══════════════════════════════════════════════ */
 
.auth-btn {
    width: 100%;
    padding: 12px;
    margin-top: 4px;
    border: 1px solid;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
 
.auth-btn:disabled {
    opacity: 0.45;
    cursor: default;
}
@media (max-width: 768px) {
    .poster-name{
        transform: translateY(0);
        opacity: 1;
        max-height: 200px;
    }
    .genre, .poster-type, .ratings-overlay{font-size: 12px;}
    .name, .year{font-size: 14px;}
}