/* video-player.css */
.video-player-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-container:hover .video-controls {
    opacity: 1;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    position: relative;
    width: 0%;
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.progress-bar:hover .progress-handle {
    transform: scale(1);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.left-controls,
.right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.control-button:hover {
    opacity: 1;
}

.control-button i {
    font-size: 20px;
}

.time-display {
    font-size: 14px;
    font-family: monospace;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.volume-progress {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 100%;
}

/* Quality selector */
.quality-menu {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(28, 28, 28, 0.9);
    border-radius: 4px;
    padding: 10px 0;
    display: none;
}

.quality-menu.active {
    display: block;
}

.quality-option {
    padding: 8px 20px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quality-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quality-option.active {
    color: var(--primary);
}

/* Playlist section */
.video-playlist {
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.playlist-item:hover {
    background: #f5f5f5;
}

.playlist-item.active {
    background: var(--primary-light);
}

.thumbnail {
    width: 120px;
    height: 68px;
    border-radius: 4px;
    margin-right: 15px;
    object-fit: cover;
}

.video-info {
    flex: 1;
}

.video-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.video-meta {
    font-size: 14px;
    color: #666;
}

/* Loading spinner */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.video-loading.active {
    display: block;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Error message */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    display: none;
}

.video-error.active {
    display: block;
}


/* videos.css */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .video-card {
        margin-bottom: 1rem;
    }

    .search-section {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .form-select {
        width: 100%;
    }
}