/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;700&family=Unbounded:wght@600;800&display=swap');

:root {
    --primary-red: #E50914;
    --dark-bg: #101010;
    --text-white: #f5f5f5;
    --font-body: 'Jost', sans-serif;
    --font-heading: 'Unbounded', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
}

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 20px 0;
}

a {
    color: var(--text-white);
    text-decoration: none;
}

h1, h2 {
    font-family: var(--font-heading);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 1.8rem; margin-bottom: 20px; }

/* --- ХЕДЕР --- */
.site-header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 10%, transparent);
    padding: 20px 4%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.4s ease;
}

.site-header.scrolled {
    background-color: #101010;
}

.logo img {
    height: 35px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-red);
}

/* --- ГЛАВНАЯ СТРАНИЦА: HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 8% 5%;
    color: white;
    background-size: cover;
    background-position: center top;
    position: relative;
    animation: fadeIn 1s ease-in;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16,16,16,1) 15%, transparent 40%, rgba(16,16,16,0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 50%;
    animation: slideUp 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    font-weight: 500;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-block;
    background-color: var(--primary-red);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn:hover {
    background-color: #f6121d;
    transform: scale(1.05);
}

/* --- ГЛАВНАЯ СТРАНИЦА: РЯДЫ КОНТЕНТА (КАРУСЕЛИ) --- */
.content-section {
    margin-top: 40px;
    position: relative;
    z-index: 5;
}

.content-row {
    margin-bottom: 50px;
    position: relative;
}

.content-row h2 {
    margin-left: 2.5%;
}

.content-row::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--primary-red);
    width: 80px;
    margin: -10px 0 20px 2.5%;
}

/* --- СТИЛЬ ДЛЯ СЕКЦИИ С РЕКОМЕНДАЦИЕЙ --- */
.recommendation-credit {
    margin: -15px 0 25px 2.5%;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-weight: 500;
}

.content-row.recommendation::after {
    background: #FFD700; /* Золотой цвет для подчеркивания */
}

.content-row-inner {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 2.5%;
    scroll-behavior: smooth;
}

.content-row-inner::-webkit-scrollbar {
    display: none;
}

.item-card {
    min-width: 290px;
    margin-right: 12px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.item-card:hover {
    transform: scale(1.08) translateY(-5px);
    z-index: 10;
}

.item-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.item-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 10px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.scroll-btn {
    position: absolute;
    top: 58%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 2rem;
    width: 50px;
    aspect-ratio: 1/2;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-row:hover .scroll-btn {
    opacity: 1;
}

.scroll-btn.left {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.scroll-btn.right {
    right: 0;
    border-radius: 8px 0 0 8px;
}

/* --- СТРАНИЦЫ КАТАЛОГА (GRID) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.grid-page {
    padding: 120px 2.5%;
}

.grid-page h1 {
    font-size: 3rem;
    margin-bottom: 40px;
}

.grid-page .item-card:hover {
    transform: scale(1.05);
    z-index: 10;
}


/* --- СТРАНИЦА ФИЛЬМА/СЕРИАЛА --- */
.item-page-hero {
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    padding: 6% 5%;
    position: relative;
    background-size: cover;
    background-position: center top;
    animation: fadeIn 1.5s;
}

.item-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16,16,16,1) 30%, rgba(16,16,16,0.5) 60%, rgba(16,16,16,0.8) 100%);
}

.item-details-container {
    display: flex;
    gap: 40px;
    position: relative;
    z-index: 2;
    align-items: center;
}

.item-poster {
    flex: 0 0 300px;
}

.item-poster img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.item-details h1 {
    margin: 0;
    text-shadow: 2px 2px 8px #000;
}

.item-meta {
    list-style: none;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.item-meta li {
    background-color: rgba(40,40,40,0.8);
    backdrop-filter: blur(5px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.item-description {
    margin-top: 10px;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 90%;
}

.player-section {
    padding: 40px 5%;
}

.player-section h2 {
    border-left: 5px solid var(--primary-red);
    padding-left: 15px;
}

.player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border: 2px solid #222;
    border-radius: 8px;
    overflow: hidden;
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- ФУТЕР --- */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 1px solid #222;
    color: #888;
    background: #0A0A0A;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 992px) {
    .hero-content {
        max-width: 80%;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .item-details-container {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .item-poster {
        max-width: 250px;
        margin-bottom: 20px;
    }
    .item-page-hero::after {
        background: linear-gradient(to top, rgba(16,16,16,1) 20%, transparent 60%, rgba(16,16,16,0.8) 100%);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Можно добавить бургер меню */
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .item-card {
        min-width: 220px;
    }
}

/* --- АНИМАЦИИ --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
    }
