/* ===================================================================
   MODAL DE ACCESO RESTRINGIDO - ABTV Streaming
   Estilo "vidrio esmerilado": tarjeta translucida sobre manchas de
   color difuminadas, en la identidad magenta -> morado.
   Compartido por detalle_pelicula.php y detalle_serie.php.
   =================================================================== */

.modal-acceso {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(6, 4, 12, 0.72);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    animation: modalAccesoEntra 0.35s ease forwards;
}

.modal-acceso.abierto {
    display: flex;
}

@keyframes modalAccesoEntra {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Manchas de color difuminadas detras de la tarjeta --- */
.modal-acceso::before,
.modal-acceso::after {
    content: '';
    position: absolute;
    width: 46vmin;
    height: 46vmin;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    pointer-events: none;
}

.modal-acceso::before {
    background: #fc018b;
    top: 12%;
    left: 14%;
    animation: modalOrbe1 14s ease-in-out infinite alternate;
}

.modal-acceso::after {
    background: #5225ba;
    bottom: 10%;
    right: 12%;
    animation: modalOrbe2 17s ease-in-out infinite alternate;
}

@keyframes modalOrbe1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(18%, 12%) scale(1.15); }
}

@keyframes modalOrbe2 {
    from { transform: translate(0, 0) scale(1.1); }
    to   { transform: translate(-14%, -10%) scale(0.95); }
}

/* --- La tarjeta de vidrio --- */
.modal-acceso-tarjeta {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    animation: modalAccesoSube 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalAccesoSube {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Boton de cerrar --- */
.modal-acceso-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-acceso-cerrar:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: rotate(90deg);
}

/* --- Icono del candado --- */
.modal-acceso-icono {
    width: 62px;
    height: 62px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(252, 1, 139, 0.22), rgba(82, 37, 186, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.modal-acceso-icono svg {
    stroke: #ff6bc4;
}

/* --- Textos --- */
.modal-acceso-titulo {
    margin: 0 0 0.6rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.modal-acceso-texto {
    margin: 0 0 1.75rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.62);
}

/* --- Botones --- */
.modal-acceso-botones {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.modal-acceso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal-acceso-btn-principal {
    background: linear-gradient(135deg, #fc018b 0%, #5225ba 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(252, 1, 139, 0.28);
}

.modal-acceso-btn-principal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(252, 1, 139, 0.42);
}

/* Secundario discreto: no compite con el principal */
.modal-acceso-btn-secundario {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
}

.modal-acceso-btn-secundario:hover {
    background: rgba(37, 211, 102, 0.14);
    border-color: rgba(37, 211, 102, 0.45);
    color: #fff;
    transform: translateY(-2px);
}

.modal-acceso-btn-secundario svg {
    color: #25D366;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .modal-acceso-tarjeta {
        padding: 2rem 1.4rem 1.6rem;
        border-radius: 18px;
    }

    .modal-acceso-titulo { font-size: 1.3rem; }
    .modal-acceso-texto  { font-size: 0.87rem; }

    .modal-acceso::before,
    .modal-acceso::after {
        width: 60vmin;
        height: 60vmin;
        filter: blur(70px);
    }
}

/* Respetar a quien pide menos animacion */
@media (prefers-reduced-motion: reduce) {
    .modal-acceso,
    .modal-acceso-tarjeta,
    .modal-acceso::before,
    .modal-acceso::after {
        animation: none;
    }
}
