/* Video Player Component Styles */

.video-screen-component {
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    position: relative;
}

.video-player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

.video-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.video-title {
    font-size: 1.5rem;
    margin: 0;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.back-button:hover, .back-button:focus {
    background-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

.video-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-controls {
    padding: 0.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-right: 1rem;
    position: relative;
    overflow: hidden;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #E50914;
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    font-size: 0.9rem;
    min-width: 80px;
    text-align: right;
}

/* Completion Overlay */
.completion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.completion-message {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.completion-message h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.completion-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.next-lesson-button,
.back-to-course-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.next-lesson-button {
    background-color: #E50914;
    color: white;
}

.next-lesson-button:hover,
.next-lesson-button:focus {
    background-color: #f40612;
    outline: none;
}

.back-to-course-button {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.back-to-course-button:hover,
.back-to-course-button:focus {
    background-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

/* Loading and Error States */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    background-color: #000;
    color: #fff;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #E50914;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.2rem;
}

.error-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 2rem;
    text-align: center;
    background-color: #000;
    color: #fff;
}

.error-container h2 {
    margin-bottom: 1rem;
    color: #E50914;
}

/* For TV focus navigation */
.back-button:focus,
.next-lesson-button:focus,
.back-to-course-button:focus {
    outline: 2px solid white;
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.5);
}