body {
    background: #181920;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.episodios-seccion-movil {
    display: none !important;
}

.episodios-seccion-movil .episodios-grid {
    display: none !important;
}

.sidebar-menu {
    display: none;
}

.menu-left {
    display: none;
}

section h1 {
    font-size: 2.2rem !important;
    margin: 0 0 1rem 0 !important;
    font-weight: bold;
    line-height: 1.2;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 40px;
    background: #23232b;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    margin-top: 20px;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
}

.logo-btn {
    padding: 10px 30px;
    font-size: 18px;
    border: none;
    background: none;
    color: #fff;
    font-weight: bold;
    font-style: italic;
    border: 2px solid #00aaff;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, border 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-btn:hover {
    color: #00aaff;
    border-color: #00aaff;
    box-shadow: 0 0 10px #00aaff;
}

.logo-img-btn {
    height: 32px;
    width: 32px;
    object-fit: contain;
    filter: brightness(0.8);
}

.logo-titulo {
    text-decoration: underline;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
}

.directorio-label {
    color: #00aaff;
    font-size: 25px;
    font-weight: 700;
    padding: 0 10px;
    margin-right: 2px;
    letter-spacing: 0.5px;
    background: none;
    border-radius: 0;
    text-decoration: none !important;
    transition: color 0.2s;
    display: inline-block;
}

.directorio-label:hover,
.directorio-label:focus {
    color: #7a7a7a;
    text-decoration: none !important;
}

.search-container {
    position: relative;
}

.search-bar {
    padding: 8px 15px;
    border: 2px solid #00aaff;
    border-radius: 20px;
    width: 250px;
    font-size: 14px;
    background: #23232b;
    color: #fff;
    transition: all 0.3s ease;
    padding-right: 35px;
}

.search-bar:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 10px #00aaff;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    background: #23232b;
    border: 2px solid #00aaff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,170,255,0.3);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #00aaff33;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #fff;
}

.search-result-item:hover {
    background-color: #00aaff22;
}

.search-result-item:last-child {
    border-bottom: none;
}

.reproductor-contenedor {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 50px auto 0 auto;
    padding: 24px;
    background: #23232b;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    position: relative;
    box-sizing: border-box;
}

.reproductor-video {
    flex: 2.5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.reproductor-video video,
.reproductor-video iframe {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 2px 16px #0008;
    aspect-ratio: 16/9;
    display: block;
}

/* Estilos para pantalla completa */
.reproductor-video video:fullscreen,
.reproductor-video iframe:fullscreen {
    border-radius: 0;
    box-shadow: none;
}

/* Ocultar barra de desplazamiento en pantalla completa */
.reproductor-video video:fullscreen::-webkit-scrollbar,
.reproductor-video iframe:fullscreen::-webkit-scrollbar {
    display: none;
}

/* Para Firefox */
.reproductor-video video:fullscreen {
    scrollbar-width: none;
}

/* Para IE y Edge */
.reproductor-video video:fullscreen {
    -ms-overflow-style: none;
}

/* Asegurar que el iframe en pantalla completa ocupe todo el espacio */
.reproductor-video iframe:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
}

/* Reglas específicas para dispositivos móviles */
@media screen and (max-width: 768px) {
    .reproductor-video iframe {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
    }

    /* Ocultar scrollbar en móviles */
    .reproductor-video iframe::-webkit-scrollbar {
        display: none !important;
    }

    /* Para Firefox en móviles */
    .reproductor-video iframe {
        scrollbar-width: none !important;
    }

    /* Para IE y Edge en móviles */
    .reproductor-video iframe {
        -ms-overflow-style: none !important;
    }

    /* Ajustes específicos para pantalla completa en móviles */
    .reproductor-video iframe:fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        overflow: hidden !important;
    }

    /* Ocultar elementos del body cuando el iframe está en pantalla completa */
    body:has(.reproductor-video iframe:fullscreen) {
        overflow: hidden !important;
    }

    /* Reglas adicionales para pantalla completa en móviles */
    :fullscreen {
        background: black !important;
    }

    :fullscreen::-webkit-scrollbar {
        display: none !important;
    }

    /* Ocultar scrollbar en todos los elementos cuando está en pantalla completa */
    :fullscreen * {
        overflow: hidden !important;
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    /* Asegurar que el iframe ocupe todo el espacio en pantalla completa */
    .reproductor-video iframe:fullscreen {
        transform: none !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        width: 100vw !important;
        height: 100vh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        overflow: hidden !important;
        z-index: 2147483647 !important;
    }
}

/* Reglas globales para pantalla completa */
:fullscreen {
    background: black !important;
    overflow: hidden !important;
}

:fullscreen::-webkit-scrollbar {
    display: none !important;
}

:fullscreen * {
    overflow: hidden !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Ocultar barra de progreso en móviles */
@media screen and (max-width: 768px) {
    /* Contenedor del reproductor en pantalla completa */
    body.fullscreen-mode .reproductor-video {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 2147483647 !important;
        background: black !important;
        overflow: hidden !important;
    }

    /* Iframe en pantalla completa */
    body.fullscreen-mode .reproductor-video iframe {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        z-index: 2147483647 !important;
        background: black !important;
        overflow: hidden !important;
        transform: translateY(0) !important;
        -webkit-transform: translateY(0) !important;
    }

    /* Ocultar elementos en modo pantalla completa */
    body.fullscreen-mode > *:not(.reproductor-video) {
        display: none !important;
    }

    /* Ocultar barra de progreso en modo pantalla completa */
    body.fullscreen-mode::-webkit-scrollbar {
        display: none !important;
    }

    body.fullscreen-mode *::-webkit-scrollbar {
        display: none !important;
    }

    body.fullscreen-mode {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: black !important;
    }

    /* Ajustes específicos para Chrome en Android */
    @supports (-webkit-touch-callout: none) {
        body.fullscreen-mode .reproductor-video iframe {
            transform: translateY(0) !important;
            -webkit-transform: translateY(0) !important;
        }
    }

    @supports not (-webkit-touch-callout: none) {
        body.fullscreen-mode .reproductor-video iframe {
            transform: translateY(0) !important;
            -webkit-transform: translateY(0) !important;
        }
    }
}

.reproductor-sidebar  {
    flex: 1;
    background: #20212a;
    border-radius: 12px;
    padding: 24px 16px;
    min-width: 180px;
    max-width: 265px;
    display: absolute;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 12px #0004;
}

.sidebar-titulo {
    font-size: 1.1rem;
    color: #bdbdbd;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}

.sidebar-episodio-actual {
    font-size: 1.3rem;
    color: #00aaff;
    font-weight: bold;
    margin-bottom: 18px;
    text-align: center;
}

.sidebar-episodios-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.episodio-btn {
    width: 40px;
    height: 40px;
    align-items: center;
    background: #232b4a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    box-sizing: border-box;
}
.episodio-btn.activo,
.episodio-btn:hover {
    background: #00aaff;
    color: #fff;
}

.info-episodio {
    max-width: 1200px;
    margin: 24px auto 0 auto;
    background: linear-gradient(0deg, #23232b 50%, #00aaff22 80%);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.tags {
    display: inline-block;
    background: #00aaff;
    color: #fff;
    border-radius: 6px;
    padding: 2px 10px;
    margin-right: 8px;
    font-size: 0.95rem;
    margin-top: 8px;
}

.barra-logo-contenedor {
    max-width: 1300px;
    margin: 40px auto 0 auto;
    padding: 0 24px;
}

.barra-logo {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #23232b;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 6px 18px 6px 10px;
    z-index: 10;
    min-width: 80px;
    height: 38px;
}

.logo-nombre-contenedor {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 500;
    font-family: 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.7px;
}

.logo-img {
    height: 45px;
    width: 55px;
    margin-right: 0.1px;
    object-fit: contain;
    filter: brightness(0.5);
    transition: filter 0.6s ease;
    display: block;
}

.logo-enlace {
    margin-left: 2px;
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    font-weight: 600;
}

.logo-enlace:hover {
    color: #00aaff;
}

.reproductor-video {
    width: 100%;
    height: 495px; /* O el alto que prefieras */
    border: 2px solid #00aaff;
    box-shadow: 0 0 20px #00aaff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reproductor-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.busqueda-superior {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    position: relative;
    margin-top: 27px;
    margin-bottom: 0;
    z-index: 20;
}

.busqueda-form {
    margin: 0;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: auto;
}

.busqueda-input {
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid #00aaff;
    outline: none;
    font-size: 1rem;
    background: #181920;
    color: #fff;
    transition: border 0.2s;
    margin-left: 18px;
}
.busqueda-input:focus {
    box-shadow: 0 0 10px #00aaff;
}

.disqus-contenedor {
    max-width: 1250px;
    margin: 32px auto 0 auto;
    background: #23232b;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    width: 100%;
    box-sizing: border-box;
}

.reproductor-principal {
    display: flex;
    flex-direction: column;
    flex: 2.5;
    width: 100%;
}

.barra-terminos {
    display: flex;
    justify-content: flex-start;
    background: #23232b;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    color: #fff;
    font-size: 1.05rem;
    max-width: 1300px;
    min-width: auto;
    margin: 15px auto 15px auto;
}

.btn-terminos {
    background: #00aaff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 5px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px #00aaff44;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-decoration: none;
    position: static;
}

.btn-privacidad {
    background: #00aaff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 5px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px #00aaff44;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-decoration: none;
    position: static;
    margin: auto;
    margin-right: 10px;
}

.btn-terminos:hover,
.btn-privacidad:hover {
    background: #008fcc;
    transform: scale(1.05);
}

.reproductor-opciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 0px auto 0 auto;
    max-width: 1200px;
    background: transparent;
    border-radius: 10px;
    padding: 0 0 20px;
}


.opcion-btn {
    background: #232b4a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.opcion-btn.activo,
.opcion-btn:hover {
    background: #00aaff;
    color: #fff;
}

.texto-opciones {
    margin-left: 25px;
    margin-top: 3.5px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Sinopsis bonita */
#sinopsis-episodio {
    color: #eaf6ff;
    font-size: 1.13rem;
    line-height: 1.6;
    padding: 18px 22px;
    margin: 18px 0 10px 0;
    background: none;
    box-shadow: none;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background 0.3s;
    min-height: 60px;
    border: none;
}

#generos-anime {
    margin-top: 10px;
    margin-left: 20px;
    font-size: 1.05rem;
    font-weight: 500;
}
#generos-anime .genero-link {
    display: inline-block;
    background: none;
    color: #00aaff;
    border: 1px solid #00aaff;
    border-radius: 14px;
    padding: 4px 14px;
    margin: 0 5px 7px 0;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border 0.15s;
    text-decoration: none;
    box-shadow: none;
}
#generos-anime .genero-link:hover {
    background: #00aaff;
    color: #fff;
    border-color: #00aaff;
    text-decoration: none;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Firefox */
.episodios-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(40px, 1fr));
    gap: 5px;
    max-height: 310px; /* 7 filas de 40px + 6 gaps de 5px */
    overflow-y: auto;
    padding-right: 30px;
    position: relative;
    scrollbar-width: thin; /* Estilo del scrollbar en Firefox */
    scrollbar-color: #00aaff #23232b; /* Color del thumb y track */
    animation: fadeInUp 0.5s ease-in-out; /* Animación de entrada */
    margin-top: 0px;
    padding-left: 15px; /* Empuja el contenido a la derecha */
    width: calc(100% - -10px); /* Reduce el ancho para compensar el padding */
    box-sizing: border-box; /* Asegura que el padding no aumente el ancho total */
}

/* Indicador visual de scroll en episodios-grid */
.episodios-grid::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 36px;
    pointer-events: none;
    z-index: 2;
}

/* PC Specific styles */
#selectorBloquesPC {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
    margin-top: 10px;
    gap: 10px;
}

#bloqueDropdownPC {
    background: #23232b;
    color: #00aaff;
    border: 1.5px solid #00aaff;
    border-radius: 6px;
    padding: 5px 12px;
    font-weight: normal;
    font-size: 18px;
    margin-right: 4px;
    transition: background 0.2s, color 0.2s, border 0.2s;
    box-shadow: 0 2px 8px #00aaff22;
    outline: none;
    cursor: pointer;
}

#ordenarBtnPC {
    background: #23232b;
    color: #00aaff;
    border: 1.5px solid #00aaff;
    border-radius: 6px;
    padding: 5px 12px;
    font-weight: normal;
    font-size: 18px;
    transition: background 0.2s, color 0.2s, border 0.2s;
    box-shadow: 0 2px 8px #00aaff22;
    outline: none;
    cursor: pointer;
}

/* Hide Mobile specific elements for PC */
#selectorBloques, /* Mobile dropdown container */
#episodioActualMobile, /* Mobile current episode display */
.episodios-seccion-movil { /* Overall mobile section */
    display: none !important;
}

.selector-bloques {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

#selectorBloques select,
#selectorBloques button {
    background: #23232b;
    color: #00aaff;
    border: 1.5px solid #00aaff;
    border-radius: 6px;
    padding: 5px 12px;
    font-weight: normal;
    font-size: 18px;
    margin-right: 4px;
    transition: background 0.2s, color 0.2s, border 0.2s;
    box-shadow: 0 2px 8px #00aaff22;
    outline: none;
    cursor: pointer;
}

#selectorBloques select:focus,
#selectorBloques button:focus {
    border-color: #00aaff;
    box-shadow: 0 0 10px #00aaff99;
}

#selectorBloques button:active {
    background: #00aaff;
    color: #252525;
}

/* Quitar flechas en Chrome, Safari, Edge, Opera */
#popupBuscarCap input[type="number"]::-webkit-inner-spin-button,
#popupBuscarCap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quitar flechas en Firefox */
#popupBuscarCap input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* #selectorBloques {
    display: none;
} */

/* Estilos para Autenticación */
.auth-container {
    display: flex;
    align-items: center;
    margin-left: -2px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
    width: 40px;
    height: 40px;
}

.auth-btn .google-icon {
    width: 28px;
    height: 28px;
    margin-right: 0;
    filter: blur(100%);
    transition: filter 0.3s ease;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.4);
    transform: translateY(-1px);
}

.auth-btn:hover .google-icon {
    filter: none;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #00aaff;
    object-fit: cover;
}

.user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    display: none;
    position: absolute;
    top: 115%;
    right: 0;
    background: #2c2c34;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid #00aaff88;
    animation: fadeInScale 0.2s ease-out;
}

.user-menu.show {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 12px 16px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #00aaff44;
    color: #fff;
}

.logout-btn {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    color: #e0e0e0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.logout-btn:hover {
    background: #ff4444;
    color: white;
    transform: none;
}

/* Modal de Autenticación */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background: #23232b;
    margin: 10% auto;
    padding: 20px 30px;
    border: 1px solid #00aaff;
    border-radius: 15px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 5px 25px rgba(0,170,255,0.2);
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #00aaff33;
}

.auth-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.auth-modal-close {
    background: none;
    border: none;
    color: #00aaff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

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

.auth-modal-body {
    padding: 25px;
    text-align: center;
}

.auth-modal-body p {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.auth-divider {
    position: relative;
    margin: 25px 0;
    text-align: center;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #00aaff33;
}

.auth-divider span {
    background: #23232b;
    padding: 0 15px;
    color: #00aaff;
    font-size: 14px;
    font-weight: 500;
}

.auth-guest-btn {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #00aaff;
    border: 2px solid #00aaff;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-guest-btn:hover {
    background: #00aaff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive para autenticación */
@media screen and (max-width: 768px) {
    .auth-container {
        margin-left: 10px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .user-name {
        max-width: 80px;
        font-size: 12px;
    }
    
    .auth-modal-content {
        margin: 10% auto;
        width: 66%;
        height: 58%;
    }
    
    .auth-modal-header {
        padding: 15px 20px;
    }
    
    .auth-modal-header h2 {
        font-size: 20px;
    }
    
    .auth-modal-body {
        padding: 20px;
    }
}

/* Perfil de usuario en el menú lateral */
.sidebar-auth-section {
    width: 85%;
    margin: 15px auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.sidebar-user-info:hover {
    background-color: #00aaff22;
}

.sidebar-user-info.open {
    border-color: #00aaff88;
    background-color: #00aaff11;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid #00aaff;
}

#sidebar-user-name {
    flex-grow: 1;
    color: #00aaff;
    font-size: 1.05rem;
    font-weight: 600;
}

.sidebar-arrow {
    font-size: 0.8rem;
    color: #00aaff;
    transition: transform 0.3s;
}

.sidebar-user-info.open .sidebar-arrow {
    transform: rotate(180deg);
}

#sidebar-user-menu {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    margin-top: 5px;
    border-left: 2px solid #00aaff44;
    margin-left: 30px;
    padding-top: 5px;
    padding-bottom: 5px;
}

#sidebar-user-menu.show {
    display: flex;
}

.sidebar-user-menu-item {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.sidebar-user-menu-item:hover {
    color: #fff;
    background-color: #00aaff22;
}

.sidebar-directorio {
    display: block;
    margin: 0 auto 15px auto;
}

@media screen and (max-width: 768px) {
    header {
        position: fixed !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 2000 !important;
        width: 90% !important;
        margin-top: 0 !important;
        padding: 12px 20px !important;
        border-radius: 8px !important;
        max-width: 100vw !important;
      }
    .barra-terminos {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        z-index: 999 !important;
        background: #23232b !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 10px 0 8px 0 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 16px !important;
        border-top: 1px solid #222 !important;
      }
    body {
        padding-top: 64px;
        padding-bottom: 56px;
    }
    
    /* Asegurar que el selector de episodios se muestre en mobile */
    .sidebar-episodios-selector {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
        margin: 10px 0 !important;
        padding: 0 10px !important;
    }
    
    .episodio-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
        border-radius: 5px !important;
    }
    
    /* Hacer que el sidebar sea independiente en mobile */
    .reproductor-sidebar {
        position: relative !important;
        width: 90% !important;
        max-width: 1200px !important;
        margin: 20px auto 0 auto !important;
        background: #20212a !important;
        border-radius: 12px !important;
        padding: 20px 16px !important;
        box-shadow: 0 2px 12px #0004 !important;
        order: unset !important;
        flex: none !important;
    }
    
    /* Estilos cuando el sidebar está fuera del contenedor */
    .reproductor-sidebar.mobile-independiente {
        position: relative !important;
        width: 90% !important;
        max-width: 1200px !important;
        margin: 20px auto 0 auto !important;
        background: #20212a !important;
        border-radius: 12px !important;
        padding: 20px 16px !important;
        box-shadow: 0 2px 12px #0004 !important;
        z-index: 100 !important;
    }
}

@media screen and (max-width: 768px) {
    .episodios-grid {
        grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)) !important;
        gap: 0.7rem !important;
        max-height: 230px !important;
        padding-right: 8px !important;
    }     
}
.comentarios-advanced   {
    max-width: 1200px;
    margin: 24px auto 0 auto;
    height: auto;
} 

@media screen and (max-width: 768px) {
    .comentarios-advanced {
        max-width: 98vw !important;
        margin: 18px auto 0 auto !important;
        padding: 10px 6px !important;
        box-sizing: border-box !important;
        font-size: 0.95rem !important; /* Ajusta según prefieras */
    }
    .comentarios-advanced * {
        font-size: 0.8rem !important; /* Aplica a todos los hijos */
    }
} 

#btn-spoiler {
    background: #232b4a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 8px;
    transition: background 0.2s, color 0.2s;
}
#btn-spoiler:hover {
    background: #00aaff;
    color: #fff;
}
.ql-toolbar .ql-spoiler::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg fill="white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M320 400c-79.5 0-144-64.5-144-144s64.5-144 144-144 144 64.5 144 144-64.5 144-144 144zm0-256c-61.9 0-112 50.1-112 112s50.1 112 112 112 112-50.1 112-112-50.1-112-112-112zm0 192c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"/></svg>') no-repeat center;
    background-size: 16px 16px;
}
/* Spoiler oculto */
.spoiler {
  background: #222;
  color: transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 0.3em;
  user-select: none;
}
.spoiler.revealed {
  color: inherit;
  background: #e2e2e2;
}

/* Mejoras para dispositivos móviles */
@media (max-width: 426px) {
    .editor-header, .comentario-header {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        margin-bottom: px !important;
    }
    
}
@media (max-width: 600px) {
  .spoiler {
    font-size: 1em;
    padding: 0 0.2em;
  }
} 

/* Mejora visual de comentarios y editor con !important */
.comentario-editor, .comentario-item {
    background: #13131696 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 12px #0002 !important;
    padding: 18px 20px !important;
    margin-bottom: 7px !important;
    margin-top: 20px !important;
    border: 1.5px solid #222 !important;
}

.editor-header, .comentario-header {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 33px !important;
}

.editor-avatar, .comentario-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #00aaff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px #0003 !important;
}

.editor-avatar img, .comentario-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.editor-username, .comentario-autor {
    font-weight: bold !important;
    color: #00aaff !important;
    font-size: 1.1em !important;
}

.editor-status {
    color: #aaa !important;
    font-size: 0.95em !important;
}

.btn-send {
    background: #00aaff !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 22px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    margin-top: 10px !important;
}

.btn-send:hover {
    background: #0088cc !important;
}

.comentario-content {
    margin-top: -29px !important;
    color: #e0e0e0 !important;
    font-size: 1.05em !important;
    margin-left: 50px !important;
}

.comentario-fecha {
    color: #888 !important;
    font-size: 0.92em !important;
    margin-left: 8px !important;
}

.comentario-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 8px !important;
}

.comentario-actions .action-btn {
    background: transparent !important;
    border: none !important;
    color: #888 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 0.9em !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.comentario-actions .action-btn:hover {
    background: #222 !important;
    color: #00aaff !important;
} 

/* Animación para la aparición de comentarios avanzados */
.fade-in-comentarios {
    animation: fadeInComentarios 1.1s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes fadeInComentarios {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
} 

/* Estilo para el texto 'En respuesta a Usuario' en respuestas anidadas */
.en-respuesta-a {
    color: #00aaff;
    font-size: 0.97em;
    font-weight: 500;
    background: rgba(0,170,255,0.08);
    border-radius: 6px;
    padding: 2px 8px;
    margin-bottom: 10px;
    display: inline-block;
    letter-spacing: 0.01em;
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.footer-animekay-pro {
  width: 78%;
  padding: 24px 0 12px 0;
  background: none;
  color: #b9b4d9;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1em;
  box-sizing: border-box;
}

.footer-main-row, .footer-bottom-row {
  max-width: 900px;
  margin: 0 auto 8px auto;
  width: 100%;
}

.footer-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: #23232b;
}

.footer-logo-text {
  font-size: 1.3em;
  font-weight: bold;
  letter-spacing: 1px;
  color: #b9b4d9;
}

.footer-right {
  display: flex;
  gap: 22px;
}

.footer-link {
  color: #b9b4d9;
  text-decoration: none;
  font-size: 1em;
  border-radius: 16px;
  padding: 4px 12px;
  border: 1px solid transparent;
  transition: color 0.2s, border 0.2s, background 0.2s;
}

.footer-link:hover {
  color: #008fcc;
  border: 1px solid #008fcc;
  background: #181a20;
}

.footer-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.97em;
  color: #b9b4d9;
  margin-bottom: 0;
}

.footer-copyright {
  font-size: 0.97em;
  color: #b9b4d9;
}

.footer-disclaimer {
  font-size: 0.91em;
  color: #a6a1c2;
  margin-top: 2px;
  line-height: 1.3;
  max-width: 340px;
}

/* Responsive Footer */
@media (max-width: 700px) {
  .footer-logo-text-group { 
    align-items: flex-start; 
  }
  .footer-disclaimer { 
    max-width: 99vw; 
  }
}

@media (max-width: 600px) {
  .footer-animekay-pro {
    max-width: 99vw;
    margin: 18px auto 0 auto;
    padding: 0 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .footer-main-row,
  .footer-bottom-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 99vw;
    margin: 0 auto;
    gap: 4px;
    display: flex;
    justify-content: center;
  }
  
  .footer-left,
  .footer-right {
    justify-content: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-logo-img {
    margin: 0 auto 4px auto;
    display: block;
  }
  
  .footer-right {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    display: flex !important;
    text-align: center;
  }
  
  .footer-link {
    margin: 0 !important;
    padding: 0 4px !important;
    display: inline-block !important;
  }
}

.search-close {
    display: none;
}

.sidebar-search-container {
    position: relative !important;
    width: 85%;
    margin: 0 auto 20px;
    z-index: 10001;
}

.comentarios-enhanced {
    max-width: 1200px;
    margin: 24px auto 0 auto;
      margin-top: 24px;
    height: auto;
  }