:root {
    --bg-main: #000000;
    --text-main: #ffffff;
    --netflix-red: #E50914;
    --black-red: #b20710;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Радиальный градиент: в центре чуть светлее (#1b1b1b), к краям уходит в глубокий черный */
    background: radial-gradient(circle at center, #1b1b1b 0%, #000000 100%) !important;
    background-attachment: fixed; /* Чтобы фон не прокручивался вместе с контентом */
    min-height: 100vh;
    margin: 0;
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.logo {
    color: var(--netflix-red);
    font-size: 35px;
    font-weight: bold;
}

.logo_1 {
    font-size: 26px;
}

.logo_2 {
    font-size: 3rem;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 4%;
    position: absolute;                             /* Шапка "всплывет" над контентом */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;                                    /* Чтобы шапка была выше картинки фона */
    box-sizing: border-box;                         /* Чтобы padding не раздувал ширину больше 100% */
}

.hero {
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), /* 0.7 означает %непрозрачности, один из них нужно уменьшить если нужно эффект затухания */
        url("img/hero_bg.jpg");

    background-size: cover;                         /* Картинка заполнит весь блок без искажений */
    background-position: center;                    /* Центрирует изображение */
    background-repeat: no-repeat;                   /* Чтобы картинка не дублировалась */
    height: 80vh;                                   /* Высота секции — 80% от высоты экрана */
    display: flex;                                  /* Включает флекс, чтобы центрировать текст внутри */
    align-items: center;                            /* Центрирует текст по вертикали */
    justify-content: center;                        /* Центрирует текст по горизонтали */
    flex-direction: column;                         /* Элементы будут идти сверху вниз, как в колонке */
    text-align: center;
}

.hero h1 {
    font-size: 3rem;                                /* 1rem - 16px */
    font-weight: 900;                               /* Делает текст жирным */
    text-transform: uppercase;                      /* Делает все буквы заглавными */
    max-width: 590px;                               /* Ограничивает ширину, чтобы текст "складывался" в 2-3 строки */
    margin: 0 auto;                                 /* Центрирует сам блок с текстом посередине экрана */
    line-height: 1.2;                               /* Расстояние между строками, чтобы текст не слипался */
    text-shadow: 3px 2px 5px var(--netflix-red);    /* Добавляет тень по x, y, размытие и какой цвет */
}

.nav-list {
    list-style: none;
    display: flex;
}

nav a {
    color: var(--text-main);                        /* Устанавливает цвет текста белым */
    text-decoration: none;                          /* Уберает подчеркивание */
    margin-left: 20px;                              /* Делает расстояние между пунктами меню */
    font-size: 18px;                                /* Размер текста */
    transition: color 0.5s ease;                    /* Делает смену цвета плавной */
}

nav a:hover {                                       /* Тегу а добавляет свойство */
    color: var(--netflix-red);                      /* Меняет цвет фона при наведении курсора */
}

.btn_primary {
    background-color: var(--netflix-red);           /* Устанавливает фоновый цвет из переменной */
    color: var(--text-main);                        /* Устанавливает цвет текста из переменной */
    padding: 12px 24px;                             /* Задает внутренние отступы (сверху/снизу и слева/справа) */
    text-decoration: none;                          /* Убирает подчеркивание */
    font-weight: bold;                              /* Делает текст жирным */
    border-radius: 4px;                             /* Слегка скругляет углы кнопки */
    font-size: 18px;                                /* Устанавливает размер шрифта */
    margin-top: 20px;                               /* Создает отступ сверху от других элементов */
    transition: background-color 0.5s ease;         /* Делает смену цвета плавной */
}

.btn_primary:hover {
    background-color: var(--black-red);             /* Меняет цвет фона при наведении курсора */
}

/*                                                */

.era_section {
    padding: 80px 4%;                               /* Большие отступы сверху и снизу для "дыхания" */
}

.container {
    max-width: 1100px;
    margin: 0 auto;                                 /* Центрирует контейнер */
}

.era_content {
    display: flex;
    align-items: center;                            /* Выравнивает текст и фото по центру друг друга */
    gap: 50px;                                      /* Расстояние между текстом и картинкой */
}

.era_text {
    flex: 1;                                        /* Занимает 50% ширины */
}

.era_date {
    color: var(--netflix-red);
    font-weight: bold;
    font-size: 1.2rem;
}

.era_text h2 {
    font-size: 2.5rem;
    margin: 10px 0 20px;
    text-shadow: 3px 2px 5px var(--netflix-red);
}

.era_text p {
    line-height: 1.6;                          /* Светло-серый текст приятнее для чтения, чем чисто белый */
    margin-bottom: 15px;
}

.era_image {
    flex: 1;                                        /* Занимает вторые 50% ширины */
}

.era_image img {
    width: 100%;
    border-radius: 8px;                             /* Скругляет углы у фото */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);        /* Добавляет "глубину" картинке */
}

.era_reverse .era_content {
    flex-direction: row-reverse;
}

.hub_container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 50px 4%;
}

.hub_card {
    width: 300px;
    height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden; /* Чтобы картинка не вылезала за скругленные углы */
    display: flex;
    align-items: flex-end; /* Текст внизу карточки */
    padding: 20px;
    text-decoration: none;
    transition: transform 0.4s ease;
}

/* Назначаем разные фото каждой карточке */
.card_dvd { background: url('img/red_logo.jpg') center/cover; }
.card_streaming { background: url('img/streaming_logo.jpg') center/cover; }
.card_originals { background: url('img/original_logo.jpg') center/cover; }
.card_russia {background: url('img/russia_logo.jpg') center/cover;}
.card_mh {background: url('img/mh_logo.jpg') center/cover;}
.card_wd {background: url('img/wd_logo.jpg') center/cover;}
.card_st {background: url('img/st_logo.jpg') center/cover;}
.card_sg {background: url('img/sg_logo.jpg') center/cover;}
.card_bm {background: url('img/bm_logo.jpg') center/cover;}
.card_tqg {background: url('img/tqg_logo.jpg') center/cover;}
.card_tw {background: url('img/tw_logo.jpg') center/cover;}
.card_ldr {background: url('img/ldr_logo.jpg') center/cover;}
.card_ozark {background: url('img/ozark_logo.jpg') center/cover;}
.card_dark {background: url('img/dark_logo.jpg') center/cover;}

.hub_card:hover {
    transform: scale(1.05); /* Легкое увеличение при наведении */
}

/* Затемнение поверх картинки, чтобы белый текст читался */
.card_overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.hub_card span {
    position: relative; /* Чтобы текст был поверх оверлея */
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
}

.hub_card {
    box-sizing: border-box;
    background-clip: padding-box;
    width: 100%;
    max-width: 300px;
    height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden; 
    display: flex;
    align-items: flex-end;
    padding: 20px;
    text-decoration: none;
    transition: all 0.4s ease; /* Плавность для всего */
    /* Добавляет рамку */
    border: 2px solid rgba(255, 255, 255, 0.1); 
    box-sizing: border-box;
}

.hub_card:hover {
    transform: scale(1.05);
    /* Сложная тень: свечение вокруг карточки */
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4); 
    border: 2px solid var(--netflix-red); /* Рамка становится красной */
}

/* Эффект "блеска" */
.hub_card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%; /* Прячет блеск за левой границей */
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: 1;
}

.hub_card:hover::before {
    left: 100%; /* "Протягивает" блеск через всю карточку */
}

.hub_header {
    text-align: center;
    padding: 60px 0 20px;
}

.hub_header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 3px 2px 5px var(--netflix-red);
}

.hub_rectangle {
    width: 100%;
    height: 40px;
    background-color: var(--black-red);
    border-bottom-left-radius: 50% 30px;
    border-bottom-right-radius: 50% 30px;
}

/* Затемняет все карточки, кроме той, на которую навели */
.hub_container:hover .hub_card:not(:hover) {
    opacity: 0.5;
    transform: scale(0.95); /* Соседние карточки чуть уменьшаются */
    filter: grayscale(50%); /* И становятся черно-белыми */
}

.films_container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 30px; /* Расстояние между карточками */
    padding: 100px 4%;
    justify-items: center; /* Центрируем карточки внутри ячеек */
}

.films_card {
    box-sizing: border-box;
    width: 300px;
    height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden; /* Чтобы картинка не вылезала за скругленные углы */
    display: flex;
    align-items: flex-end; /* Текст внизу карточки */
    padding: 20px;
    text-decoration: none;
    transition: transform 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.films_card:hover {
    transform: scale(1.05); /* Легкое увеличение при наведении */
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4);
    border: 2px solid var(--netflix-red);
    z-index: 10;
}

.card_description {
    position: absolute;
    bottom: -100%; /* Прячем описание ниже границы карточки */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: #ddd;
    padding: 15px;
    font-size: 0.9rem;
    transition: bottom 0.4s ease;
    box-sizing: border-box;
    z-index: 3;
}

.films_card:hover .card_description {
    bottom: 0; /* Поднимаем описание при наведении */
}

/* Адаптивность: если экран узкий, 5 в ряд не влезут */
@media (max-width: 1200px) {
    .films_container { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .films_container { grid-template-columns: repeat(2, 1fr); }
}

/* Затемнение поверх картинки, чтобы белый текст читался */
.card_overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.films_card span {
    position: relative; /* Чтобы текст был поверх оверлея */
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
}

.films_card {
    box-sizing: border-box;
    background-clip: padding-box;
    width: 100%;
    max-width: 300px;
    height: 400px;
    position: relative;
    border-radius: 8px;
    overflow: hidden; 
    display: flex;
    align-items: flex-end;
    padding: 20px;
    text-decoration: none;
    transition: all 0.4s ease; /* Плавность для всего */
    /* Добавляет рамку */
    border: 2px solid rgba(255, 255, 255, 0.1); 
    box-sizing: border-box;
}

.films_card:hover {
    transform: scale(1.05);
    /* Сложная тень: свечение вокруг карточки */
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4); 
    border: 2px solid var(--netflix-red); /* Рамка становится красной */
}

/* Эффект "блеска" */
.films_card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%; /* Прячет блеск за левой границей */
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: 1;
}

.films_card:hover::before {
    left: 100%; /* "Протягивает" блеск через всю карточку */
}

.films_header {
    text-align: center;
    padding: 60px 0 20px;
}

.films_header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 3px 2px 5px var(--netflix-red);
}

.films_rectangle {
    width: 100%;
    height: 40px;
    background-color: var(--black-red);
    border-bottom-left-radius: 50% 30px;
    border-bottom-right-radius: 50% 30px;
}

/* Фоновая подложка */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Полупрозрачный черный */
    backdrop-filter: blur(5px); /* Размытие заднего фона */
}

/* Контентная область */
.modal-content {
    background-color: #181818;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #333;
    width: 80%;
    max-width: 700px;
    border-radius: 12px;
    position: relative;
    color: white;
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.2);
}

.close-modal {
    position: absolute;
    right: 20px; top: 10px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover { color: var(--netflix-red); }

#modal-title { font-size: 2.5rem; color: var(--netflix-red); margin-bottom: 20px; }
.modal-info p { margin: 10px 0; font-size: 1.1rem; border-bottom: 1px solid #333; padding-bottom: 5px; }
.modal-text { line-height: 1.6; margin-top: 20px; color: #ccc; }


.main_footer {
    padding: 50px 0;
    color: #757575;
    font-size: 14px;
    border-top: 1px solid #222;
    margin-top: 50px;
}

.footer_cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.main_footer ul {
    list-style: none;
    padding: 0;
}

.main_footer a {
    color: #757575;
    text-decoration: none;
}

.main_footer a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 12px;
}

@media (max-width: 768px) {
    .hub_container {
        flex-direction: column; /* Карточки станут вертикальным списком */
        align-items: center;    /* Центрирует их */
    }
}

#media_container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#intro_video, #intro_gif {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет весь контейнер */
    display: none;     /* По умолчанию скрыты, JS включит нужный элемент */
    position: absolute; /* Чтобы они накладывались друг на друга в одной точке */
    top: 0;
    left: 0;
}

/* Этот класс мы будем добавлять через JavaScript, когда видео будет готово */
.video-active {
    opacity: 1 !important;
}

#skip_button {
    position: absolute;
    bottom: 40px;
    right: 40px;
    padding: 10px 25px;
    background: transparent;
    color: white;
    border: 1px solid white;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
}

#skip_button:hover {
    background: white;
    color: black;
}

/* Пунктирный разделитель (как отрывная линия) */
.post_stamp_divider {
    height: 1px;
    width: 100%;
    border-top: 2px dashed #e50914; /* Красный пунктир как на конверте */
    margin-top: 20px;
}

/* 1. КОНТЕЙНЕР И ФОН СЕКЦИИ */
.era_analog {
    position: relative;
    padding: 200px 0; /* Огромные отступы, чтобы письму было куда вылетать */
    min-height: 600px;
    overflow: visible; /* ВАЖНО: чтобы письмо не обрезалось краями секции */
}

.netflix_envelope_interactive {
    position: relative;
    width: 100%;
    max-width: 900px; /* Немного сузил для лучшего баланса */
    height: 550px;
    margin: 0 auto;
    cursor: pointer;
    perspective: 1500px; /* Усиливаем 3D эффект для клапана */
}

/* 2. ЧАСТИ КОНВЕРТА */
.envelope_back {
    position: absolute;
    width: 100%; height: 100%;
    background: #b00710;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    z-index: 1;
}

.envelope_front {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 70%;
    background: #e50914;
    border-radius: 0 0 12px 12px;
    z-index: 4; /* Поверх всего в закрытом состоянии */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
}

.envelope_logo {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    font-family: 'Arial Black', sans-serif;
    text-shadow: 3px 2px 5px rgba(0, 0, 0, 0);
}

.envelope_flap {
    position: absolute;
    top: 0; left: 0;
    width: 100%; 
    height: 55%; 
    background: #e50914;
    border-radius: 12px 12px 0 0;
    z-index: 5;
    transform-origin: top;
    transition: transform 0.7s ease-in-out;
}

/* 3. ПИСЬМО (ВЛЕВО И ВНИЗ) */
.envelope_letter {
    position: absolute;
    width: 85%; 
    height: 70%; /* Сделали чуть меньше высоты конверта */
    background: #fdfdfd;
    left: 7.5%; 
    top: 15%; /* Опустили ниже верхнего края, чтобы клапан её закрывал */
    padding: 30px;
    /* ВАЖНО: z-index должен быть меньше, чем у envelope_front (4) и flap (5) */
    z-index: 2;  
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    color: #1a1a1a;
    overflow-y: auto;
}

/* 4. ФОТОГРАФИИ (ВПРАВО) */
.envelope_photos {
    position: absolute;
    width: 400px; height: 450px;
    right: 10%; top: 10%;
    z-index: 2;
    transition: transform 0.8s ease-out 0.2s;
    pointer-events: none;
}

/* Базовые стили для всех фото */
.photo {
    position: absolute;
    background: white;
    padding: 8px 8px 30px 8px; /* Нижний отступ больше для эффекта полароида */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    /* ЖЕСТКО ОГРАНИЧИВАЕМ РАЗМЕР ТУТ */
    width: 300px; 
    height: auto;
    transition: transform 0.6s ease;
}

/* КРИТИЧЕСКИ ВАЖНО: чтобы сама картинка не вылезала из рамки */
.photo img {
    width: 100%;       /* Растягивается на всю ширину рамки (150px) */
    height: auto;     /* Можешь задать фиксированную высоту для единообразия */
    object-fit: cover; /* Обрезает лишнее, чтобы фото не сплющилось */
    display: block;
}

/* Позиции при открытии (настраивай эти цифры, чтобы разлет был красивым) */
.is-open .polaroid_1 {
    transform: translate(120px, -50px) rotate(10deg);
}

.is-open .polaroid_2 {
    transform: translate(250px, 40px) rotate(-15deg);
}

.is-open .polaroid_3 {
    transform: translate(180px, 150px) rotate(5deg);
}

/* Проявляем фото при открытии */
.is-open .envelope_photos {
    opacity: 1;
}
/* 5. СОСТОЯНИЕ "ОТКРЫТО" */
.netflix_envelope_interactive.is-open .envelope_flap {
    transform: rotateX(160deg);
    z-index: 0; 
}

.netflix_envelope_interactive.is-open .envelope_letter {
    /* Смещение: на 50% влево и на 40% вниз. Поворот на -4 градуса */
    transform: translate(-55%, 40%) rotate(-4deg);
    z-index: 10;
}

.netflix_envelope_interactive.is-open .envelope_photos {
    /* Фотографии улетают вправо и чуть ниже уровня письма */
    transform: translate(80%, 45%) rotate(12deg);
    z-index: 9;
}

.monitor-environment {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 0; /* Отступы, чтобы монитор не лип к краям */
    width: 100%;
    min-height: 800px; /* Высота зоны с монитором */
    overflow: hidden;
    position: relative;
}

/* 1. КОРПУС МОНИТОРА */
.monitor-wrapper {
    perspective: 1000px; /* Добавляем легкую перспективу пространству */
}

.monitor-body {
    background: linear-gradient(135deg, #d4d0c8 0%, #a09d96 100%);
    /* Легкая зернистость пластика */
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E'), linear-gradient(135deg, #d4d0c8 0%, #a09d96 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.8), /* Падающая тень */
        inset 2px 2px 5px rgba(255, 255, 255, 0.5), /* Свет на верхней грани */
        inset -5px -5px 15px rgba(0, 0, 0, 0.3); /* Тень на нижней грани */
    width: 1000px;
    position: relative;
}

.monitor-perforation {
    height: 15px;
    width: 80%;
    margin: 0 auto 15px auto;
    background-image: radial-gradient(#555 30%, transparent 40%);
    background-size: 8px 8px;
    opacity: 0.7;
}

/* 2. ЭКРАН */
.monitor-screen-container {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 
        inset 0 10px 20px rgba(0, 0, 0, 0.9), /* Утопленность экрана */
        inset 0 -2px 5px rgba(255, 255, 255, 0.1);
}

.monitor-screen {
    background-color: #0a0f0a; /* Цвет выключенного ЭЛТ */
    height: 600px;
    border-radius: 20% / 5%; /* Легкая выпуклость кинескопа */
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Блик стекла */
.glass-glare {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100%;
    background: linear-gradient(105deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 40%);
    pointer-events: none; /* Чтобы блик не мешал кликам и скроллу */
    z-index: 10;
}

/* Сканлайны (Строчная развертка) */
.scanlines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 2px,
        rgba(0, 0, 0, 0.1) 3px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 5;
}

/* 3. КОНТЕНТ ВНУТРИ ЭКРАНА */
.screen-content {
    font-family: 'VT323', monospace;
    color: #33ff00;
    line-height: 1.2;
    letter-spacing: 1px;
    padding: 40px;
    height: 100%;
    overflow-y: auto;
    opacity: 0;
    /* Свечение */
    text-shadow: 0 0 2px rgba(51, 255, 0, 0.8), 0 0 10px rgba(51, 255, 0, 0.3);
    /* RGB-развертка */
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    background-attachment: fixed;
}

.screen-content p:last-child {
    margin-bottom: 50px; 
    padding-bottom: 20px;
}

.screen-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    color: #33ff00;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 3px 0 rgba(255,0,0,0.4), -3px 0 rgba(0,0,255,0.4), 0 0 10px rgba(51,255,0,0.6);
}
.is-off { background-color: #050505 !important; }
.flash-effect { animation: flash 0.15s ease-out; }
@keyframes flash { 0% { background: #fff; } 100% { background: #111a11; } }

/* Эффект дрожания контента */
.screen-content.jitter {
    animation: crt-jitter 0.1s infinite alternate;
}

@keyframes crt-jitter {
    0% { transform: translateY(0) scale(1); opacity: 0.95; }
    100% { transform: translateY(1px) scale(1.001); opacity: 1; }
}

/* Кастомный скроллбар в стиле Win 95 */
.screen-content::-webkit-scrollbar {
    width: 16px;
}
.screen-content::-webkit-scrollbar-track {
    background: #dfdfdf;
    border-left: 2px solid #808080;
}
.screen-content::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
}
.screen-content::-webkit-scrollbar-button {
    background: #dfdfdf;
    height: 16px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
}

/* 4. АНИМАЦИИ ВКЛЮЧЕНИЯ */
.is-on { background-color: #111a11; }

.flash-effect {
    animation: crt-flash 0.15s ease-out;
}
@keyframes crt-flash {
    0% { background-color: #fff; box-shadow: 0 0 100px rgba(255,255,255,0.8); }
    100% { background-color: #111a11; }
}

.noise-wave {
    position: absolute;
    top: -100%; left: 0; width: 100%; height: 100%;
    background: url('https://media.giphy.com/media/oEI9uWUicfLxL6B1pL/giphy.gif'); /* Или твой SVG шум */
    opacity: 0; z-index: 10; pointer-events: none;
}
.noise-active { animation: noise-move 0.6s linear; }
@keyframes noise-move { 0% { top: -100%; opacity: 0.5; } 100% { top: 100%; opacity: 0; } }

/* 5. ПАНЕЛЬ УПРАВЛЕНИЯ */
.monitor-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.dummy-buttons {
    display: flex;
    gap: 15px;
}

.dummy-btn {
    width: 30px; height: 15px;
    background: #a09d96;
    border: 2px solid transparent;
    border-top-color: #fff; border-left-color: #fff;
    border-bottom-color: #555; border-right-color: #555;
    cursor: default;
    color: #555; 
    font-size: 10px; 
    line-height: 10px;
}

.power-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.led {
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    background: #444; 
    transition: 0.3s;
}
.led.on { 
    background: #33ff00; 
    box-shadow: 0 0 10px #33ff00; }

.power-btn {
    width: 50px; height: 35px; background: #E50914; border: none; border-radius: 5px;
    cursor: pointer; border-bottom: 4px solid #8b0000;
}
.power-btn:active { border-bottom: 0; transform: translateY(4px); }

.error-wrapper {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-code {
    font-size: 10rem;
    font-weight: bold;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 5px 5px 0px var(--color-olive);
}

.error-message {
    font-size: 1.5rem;
    max-width: 600px;
    margin-bottom: 40px;
    color: var(--text-main);
}

.compass-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
    opacity: 0.7;
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--color-olive);
  color: var(--color-cream);
  text-decoration: none;
  border: 1px solid var(--color-gold);
  cursor: pointer;
  text-align: center;
  transition: 0.2s ease;
}

/* --- ORIGINAL ERA: СРЕДА И ТВ --- */
.orig-environment {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 100px 0;
    min-height: 800px;
    position: relative;
}

.tv-wrapper {
    position: relative;
    width: 850px;
    aspect-ratio: 16 / 9; /* Идеальные пропорции ТВ */
}

/* Эффект Ambilight за телевизором */
.tv-ambilight {
    position: absolute;
    top: 5%; left: 5%; right: 5%; bottom: 5%;
    background: transparent;
    box-shadow: 0 0 80px rgba(229, 9, 20, 0.4);
    border-radius: 10px;
    z-index: 0;
    animation: ambilight-pulse 4s infinite alternate;
}

@keyframes ambilight-pulse {
    0% { box-shadow: 0 0 60px rgba(229, 9, 20, 0.2); }
    100% { box-shadow: 0 0 120px rgba(229, 9, 20, 0.7); }
}

/* Корпус ТВ (безрамочный) */
.tv-bezel {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    border-radius: 8px;
    border: 2px solid #222;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.1), 0 20px 50px rgba(0,0,0,0.8);
    overflow: hidden;
    z-index: 1;
}

/* Стеклянный блик поверх всего */
.tv-glass-glare {
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 40%);
    pointer-events: none;
    z-index: 10;
}

.tv-screen {
    position: relative;
    width: 100%; height: 100%;
    background-color: #050505;
}

/* iframe ютуба */
#tv_yt_player {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Запрещаем кликать на само видео */
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s;
}

/* --- UI СЛОЙ (ПОИСК) --- */
.tv-ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #fff; /* Белый фон для этапа Б */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    z-index: 5;
}

.tv-logo-static {
    font-family: 'Arial Black', sans-serif;
    font-size: 5rem;
    color: #E50914;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.tv-search-pill {
    width: 400px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 30px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, opacity 0.5s;
}

.tv-search-pill:hover {
    transform: scale(1.02);
}

.search-progress {
    position: absolute;
    left: 0; top: 0; height: 100%;
    width: 60px; /* Исходная ширина кружка с лупой */
    background: #e0e0e0;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1); /* Плавное заполнение */
}

.search-input-mock {
    margin-left: 80px;
    color: #999;
    font-size: 1.2rem;
}

/* Классы для анимации поиска */
.tv-search-pill.is-loading .search-progress {
    width: 100%; /* Заполняет весь овал */
    background: #E50914; /* Становится красным в конце */
}
.tv-search-pill.is-loading .search-icon {
    opacity: 0;
}
.tv-search-pill.is-collapsed {
    opacity: 0;
    transform: scale(0.8);
}

/* --- КОНТЕНТНЫЙ СЛОЙ --- */
.tv-content-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #141414;
    color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    z-index: 6;
    overflow-y: auto;
    padding: 40px;
    box-sizing: border-box;
}


.tv-content-layer::-webkit-scrollbar { width: 8px; }
.tv-content-layer::-webkit-scrollbar-thumb { background: #E50914; border-radius: 4px; }

/* --- ПУЛЬТ --- */
.tv-remote {
    width: 80px;
    height: 300px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 40px;
    box-shadow: 10px 20px 30px rgba(0,0,0,0.6), inset -2px -2px 5px rgba(0,0,0,0.5), inset 2px 2px 5px rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
}

.remote-btn.power {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #E50914;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.4);
    transition: all 0.3s;
    position: relative;
}

/* Иконка Power средствами CSS */
.remote-btn.power::before {
    content: ''; position: absolute;
    top: 10px; left: 18px; width: 4px; height: 10px;
    background: white; border-radius: 2px;
}
.remote-btn.power::after {
    content: ''; position: absolute;
    top: 15px; left: 10px; width: 20px; height: 20px;
    border: 4px solid white; border-top-color: transparent; border-radius: 50%;
    box-sizing: border-box;
}

.remote-btn.power:hover {
    box-shadow: 0 0 20px #fff; /* Белое свечение по ТЗ */
    background: #ff0f1a;
}

.remote-dpad {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: #333;
    position: relative;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
}
.dpad-center {
    position: absolute;
    top: 15px; left: 15px; width: 30px; height: 30px;
    background: #222; border-radius: 50%;
}
.remote-pill-buttons {
    display: flex; gap: 10px;
}
.remote-btn.small {
    width: 25px; height: 10px; background: #444; border-radius: 5px;
}

/* Основной контейнер текста внутри телевизора */
.tv-inner-content {
    color: #F5F5F5;
    font-family: 'Geologica', sans-serif; /* Основной текст */
    line-height: 1.6;
    
    /* Улучшенное сглаживание шрифтов */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Дополнительно: легкая тень для читаемости на темном фоне */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Заголовки (H2, H3) в стиле Netflix Originals */
.tv-inner-content h2, 
.tv-inner-content h3 {
    /* Если Archia установлен в системе или подключен локально */
    font-family: 'Archia', 'Geologica', sans-serif; 
    font-weight: 700;
    text-transform: uppercase; /* Традиционно для Originals */
    letter-spacing: 2px;       /* Тот самый "киношный" вид */
    color: #ffffff;
    margin-bottom: 20px;
}

.tv-inner-content h2 {
    font-size: 2.5rem;
    border-left: 4px solid #E50914; /* Акцентная линия слева, как в UI Netflix */
    padding-left: 15px;
}

.tv-inner-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    color: #E50914; /* Красный акцент для подзаголовков */
}

/* Стилизация параграфов */
.tv-inner-content p {
    font-weight: 300; /* Более легкое начертание для Geologica выглядит премиальнее */
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* =========================================
   RUSSIA ERA: BROKEN TV STYLES
   ========================================= */

.broken-environment {
    padding: 150px 0; /* Даем место для падения */
}

/* Изначальное состояние ТВ */
.broken-tv {
    transform: rotate(15deg);
    transform-origin: left bottom;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

.broken-tv:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

/* Мертвый неон */
.dead-ambilight {
    box-shadow: 0 0 50px rgba(50, 50, 50, 0.5);
    animation: none; /* Отключаем пульсацию из оригинальной эры */
}

/* Базовый класс для всех слоев экрана разбитого ТВ */
.screen-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0; 
}

/* 1. Черный выключенный экран */
.black-layer {
    background-color: #050505;
    opacity: 1; /* Виден по умолчанию */
    z-index: 2;
}

/* 2. Шум */
.broken-tv .noise-layer {
    background: url('https://media.giphy.com/media/oEI9uWUicfLxL6B1pL/giphy.gif');
    z-index: 3;
    mix-blend-mode: screen;
}

/* 3. Ошибка 403 */
.error-layer {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4;
}
.error-layer span {
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 0 red, -2px 0 blue; /* Легкий хроматический эффект */
}

/* 4. Финальный текст */
.russia-text-layer {
    background-color: #0a0a0a;
    z-index: 1;
    pointer-events: auto; /* Чтобы текст можно было скроллить, если не влезет */
}

/* 5. Трещины на стекле */
.cracks-layer {
    z-index: 10;
    /* Уменьшаем блюр стекла, чтобы он не размывал текст под собой слишком сильно */
    backdrop-filter: blur(0.7px); 
    /* Делаем сами линии трещин чуть тоньше и прозрачнее */
    opacity: 0.9; 
}

/* --- АНИМАЦИИ --- */

/* А. Падение */
.broken-tv.is-falling {
    animation: tv-fall 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    cursor: default;
}

@keyframes tv-fall {
    0% { transform: rotate(15deg); }
    50% { transform: rotate(-3deg) translateY(20px); }
    70% { transform: rotate(1deg) translateY(-5px); }
    90% { transform: rotate(-0.5deg) translateY(2px); }
    100% { transform: rotate(0deg) translateY(0); }
}

/* Б. Глитч (Агония) */
.broken-tv.is-glitching .black-layer {
    animation: flicker-black 0.2s infinite;
}
.broken-tv.is-glitching .noise-layer {
    opacity: 0.6;
}
.broken-tv.is-glitching .error-layer {
    animation: flicker-error 2.5s forwards;
}

@keyframes flicker-black {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes flicker-error {
    0%, 10% { opacity: 0; }
    11%, 15% { opacity: 1; }  /* Короткая вспышка */
    16%, 30% { opacity: 0; }
    31%, 80% { opacity: 1; }  /* Зависание надписи 403 */
    81%, 100% { opacity: 0; }
}

/* В. Окончательно сломан (Финальное состояние) */
.broken-tv.is-broken .black-layer,
.broken-tv.is-broken .noise-layer,
.broken-tv.is-broken .error-layer {
    display: none; /* Прячем все глитчи */
}
.broken-tv.is-broken .russia-text-layer {
    opacity: 1;
    transition: opacity 1s ease;
}
.broken-tv.is-broken .cracks-layer {
    opacity: 1;
}

/* --- ЭСТЕТИКА ВЫГОРЕВШЕГО ТЕКСТА --- */
.faded-text {
    /* Увеличиваем контраст: вместо #777 используем #bbb */
    color: #bbb !important; 
    /* Уменьшаем размытие до минимума, чтобы буквы не сливались */
    filter: blur(0.2px); 
    opacity: 0.9;
    /* Добавляем четкую черную подложку (shadow), чтобы текст "отрывался" от фона */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    transition: all 0.5s ease;
}

.faded-text:hover {
    filter: blur(0);
    color: #eee !important;
    opacity: 1;
}

.faded-text h2 {
    /* Делаем заголовок чуть ярче основного текста */
    color: #ddd !important;
    border-left: 4px solid #444 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1) !important;
    /* Смягчаем clip-path, чтобы не "съедало" важные части букв */
    clip-path: polygon(0 0, 100% 0, 99% 30%, 100% 70%, 98% 100%, 0 100%);
    margin-bottom: 20px;
}

.faded-text h3 {
    color: #aaa !important;
    margin-top: 15px;
}

.faded-date {
    background: rgba(255, 255, 255, 0.05);
    color: #888 !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Фиксированная кнопка */
.scroll-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.scroll-btn.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-btn:hover {
    background-color: var(--netflix-red);
    border-color: var(--netflix-red);
    transform: scale(1.1);
}

.scroll-btn svg {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.scroll-btn.up svg {
    transform: rotate(180deg); /* Смотрит вверх */
}
.scroll-btn.down svg {
    transform: rotate(0deg); /* Смотрит вниз */
}