/* Стили для галереи видео с фильтрами */
.filter-buttons {
    text-align: center;
    margin-bottom: 30px;
}

.filter-buttons button {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    margin: 0 5px 10px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.filter-buttons button:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.filter-buttons button.active {
    /*background: #007cba;
    color: white;*/
}

.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dark-skin .video-card {
    background: #1c1c1c;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
        position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f0f0f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}


.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-card:hover .play-icon {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon i {
    font-size: 20px;
    margin-left: 3px;
}

.video-platform {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    color: white;
}

.video-platform.youtube {
    background: rgba(255, 0, 0, 0.9);
}

.video-platform.vk {
    background: rgba(0, 119, 255, 0.9);
}

.video-platform.rutube {
    background: rgba(255, 97, 0, 0.9);
}

.video-platform.dzen {
    background: rgba(255, 0, 0, 0.8);
}

.video-platform.steam {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
}

.video-platform.unknown {
    background: rgba(102, 102, 102, 0.9);
}

.video-card h3 {
    padding: 15px 15px 5px;
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
}

.category-link {
    display: inline-block;
    padding: 5px 15px 15px;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-link:hover {
    text-decoration: underline;
}

/* Стили для слайдера видео */
.lightslider {
    width: 100%;
    margin: 0 auto;
}

.lightslider li {
    list-style: none;
    margin-right: 10px;
    text-align: center;
    padding: 10px;
    transition: transform 0.3s ease;
}

.lightslider li:hover {
    transform: translateY(-5px);
}

.lightslider .video-thumbnail {
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.lightslider .video-thumbnail:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    z-index: 2;
}

.lightslider .video-thumbnail:hover .play-button {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 3px;
}

.video-platform-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
}

/* Цветовые акценты для play button в слайдере */
.lightslider .video-thumbnail.youtube .play-button {
    /*background: rgba(255, 0, 0, 0.9);*/
}

.lightslider .video-thumbnail.vk .play-button {
    /*background: rgba(0, 119, 255, 0.9);*/
}

.lightslider .video-thumbnail.rutube .play-button {
    /*background: rgba(255, 97, 0, 0.9);*/
}

.lightslider .video-thumbnail.dzen .play-button {
    /*background: rgba(255, 0, 0, 0.9);*/
}

.lightslider .video-thumbnail.steam .play-button {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 0.9);
}

/* Стили для заголовков видео в слайдере */
#video-gallery h5 {
    margin: 10px 0 0 0;
    font-size: 14px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 500;
}

/* Стили для модального окна */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 80%;
    max-width: 1200px;
    max-height: 675px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.video-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.video-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.video-modal-body {
    height: calc(100% - 61px);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-modal-player {
    width: 100%;
    height: 100%;
    background: #000;
}

#video-modal-player iframe,
#video-modal-player video {
    width: 100%;
    height: 100%;
    border: none;
}

/* Стили для Steam видео */
.steam-video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.steam-video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Адаптивность */
@media (max-width: 768px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .filter-buttons button {
        padding: 8px 16px;
        font-size: 13px;
        margin: 0 3px 8px;
    }
    
    .lightslider li {
        margin-right: 5px;
        padding: 5px;
    }
    
    .play-button, .play-icon {
        width: 50px;
        height: 50px;
    }
    
    .play-button svg {
        width: 20px;
        height: 20px;
    }
    
    .video-modal-content {
        width: 95%;
        height: 60%;
        max-height: 400px;
    }
    
    .video-modal-header {
        padding: 10px 15px;
    }
    
    .video-modal-header h3 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-gallery {
        grid-template-columns: 1fr;
    }
    
    .lightslider li {
        margin-right: 0;
    }
}

/* Стили для загрузки превью */
.video-thumbnail.loading {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Цветные фоны для платформ когда нет превью */

.video-thumbnail.youtube {
    background: #FF0000;
}

.video-thumbnail.vk {
    background: #0077FF;
}

.video-thumbnail.rutube {
    background: #FF6100;
}

.video-thumbnail.dzen {
    background: #FF0000;
}

.video-thumbnail.steam {
    background: #1b2838;
}

.video-thumbnail.steam_store {
    background: #1b2838;
}

.video-thumbnail.unknown {
    background: #666666;
}


.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}