/* Базовые настройки и переменные (Цвета как на твоем макете) */
:root {
    --bg-dark: #0a0a0a;
    --bg-panel: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-color: #e65100; /* Оранжевый цвет */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.5;
}

/* Обертка для контента по центру */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ШАПКА (HEADER) --- */
.header {
    background-color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    border-bottom: 1px solid #333;
}

.logo {
    display: flex;
    align-items: center;
    /* Важно, чтобы увеличенный логотип не перекрывался другими блоками */
    z-index: 100;
}

.logo img {
    height: 60px; /* Держим шапку стройной */
    width: auto;
    
    /* МАГИЯ: Визуально увеличиваем логотип на 60% */
    transform: scale(1.6);
    
    /* Точка масштабирования - левый центр (чтобы не уезжал влево) */
    transform-origin: left center;
}


.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.search-bar input {
    background-color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    color: white;
    width: 250px;
    outline: none;
}

.search-bar input::placeholder {
    color: #888;
}

/* --- БАННЕР "ПРЕМЬЕРА НЕДЕЛИ" --- */
.hero-banner {
    background-color: var(--bg-panel);
    border-radius: 8px;
    margin-top: 30px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content h2 {
    color: var(--accent-color);
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: normal;
}

.hero-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #ff6a00;
}

.hero-image img {
    border-radius: 4px;
    width: 150px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 18px;
    color: var(--text-muted);
}

/* --- СЕКЦИИ С ФИЛЬМАМИ --- */
.movies-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: normal;
}

/* CSS Grid для карточек (автоматически адаптируется под экран) */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.movie-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.movie-card:hover img {
    transform: scale(1.05); /* Легкое увеличение при наведении */
}

.movie-card h3 {
    font-size: 16px;
    font-weight: normal;
    text-align: center;
    color: var(--text-main);
}

/* АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ (Требование из лабораторной) */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .hero-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}
/* =========================================
   ДОПОЛНЕНИЯ ДЛЯ СТРАНИЦЫ "ЖАНРЫ"
========================================= */
.page-title {
    font-size: 28px;
    font-weight: normal;
    margin: 30px 0;
}

.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.genre-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
    border: 1px solid #333;
}

.genre-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.genre-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.genre-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.5), transparent);
}

.genre-number {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 18px;
}

.genre-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.2);
    margin: 5px 0 10px 0;
    position: relative;
}

.genre-divider::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 1px;
    background-color: var(--accent-color);
}

.genre-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.genre-overlay p {
    font-size: 12px;
    color: var(--text-muted);
}

/* =========================================
   ДОПОЛНЕНИЯ ДЛЯ СТРАНИЦЫ "ФИЛЬМЫ"
========================================= */
.movies-page-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}

.sidebar {
    width: 250px;
    background-color: var(--bg-panel);
    padding: 20px;
    border-radius: 8px;
    flex-shrink: 0;
}

.filter-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: normal;
}

.filter-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list label {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.filter-list label:hover {
    color: var(--text-main);
}

.mt-20 {
    margin-top: 30px;
}

.sort-btn {
    display: block;
    width: 100%;
    background-color: #2a2a2a;
    color: var(--text-main);
    border: none;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.sort-btn:hover {
    background-color: #444;
}

.main-content {
    flex-grow: 1;
}

.big-search input {
    width: 100%;
    background-color: var(--bg-panel);
    border: none;
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
}

.results-count {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ ФИЛЬМОВ */
@media (max-width: 768px) {
    .movies-page-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}
/* =========================================
   ДОПОЛНЕНИЯ ДЛЯ СТРАНИЦЫ "РЕЖИССЕР"
========================================= */
.director-profile {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 50px;
    background-color: var(--bg-panel);
    padding: 30px;
    border-radius: 8px;
}

.director-photo {
    flex-shrink: 0;
}

.director-photo img {
    width: 250px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.director-info {
    flex-grow: 1;
}

.director-bio {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.director-stats p {
    margin-bottom: 10px;
    font-size: 15px;
    color: var(--text-main);
}

.director-stats strong {
    color: var(--text-muted);
    margin-right: 5px;
}

/* Адаптивность для карточки режиссера на телефонах */
@media (max-width: 768px) {
    .director-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .director-photo img {
        width: 100%;
        max-width: 300px;
    }
}
/* =========================================
   ФУТЕР (ПОДВАЛ САЙТА)
========================================= */
.footer {
    background-color: var(--bg-dark);
    border-top: 1px solid #1a1a1a;
    padding: 60px 20px 20px;
    margin-top: 60px; /* Отступ от контента */
    color: var(--text-muted);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1a1a1a;
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
}

.social-icon:hover {
    background-color: var(--accent-color);
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.contact-icon {
    color: var(--accent-color);
    font-size: 16px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* =========================================
   АДАПТИВНОСТЬ (ПЛАНШЕТЫ И ТЕЛЕФОНЫ)
========================================= */

/* --- ПЛАНШЕТЫ (Ширина экрана 1024px и меньше) --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px; /* Уменьшаем отступы по бокам */
    }
    
    /* Футер: из 4 колонок делаем 2 */
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Страница Фильмов: Сайдбар (фильтры) уходит наверх */
    .movies-page-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: space-between;
    }
    .filter-section {
        flex: 1;
        min-width: 200px;
    }
    
    /* Сетка фильмов: 3 колонки на планшете */
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- ТЕЛЕФОНЫ (Ширина экрана 768px и меньше) --- */
@media (max-width: 768px) {
    
    /* ШАПКА: логотип по центру, меню в столбик (как на Рис. 11) */
    .header {
        flex-direction: column;
        padding: 15px;
    }
    .logo {
        margin-bottom: 15px;
        justify-content: center;
        width: 100%;
    }
    .main-nav {
        flex-direction: column;
        width: 100%;
        gap: 8px; /* Расстояние между кнопками */
        text-align: center;
    }
    .main-nav a {
        display: block;
        padding: 12px;
        background-color: var(--bg-panel);
        border-radius: 6px;
        border: 1px solid #333;
    }
    
    /* ПОИСК: растягиваем на всю ширину */
    .search-bar {
        width: 100%;
        margin-top: 15px;
    }
    .search-bar input {
        width: 100%;
    }
    
    /* ГЛАВНЫЙ БАННЕР */
    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .hero-image img {
        width: 100%;
        max-width: 220px;
        margin: 20px 0;
    }
    
    /* СЕТКА ФИЛЬМОВ: Строго 2 колонки для телефона (как на Рис. 13) */
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .movie-card h3 {
        font-size: 14px; /* Чуть уменьшаем шрифт названий фильмов */
    }
    
    /* ЖАНРЫ: 1 колонка на телефоне, чтобы было крупно и читаемо */
    .genres-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .genre-card img {
        height: 140px; /* Делаем карточки жанров компактнее по высоте */
    }

    /* РЕЖИССЕРЫ: фото по центру */
    .director-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .director-photo img {
        width: 100%;
        max-width: 250px;
    }
    
    /* ФУТЕР: все блоки в 1 колонку, текст по центру */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .social-icons {
        justify-content: center;
    }
    .contact-info li {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }
}
.active-sort { background-color: var(--accent-color); color: white; }