.site-content {
    padding: 0;
}

.episode-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 1. Updated Wrapper - reserves 16:9 space immediately */
.player-wrapper {
    margin-bottom: 20px;
    width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #000; 
    overflow: hidden;
}

/* 2. Force all players (native, plyr, or iframe) to fill the 16:9 wrapper */
#player, 
#iframe-player,
.plyr {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* 3. Ensure native video scales correctly inside Plyr */
.plyr video {
    object-fit: contain; 
}

.server-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.server-button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.server-button:hover {
    background-color: #046492;
}

.server-button.active {
    background-color: #005f8d;
    border: 1px solid #829198;
}

.server-button.active:hover {
    background-color: #005f8d;
}

.episode-navigation {
    margin-top: 40px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.nav-button {
    flex: 1;
    padding: 10px 10px;
    background-color: #141414;
    border: 2px solid #6A6A6A;
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    cursor: pointer;
}

.nav-button:hover:not(.disabled) {
    color: inherit;
}

.nav-button.disabled {
    cursor: not-allowed;
    pointer-events: none;
    background-color: #121414;
    border: 2px solid #393939;
    color: #393939;
}

.episode-dropdown {
    display: flex; 
    position: relative;
    flex: 1;
}

.episode-dropdown::after {
    content: '\25BE';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    pointer-events: none;
    color: #6A6A6A;
}

.select-button {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.episode-dropdown:focus-visible {
    border: 2px solid #6A6A6A;
}

h1, h2 {
    font-size: 1rem;
    color: #fff7ff;
}

@media (max-width: 479px) {
    .site-content, #content {
        padding: 0 !important;
    }

    .episode-content-wrapper {
        padding: 0;
    }

    .server-heading, .server-buttons-wrapper, h1 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-button {
        width: 100%;
    }

    /* Updated styles for button order */
    .nav-button.prev-button {
        order: 1;
    }

    .nav-button.next-button {
        order: 2;
    }

    .episode-dropdown {
        order: 3;
    }

    /* Force the select button to follow the order of its parent */
    .episode-dropdown .select-button {
        order: 1;
    }

}

/* 1. Updated Wrapper - reserves 16:9 space immediately PLYR LOADER FOR MP4*/

.seamless-loader {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #000;
	z-index: 50;
	/* Sits securely above the video element */
	display: flex;
	justify-content: center;
	align-items: center;
	transition: opacity 0.4s ease;
}

.seamless-loader.hidden {
	opacity: 0;
	pointer-events: none;
}

.seamless-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid rgba(255, 255, 255, 0.2);
	border-top: 4px solid #0073aa;
	/* Matches your active button color */
	border-radius: 50%;
	animation: spin-loader 1s linear infinite;
}

@keyframes spin-loader {
	100% {
		transform: rotate(360deg);
	}
}