.video-player-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    cursor: pointer;
    overflow: hidden;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.poster-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.poster-image.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #E07D40;
    animation: spin 1s ease-in-out infinite;
}

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

.controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    transition: opacity 0.3s ease;
    opacity: 1;
    z-index: 5;
}

.controls-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.video-title {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.progress-container {
    width: 100%;
    height: 7px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    /* margin-bottom: 10px; */
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: #E07D40;
    border-radius: 2px;
    width: 0%;
    transition: width 0.2s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    /* margin-bottom: 10px; */
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.control-btn:hover {
    transform: scale(1.1);
}

.play-pause-btn {
    font-size: 14px;
}

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

.volume-slider {
    width: 60px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

.volume-slider:hover {
    opacity: 1;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.fullscreen-btn {
    font-size: 18px;
}

.settings-menu {
    position: relative;
}

.settings-btn {
    font-size: 18px;
}

.settings-dropdown {
    position: absolute;
    bottom: 30px;
    right: 0;
    background-color: rgba(28, 28, 28, 0.95);
    border-radius: 4px;
    padding: 10px;
    min-width: 150px;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 99;
}

.settings-dropdown.show {
    display: block;
}

.settings-option {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

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

.quality-option.selected::after {
    content: "✓";
    margin-left: 5px;
}

.error-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    display: none;
    z-index: 20;
}

.error-icon {
    font-size: 48px;
    color: #E07D40;
    margin-bottom: 15px;
}

.error-text {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.error-btn {
    background-color: #E07D40;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin: 5px;
    transition: background-color 0.2s ease;
}

.error-btn:hover {
    background-color: #e91e63;
}

.error-btn.secondary {
    background-color: rgba(255, 255, 255, 0.2);
}

.error-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.debug-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
    z-index: 15;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.play-button-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(0, 0, 0, 0.8);
}

.play-button-overlay i {
    font-size: 30px;
    color: #fff;
    margin-left: 5px;
}

.buffering-indicator {
    position: absolute;
    bottom: 70px;
    left: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 4px;
    display: none;
    z-index: 6;
}

/* Keyboard shortcut hint */
.keyboard-hint {
    position: absolute;
    bottom: 60px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .control-buttons {
        gap: 10px;
    }

    .volume-slider {
        width: 40px;
    }

    .settings-dropdown {
        bottom: 40px;
        right: -10px;
    }

    .play-button-overlay {
        width: 60px;
        height: 60px;
    }
}

/* Animation for controls */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.video-container * {
    animation: fadeIn 0.3s ease;
}