/* ==================== СТРАНИЦА БЕЙНЕ МАТЕРИАЛДАР ==================== */

.videos-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.videos-section {
    max-width: 1400px;
    margin: 0 auto;
}

.videos-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.videos-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.videos-description {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

/* Сетка видео */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 30px;
}

/* Карточка видео */
.video-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color, #667eea);
}

.video-card:hover::before {
    height: 6px;
    background: linear-gradient(90deg, var(--secondary-color, #764ba2), var(--primary-color, #667eea));
}

.video-card[style*="display: none"] {
    display: none !important;
}

/* Иконка видео */
.video-card-icon {
    text-align: center;
    font-size: 3.5rem;
    color: var(--primary-color, #667eea);
    margin-bottom: 20px;
    animation: iconFloat 3s ease-in-out infinite;
}

.video-card-icon i {
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Контент карточки */
.video-card-content {
    flex: 1;
    margin-bottom: 20px;
}

.video-card-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.4;
    text-transform: capitalize;
    font-weight: 600;
}

.video-card-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #999;
}

.video-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-card-meta i {
    color: var(--accent-color);
}

/* Кнопки действий */
.video-card-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-play,
.btn-download {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-play {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-play:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-download {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-download:hover {
    background: linear-gradient(135deg, #3dd16b 0%, #32e1c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 233, 123, 0.4);
}

/* ==================== МОДАЛЬНОЕ ОКНО ВИДЕО ==================== */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.video-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.video-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.video-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-modal-body {
    padding: 0;
    position: relative;
}

#videoPlayer {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
    background: #000;
}

/* Анимации */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 1400px) {
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1000px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .videos-page {
        padding: 15px;
    }
    
    .videos-container {
        padding: 25px;
    }
    
    .videos-title {
        font-size: 2.2rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-card {
        padding: 20px;
    }
    
    .video-card-actions {
        flex-direction: column;
    }
    
    .video-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .video-modal-header {
        padding: 15px 20px;
    }
    
    .video-modal-header h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .videos-container {
        padding: 20px;
    }
    
    .videos-title {
        font-size: 1.8rem;
    }
    
    .video-card-icon {
        font-size: 3rem;
    }
    
    .video-card-title {
        font-size: 1.2rem;
    }
    
    .video-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    #videoPlayer {
        max-height: 80vh;
    }
}

/* Стили для поиска */
.videos-page .search-container {
    margin-bottom: 30px;
}

.videos-page .search-box {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.videos-page .search-box:focus-within {
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.videos-page .search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.videos-page .search-input::placeholder {
    color: #999;
}

.videos-page .search-results-count {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    display: inline-block;
}

.videos-page .search-results-count.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
