/* Base styles */
body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(0, 0, 40);
    overflow: hidden;
}

.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-js {
    width: 100%;
    height: 100%;
}

.vjs-fullscreen {
    padding-top: 0px;
}

/* Subtitle menu styles */
.vjs-subs-caps-button .vjs-menu {
    width: max-content !important;
    min-width: 200px;
    left: 50% !important;
    transform: translateX(-50%);
}

.vjs-subs-caps-button .vjs-menu .vjs-menu-content {
    max-height: 250px !important;
    overflow-y: scroll !important;
    overflow-x: hidden;
    background-color: rgba(43, 51, 63, 0.95);
    border-radius: 4px;
    padding: 8px 0;
    margin-bottom: 1em;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(43, 51, 63, 0.95);
}

/* Webkit scrollbar styles */
.vjs-subs-caps-button .vjs-menu .vjs-menu-content::-webkit-scrollbar {
    width: 6px;
}

.vjs-subs-caps-button .vjs-menu .vjs-menu-content::-webkit-scrollbar-track {
    background: rgba(43, 51, 63, 0.95);
}

.vjs-subs-caps-button .vjs-menu .vjs-menu-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Custom endscreen overlay */
.vjs-custom-endscreen-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 40, 0.85);
}

.vjs-endscreen-overlay-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.vjs-endscreen-overlay-buttons .vjs-control {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vjs-endscreen-overlay-buttons .vjs-control:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Skip buttons */
.vjs-skip-backward,
.vjs-skip-forward {
    cursor: pointer;
}

.vjs-skip-backward .vjs-icon-placeholder:before {
    content: "⟲";
    font-size: 1.8em;
    line-height: 1.67;
}

.vjs-skip-forward .vjs-icon-placeholder:before {
    content: "⟳";
    font-size: 1.8em;
    line-height: 1.67;
}

/* Big play button and progress bar color */
.video-js .vjs-big-play-button {
    background-color: #00ffb9;
    border-color: #00ffb9;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus {
    background-color: #00e6a7;
    border-color: #00e6a7;
}

/* Black play icon */
.video-js .vjs-big-play-button .vjs-icon-placeholder:before {
    color: #000000;
}

/* Progress bar color */
.video-js .vjs-play-progress {
    background-color: #00ffb9;
}

.video-js .vjs-play-progress:before {
    color: #00ffb9;
}

.vjs-subs-caps-button .vjs-menu-item {
    text-align: left;
    padding: 8px 15px;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Position menu above control bar */
.vjs-subs-caps-button .vjs-menu {
    bottom: 3em;
}

/* Error message styles */
.c2-error-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 40, 0.9);
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.c2-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff5252;
}

.c2-processing-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffd740;
}

.c2-error-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.c2-error-message {
    font-size: 16px;
    margin-bottom: 20px;
    max-width: 600px;
}

.c2-error-details {
    font-size: 14px;
    color: #aaaaaa;
    margin-bottom: 20px;
}

.c2-error-button {
    background-color: #00ffb9;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.c2-error-button:hover {
    background-color: #00e6a7;
}

.c2-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00ffb9;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

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