/* Video Solution Modal Styles */

/* Modal Overlay */
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.video-modal-container {
    background-color: #1a1a1a;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Modal Header */
.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
}

.video-modal-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.video-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.video-modal-close:hover {
    color: #fff;
}

/* Video Container */
.video-modal-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
}

#videoPlayerContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Custom Controls Container */
.video-modal-controls {
    padding: 12px 16px;
    background-color: #2a2a2a;
}

/* Custom Playhead/Progress Bar */
.video-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-progress-bar {
    flex: 1;
    height: 6px;
    background-color: #444;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.video-progress-filled {
    height: 100%;
    background-color: #4a9eff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-progress-bar:hover .video-progress-filled {
    background-color: #6ab0ff;
}

/* Time Display */
.video-time-display {
    color: #ccc;
    font-size: 13px;
    font-family: monospace;
    min-width: 90px;
    text-align: right;
}

/* Play/Pause Button */
.video-play-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.video-play-btn:hover {
    color: #4a9eff;
}

/* Loading State - Initial load text */
.video-modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    z-index: 50;
    pointer-events: none;
}

.video-modal-loading.hidden {
    display: none !important;
}

/* Video Solution Button (for problem.html) */
.btn-video-solution {
    background-color: #4a9eff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    display: none; /* Hidden by default, shown after answer submitted */
}

.btn-video-solution:hover {
    background-color: #3a8eef;
}

.btn-video-solution.visible {
    display: inline-block;
}
