/* === Diseño general === */
body.reproductor {
    background: #000;
    color: #ddd;
    font-family: Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.reproductor-container {
    margin: 0;
    padding: 0;
    text-align: center;
    transition: opacity 1.2s ease;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #0a0a0a;
}
.reproductor-container::before {
    content: "";
    background: url(https://image.tmdb.org/t/p/original/zD5v1E4joAzFvmAEytt7fM3ivyT.jpg) center / cover no-repeat;
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.2;
    transition: opacity 1.2s ease;
}

/* ===== Encabezado ===== */
.rep-header {
    text-align: center;
    margin-bottom: 15px;
}

.rep-header h2 {
    margin: 0;
    font-size: 28px;
    color: #fff;
}
.rep-header p {
    margin: 3px 0;
    font-size: 16px;
    color: #bbb;
}

/* ===== Tabs Idiomas ===== */
.rep-idiomas {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0 20px;
}

.rep-idioma-btn {
    background: #111;
    border: 1px solid #333;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    opacity: .5;
}

.rep-idioma-btn.activo {
background: #2b2b2b;
    border-color: #4af;
    color: #4af;
    opacity: 1;
}

/* ===== Lista de Servidores ===== */
.servidores-listas {
    margin-top: 20px;
    overflow: auto;
    max-height: 70%;
}
.servidores-grupo.activo {
    display: flex;
    gap: 15px;
    flex-direction: column;
    padding: 25px;
}
.servidores-grupo {
    display: none;
}
.server-item {
    border-radius: 6px;
    padding: 21px;
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
    background: #000000;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 50%, rgba(0, 0, 0, 0.49) 100%);
    box-shadow: 0 0 14px -8px #ffffff8f;
}
.server-item:hover {
    background: #1b1b1b;
}
.server-thumb img {
    width: 55px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    object-fit: contain;
}
.server-info h4 {
    margin: 0;
    color: #fff;
}
.server-info p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #aaa;
}
.badge-hd {
    background: #4af;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}


/* === MOSTRAR IDIOMA ==== */
.rep-idioma-btn.mostrar-nombre {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    padding: 5px;
}
img.imgidioma {
    width: 60px;
    height: 58px;
    border-radius: 50%;
}
img.imgidioma.imgsinidioma {
    height: 18px;
    width: auto;
    border-radius: 2px;
}

	
/* === BOTON VOLVER ATRAS ==== */	
.btn-volver-popup {
    position: absolute;
    top: 12px;
    left: 9px;
    background: #333;
    color: #fff;
    border: none;
    font-size: 25px;
    cursor: pointer;
    border-radius: 13%;
    padding: 6px 10px;
    z-index: 1;
    width: 50px; /* tamaño inicial */
    height: 50px;
    box-shadow: 0 0 13px 5px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* el texto inicia oculto dentro */
    transition: all 0.6s ease; /* transición suave para el ancho */
}

/* cuando haces hover, el botón se expande */
.btn-volver-popup:hover {
    background: #555;
    width: 180px; /* 🔸 se agranda para mostrar el texto */
    border-radius: 7px; /* suaviza un poco la forma al expandirse */
}

/* icono dentro */
.btn-volver-popup i {
    flex-shrink: 0;
    transition: transform 0.6s ease;
    left: 12px;
    position: absolute;
}

/* texto que aparece */
.btn-volver-popup .hover-text {
    margin-left: 10px;
    color: #fff;
    font-size: 16px;
    opacity: 0;
    white-space: nowrap;
    transform: translateX(-15px);
    transition: all 0.6s ease;
}

/* al hacer hover, el texto se desliza lentamente hacia dentro */
.btn-volver-popup:hover .hover-text {
    opacity: 1;
    transform: translateX(0);
}

.btn-volver {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 18px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}
.btn-volver:hover {
    background: #555;
}
	
.btn-volver-popup {
    opacity: 1; /* visible inicialmente */
}
	
/* === REPRODUCTOR-VIDEO-PLAY ==== */	
.rep-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.rep-popup.activo {
    display: flex;
}

.rep-popup-content {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 50px #000;
}

.rep-popup-player {
    width: 100%;
    height: 100%;
}
video#rep-video {
    position: absolute;
}
.plyr--video {
    overflow: hidden;
    height: 100%;
}
p.nohayserver {
    background: #00000066;
    padding: 30px;
    display: inline-block;
    border-radius: 9px;
}
.sin-servidores {
    overflow: auto;
    height: 80%;
}
div#player-container {
    width: 100%;
    height: 100%;
}
	
	
	
.rep-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: -webkit-fill-available;
    height: 110px;
    gap: 10px;
    padding: 10px;
    background: #00000082;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
	backdrop-filter: blur(5px);
}

.rep-nav-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    max-width: 200px;
    padding: 20px 50px;
}
.rep-nav-item.disabled {
    opacity: .35;
    pointer-events: none;
}

.rep-nav-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(.55);
    border: solid 1px #fff;
    border-radius: 14px;
}

.rep-nav-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}

.rep-nav-item.center .rep-nav-overlay i {
    font-size: 26px;
}
.rep-nav-overlay i {
    font-size: 25px;
}
	
	
/* CONTENEDOR GENERAL */
.rep-bottom-wrapper{
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 999;
    pointer-events: none;
}

/* BOTÓN TOGGLE */
.rep-toggle-nav{
    pointer-events: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 18px;
    transition: transform .4s ease, opacity .3s ease;
}
.rep-bottom-wrapper.activo button#rep-toggle-nav {
    bottom: 50%;
    margin-bottom: 123px;
}

/* BARRA */
.rep-bottom-nav{
    pointer-events: auto;
    transform: translateY(100%);
    transition: transform .45s cubic-bezier(.4,0,.2,1);
}

/* ACTIVA */
.rep-bottom-wrapper.activo .rep-bottom-nav{
    transform: translateY(0);
}

/* ROTAR ICONO */
.rep-bottom-wrapper.activo .rep-toggle-nav i{
    transform: rotate(180deg);
}

/* OPCIONAL: sombra elegante */
.rep-bottom-nav{
    box-shadow: 0 -10px 30px rgba(0,0,0,.6);
}
	
	
	
/* BOTÓN FLOTANTE */
.rep-popup-toggle{
    position:absolute;
    right:15px;
    bottom:45px;
    z-index:10;
    background:rgba(0,0,0,.7);
    color:#fff;
    border:none;
    border-radius:50%;
    width:46px;
    height:46px;
    font-size:18px;
    cursor:pointer;
}

/* PANEL */
.rep-popup-panel{
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
    height:60%;
    background:#0e0e0e;
    transform:translateY(100%);
    transition:transform .45s cubic-bezier(.4,0,.2,1);
    z-index: 9998;;
    display:flex;
    flex-direction:column;
}

.rep-popup-panel.activo{
    transform:translateY(0);
}

/* SERVIDORES */
.rep-panel-servers{
    flex:1;
    padding:15px;
    overflow:hidden;
}

.rep-panel-servers h4{
    margin:0 0 10px;
    color:#fff;
}

.rep-panel-servers-list{
    overflow-y:auto;
    max-height:100%;
}

.rep-panel-servers-list .server-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px;
    cursor:pointer;
    border-bottom:1px solid rgba(255,255,255,.05);
}

/* NAV */
.rep-panel-nav{
    display:flex;
    justify-content:space-around;
    padding:12px 0;
    background:#111;
    border-top:1px solid rgba(255,255,255,.1);
}

.rep-panel-nav a{
    color:#fff;
    font-size:22px;
}

.rep-panel-nav a.disabled{
    opacity:.3;
    pointer-events:none;
}
/* Cuando se ocultan los servidores del popup */
.sin-servidores-popup .rep-panel-servers {
    display: none !important;
}

/* La barra de navegación ocupa todo */
.sin-servidores-popup .rep-panel-nav {
    width: 100%;
    padding: 39px 0;
    justify-content: space-around;
}
.rep-popup-panel.sin-servidores-popup {
    height: auto;
}
#rep-panel-overlay{
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 9997;
    display: none;
}

/* cuando el panel está abierto */
.rep-popup-panel.activo ~ #rep-panel-overlay,
#rep-panel-overlay.activo{
    display:block;
}
