﻿.controls {
    position: absolute;
    padding: 10px;
    background: #222;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    top: 0;
    z-index: 100;
}

.viewer-container {
    width: 100%;
    height: 100%; /* Adjust based on your controls height */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: grab;
}

    .video:active {
        cursor: grabbing;
    }

.control-bar {
    position: absolute;
    bottom: 80px; /* Increased from 20px to avoid browser menu */
    left: 20px;
    display: flex;
    align-items: center;
    z-index: 20;
    width: calc(100% - 40px);
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    padding: 8px;
    border-radius: 4px;
}

/* Updated play-pause button - no position:absolute */
.play-pause {
    background-color: rgba(40, 167, 69, 0.8); /* Semi-transparent green */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 10px; /* Add some space between button and debug info */
}

    .play-pause:hover {
        background-color: rgba(33, 136, 56, 0.8); /* Darker green on hover */
    }

/* Updated debug styles */
.debug {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #0f0;
    padding: 5px 0;
    font-family: monospace;
    font-size: 14px;
    border-radius: 5px;
    z-index: 10; /* Still need this to be above the progress bar */
    pointer-events: none; /* Still need this to prevent intercepting mouse events */
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin-top: -20px; /* Pull it up to overlap with the progress bar */
}



.progress-container {
    position: absolute;
    bottom: 40px; /* Position it below the control bar */
    left: 5%; /* Centered slightly */
    width: 90%;
    height: 20px; /* Make it a bit thinner */
    background-color: #444;
    cursor: pointer;
    border-radius: 5px;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Add some depth */
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #28a745;
    border-radius: 5px;
    transition: width 0.1s linear; /* Smooth progress update */
}

/* Make buttons bigger on mobile */
@media (max-width: 800px) {
    .controls button, .controls select {
        padding: 12px 24px; /* Larger touch target */
        font-size: 20px; /* Larger text */
        font-weight: bold;
        box-shadow: 0 2px 8px rgba(0,0,0,0.5); /* Add shadow for visibility */
    }

    .control-bar {
        bottom: 100px; /* Push it even higher on mobile */
        padding: 10px; /* Larger padding for better touch targets */
    }

    .play-pause {
        padding: 10px;
        font-size: 16px;
        margin-right: 15px;
    }

    .debug {
        font-size: 12px; /* Smaller text on mobile */
    }

    .progress-container {
        bottom: 160px; /* Push it even higher on mobile */
    }
}

.prev-video, .next-video {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

    .prev-video:hover, .next-video:hover {
        background: rgba(0, 0, 0, 0.7);
    }
