@charset "utf-8";
/* Video Library Styles */
.video-library {
    padding: 1rem 0;
    min-height: 70vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
	padding-top:0.15vh;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.page-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (min-width:1024px) {
	.video-library {
		margin-top: 5vh;
		position:relative;
		z-index: 5;
	}
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #3498db;
}

.search-container button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.search-container button:hover {
    color: #3498db;
}

.filter-container select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-container select:focus {
    outline: none;
    border-color: #3498db;
}

.view-toggle {
    background: #003366;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
	color:#fff;
}

.view-toggle:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.view-toggle .list-icon {
    display: none;
}

.view-toggle.list-view .grid-icon {
    display: none;
}

.view-toggle.list-view .list-icon {
    display: block;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-grid.list-view {
    grid-template-columns: 1fr;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.video-card:hover .play-button {
    background: rgba(52, 152, 219, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    line-height: 1.4;
}

.video-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.duration {
    color: #666;
    font-weight: 500;
}

/* List View Styles */
.video-grid.list-view .video-card {
    display: flex;
    height: 150px;
}

.video-grid.list-view .video-thumbnail {
    width: 250px;
    height: 150px;
    flex-shrink: 0;
}

.video-grid.list-view .video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.thumbnail-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
}

.thumbnail-loading .spinner {
    width: 30px;
    height: 30px;
    margin-bottom: 0.5rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.no-results button:hover {
    background: #2980b9;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    flex-shrink: 0;
}

.modal-video-container iframe,
.modal-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-info {
    padding: 2rem;
    background: white;
    flex-shrink: 0;
}

.modal-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.modal-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.modal-meta .category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.modal-meta .duration {
    color: #666;
    font-weight: 500;
}

/* Focus States for Accessibility */
.video-card:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.search-container input:focus,
.filter-container select:focus,
.view-toggle:focus,
.modal-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .video-card,
    .video-thumbnail img,
    .play-button,
    .modal,
    .modal-content,
    .spinner {
        transition: none;
        animation: none;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .video-grid.list-view .video-card {
        flex-direction: column;
        height: auto;
    }
    
    .video-grid.list-view .video-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .modal-info h2 {
        font-size: 1.25rem;
    }
    
    .modal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .video-library {
        padding: 1rem 0;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .modal-info {
        padding: 1rem;
    }
}

/* Tablet and Desktop Styles */
@media (min-width: 769px) {
    .modal {
        padding: 2rem;
    }
    
    .modal-close {
        width: 45px;
        height: 45px;
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .modal-close:hover {
        transform: scale(1.1);
    }
}

@media (min-width: 1024px) {
    .modal-content {
        max-width: 1000px;
    }
    
    .modal-info {
        padding: 2.5rem;
    }
    
    .modal-info h2 {
        font-size: 1.75rem;
    }
    
        .modal-info p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .modal-meta {
        gap: 1.5rem;
    }
    
    .modal-meta .category,
    .modal-meta .duration {
        font-size: 1rem;
    }
    
    .modal-close {
        width: 50px;
        height: 50px;
        top: 2rem;
        right: 2rem;
    }
}

/* Large Desktop Styles */
@media (min-width: 1440px) {
    .modal-content {
        max-width: 1200px;
    }
    
    .modal-info {
        padding: 3rem;
    }
    
    .modal-info h2 {
        font-size: 2rem;
    }
    
    .modal-info p {
        font-size: 1.15rem;
    }
}
