/* --- Estilos Base y Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: #0d1117;
}

::-webkit-scrollbar-thumb {
    background-color: #2c3a4f;
    border-radius: 8px;
    border: 2px solid #0d1117;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(7, 247, 59);
}

/* CAMBIO DE COLOR */

body {
    background-color: #0d1117;
    font-family: 'Roboto Condensed', sans-serif;
    color: #e0e0e0;
    position: fixed;
    margin: 0;
    padding: 0 !important;
    height: 100%;
    width: 100%;
}

* {
    box-sizing: border-box;
}

li {
    list-style-type: none;
}

/* --- Anuncio Inicial --- */
.msjad {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: fadeInBg 0.4s ease-out;
}

@keyframes fadeInBg {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.msjad>div {
    background-color: #1f2937;
    padding: 2rem;
    max-width: 420px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: center;
    transform: translateY(-20px);
    opacity: 0;
    animation: slideInDialog 0.5s 0.2s ease-out forwards;
}

@keyframes slideInDialog {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.msjad p:first-child {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 17px;
}

.msjad .btn {
    background: rgb(7, 247, 59);
    /* CAMBIO DE COLOR */
    color: #0d1117;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.msjad .btn:hover {
    background-color: #fff;
    transform: scale(1.05);
}

/* --- Contenedor Principal y Fondo --- */
#PlayerDisplay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0d1117;
    z-index: 11;
}

.wpw {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    left: 0;
    background-size: cover !important;
    background-position: center center !important;
}

/* --- Selectores de Idioma --- */
.SelectLangDisp {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 20px 0;
    z-index: 10;
}

.SelectLangDisp li {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    display: inline-block;
    margin: 0 15px;
    opacity: 0.5;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.SelectLangDisp li:hover {
    opacity: 1;
    transform: scale(1.05);
}

.SelectLangDisp .SLD_A {
    opacity: 1;
    border-color: rgb(7, 247, 59);
    /* CAMBIO DE COLOR */
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(7, 247, 59, 0.5);
    /* CAMBIO DE COLOR */
}

.SelectLangDisp li img {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

/* --- Contenedor de Opciones de Servidor --- */
.OptionsLangDisp {
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 10;
    padding: 0 20px;
    top: 120px;
    /* CAMBIO DE POSICIÓN */
    height: calc(100% - 120px);
    /* CAMBIO DE POSICIÓN */
}

.OD {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding-bottom: 40px;
}

.REactiv {
    display: grid;
}

/* --- Diseño de Tarjetas y Animación en Cascada --- */
.ODDIV li {
    display: flex;
    align-items: center;
    background-color: #1f2937;
    padding: 15px;
    position: relative;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInCascade 0.5s ease-out forwards;
}

.ODDIV li:hover {
    transform: translateY(-4px) !important;
    border-color: rgb(7, 247, 59);
    /* CAMBIO DE COLOR */
    background-color: #2c3a4f;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInCascade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ODDIV li:nth-child(1) {
    animation-delay: 0.1s;
}

.ODDIV li:nth-child(2) {
    animation-delay: 0.15s;
}

.ODDIV li:nth-child(3) {
    animation-delay: 0.2s;
}

.ODDIV li:nth-child(4) {
    animation-delay: 0.25s;
}

.ODDIV li:nth-child(5) {
    animation-delay: 0.3s;
}

.ODDIV li:nth-child(6) {
    animation-delay: 0.35s;
}

.ODDIV li:nth-child(7) {
    animation-delay: 0.4s;
}

.ODDIV li:nth-child(8) {
    animation-delay: 0.45s;
}

.ODDIV li img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.ODDIV li span {
    display: block;
    text-transform: uppercase;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ODDIV li p {
    font-size: 14px;
    margin: 0;
    color: #a0aec0;
    line-height: 1.4;
}

/* --- Animación de "Cargando Servidor" --- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#PlayerDisplay.is-loading .loading-overlay {
    opacity: 1;
    pointer-events: auto;
}

.loading-overlay .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgb(7, 247, 59);
    /* CAMBIO DE COLOR */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    color: #fff;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Vistas de Video y Botón de Volver --- */
.DisplayVideo {
    top: -100%;
    background-color: #000;
    opacity: 0;
    transition: top 0s ease .4s, opacity .4s ease;
    position: absolute;
    z-index: 10;
    left: 0;
    width: 100%;
    height: 100%;
}

.DisplayVideoA {
    top: 0 !important;
    opacity: 1 !important;
    z-index: 9999 !important;
    transition: top 0s ease 0s, opacity .4s ease !important;
}

#IFR {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
}

#backToPlayers {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2147483647;
    width: 44px;
    height: 44px;
    background-color: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"%3E%3Cpath d="M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"%3E%3C/path%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;
}

#backToPlayers:hover {
    background-color: rgb(7, 247, 59);
    border-color: #fff;
    transform: scale(1.1);
}

/* CAMBIO DE COLOR */
#backToPlayers img {
    display: none;
}

#backToPlayers.inactive {
    opacity: 0;
    pointer-events: none;
}

#IFR.nopoints {
    pointer-events: none;
}

/* --- Mejoras Responsivas --- */
@media screen and (max-width: 600px) {
    .OptionsLangDisp {
        padding: 0 10px;
        top: 100px;
        /* Devolvemos el espacio en móvil para no desperdiciar pantalla */
        height: calc(100% - 100px);
    }

    .OD {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .SelectLangDisp li {
        width: 50px;
        height: 50px;
    }
}