/*
Theme Name: YouTube Clone
Theme URI: (ваш сайт)
Author: Вы
Description: Тема в стиле YouTube с адаптивом
Version: 2.0
*/

/* Импорт всех CSS-модулей */
@import url("css/base.css");
@import url("css/header.css");
@import url("css/cards.css");
@import url("css/buttons.css");
@import url("css/modal.css");
@import url("css/video-modal.css");
@import url("css/comments.css");
@import url("css/auth.css");
@import url("css/playlist.css");
@import url("css/search.css");
@import url("css/responsive.css");
@import url("css/bottom-nav.css");
@import url("css/tabs.css");

/* ========== ГЛОБАЛЬНЫЕ СТИЛИ ========== */
.upload-modal {
    display: none !important;
}

.upload-modal.active {
    display: block !important;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 768px) {
    .yt-container {
        padding: 0;
        margin: 0;
        margin-left: 20px;
        margin-right: 20px;
        gap: 0;
    }
    
    .yt-main {
        padding: 0;
    }
}

/* ========== ФИКСЫ ДЛЯ ПЛЕЕРА ========== */

/* Фикс позиции PiP */
.pip-video {
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important;
    left: auto !important;
    width: 280px !important;
    z-index: 10000 !important;
    background: #000 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

@media (max-width: 768px) {
    .pip-video {
        bottom: 70px !important;
        right: 10px !important;
        width: 160px !important;
    }
}

/* Стили для контролов PiP */
.pip-controls-wrapper {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(transparent, rgba(0,0,0,0.7)) !important;
    display: flex !important;
    justify-content: space-around !important;
    padding: 6px !important;
    opacity: 0 !important;
    transition: opacity 0.3s !important;
}

.pip-video:hover .pip-controls-wrapper {
    opacity: 1 !important;
}
.sidebar-menu {margin-top:12px;}

.pip-controls-wrapper button {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 14px !important;
    cursor: pointer !important;
    padding: 4px 6px !important;
    border-radius: 50% !important;
}

.pip-controls-wrapper button:hover {
    background: rgba(255,255,255,0.2) !important;
}

/* Липкий плеер */
.players-container {
    transition: all 0.3s ease;
}

.players-container.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 10000 !important;
    background: #000 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    animation: stickySlideDown 0.3s ease !important;
}

@keyframes stickySlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.players-container.sticky video {
    max-height: 70vh !important;
    object-fit: contain !important;
}

.sticky-placeholder {
    display: none;
    background: transparent;
}

@media (max-width: 768px) {
    .players-container.sticky video {
        max-height: 40vh !important;
    }
}

/* ========== НИЖНЕЕ МЕНЮ ========== */
/* По умолчанию — скрыто */
.mobile-bottom-nav {
    display: none !important;
}

/* Только на мобильных (ширина ≤ 768px) — показываем */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
}

/* ========== СЕТКА ВИДЕО ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 16px;
}

@media (max-width: 1400px) {
    
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .tabs {margin-bottom:24px;}
}

@media (max-width: 1000px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tabs {margin-bottom:24px;}
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    .tabs {margin-bottom:10px;}
}
.yt-container {
    display: flex;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.yt-main {
    flex: 1;
    min-width: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .yt-main {
        padding: 0;
    }
}
.left-sidebar {
    display: block !important; 
}
.yt-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: white !important;
}

/* Добавляем отступ сверху для контента, чтобы он не уходил под хеадер */
.left-sidebar {
    top: 57px;
}

.yt-container {
    margin-top: 57px;
}

@media (max-width: 768px) {
    .left-sidebar {
        top: 56px;
    }
    .yt-container {
        margin-top: 56px;
    }
}
/* Скрываем левое меню и кнопку на мобильных */
@media (max-width: 768px) {
    .left-sidebar {
        display: none !important;
    }
    
    .sidebar-toggle {
        display: none !important;
    }
    
    .header-left {
        gap: 0;
    }
} 
/* Временные стили для главной */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none !important;
}
.video-thumbnail img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.video-card-info {
    padding: 12px;
}
.video-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 8px;
}
.channel-name {
    font-size: 14px;
    color: #606060;
} 
/* Скрываем левое меню на мобильных */
@media (max-width: 768px) {
    .left-sidebar {
        display: none !important;
    }
    
    .yt-container {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .yt-main {
        width: 100% !important;
        padding: 0 12px !important;
    }
} /* Мобильный поиск - плавное разворачивание в шапке */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 10002;
    padding: 8px 16px;
    transform: translateY(-100%);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.mobile-search-overlay.active {
    transform: translateY(0);
}

.mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-search-bar .close-search {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    color: #666;
    flex-shrink: 0;
}

.mobile-search-bar form {
    flex: 1;
    display: flex;
}

.mobile-search-bar input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    font-size: 14px;
    background: #f5f5f5;
    outline: none;
    transition: none;
}

.mobile-search-bar input:focus {
    border-color: #e5e5e5;
    background: #f5f5f5;
    box-shadow: none;
    outline: none;
}

.mobile-search-bar button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    color: #666;
    flex-shrink: 0;
}