/* Основные стили */
body {
    background-color: #121212; /* Темный фон */
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
    width: 100%;
    height: 100vh;
    background-color: #1c1c1e;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: all 1.5s ease-in-out; /* Плавный переход для контейнера */
}

h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #59c5c5;
    text-shadow: 0 0 5px rgba(89, 197, 197, 0.5);
}

/* Стили для списка каналов */
#channels {
    height: 100%;
    overflow-y: auto;
    list-style: none;
    padding: 5px;
    margin: 1;
    transition: all 1.5s ease-in-out; /* Плавный переход для списка каналов */
}

.channel {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: #3a3a3c;
    transition: transform 1.5s, background-color 0.3s;
    cursor: pointer;
}

.channel:hover {
    transform: translateY(-5px);
    background-color: #444;
}

.channel-icon {
    width: 60px;
    height: 35px;
    border-radius: 1px;
    object-fit: cover;
    margin-right: 15px;
}

.channel-info {
    flex-grow: 1;
}

.channel-title {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Стили для видео плеера */
#video-player {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    transition: all 1.5s ease-in-out; /* Плавный переход для плеера */
    position: relative; /* Для позиционирования иконки бургер-меню */
}

#player {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* Иконка бургер-меню */
#toggle-playlist {
    position: absolute;
    bottom: 5px;
    left: 0px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 10;
    display: none; /* Скрыта по умолчанию */
}

#toggle-playlist:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Адаптация для портретной ориентации */
@media only screen and (orientation: portrait) {
    #container {
        flex-direction: column;
    }

    #channels {
        height: 40vh;
        width: 100%;
    }

    #video-player {
        height: 60vh;
        width: 100%;
    }

    #toggle-playlist {
        display: none; /* Скрываем иконку в портретной ориентации */
    }
}

/* Адаптация для альбомной ориентации */
@media only screen and (orientation: landscape) {
    #container {
        flex-direction: row;
    }

    #channels {
        width: 100%;
        height: 93%;
    }

    #video-player {
        width: 70%;
        height: 100%;
    }

    #toggle-playlist {
        display: block; /* Показываем иконку в альбомной ориентации */
    }

    /* Скрываем заголовок в альбомной ориентации */
    h3 {
        display: none;
    }
}

/* Стили для скрытого плейлиста */
#container.collapsed #channels {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 1.5s ease;
}

#container.collapsed #video-player {
    width: 100%;
    height: 100%;
    transition: all 1.5s ease;
}

#container.collapsed #player {
    border-radius: 0; /* Убираем скругление углов в полноэкранном режиме */
}