html, body {
    touch-action: pan-x pan-y;
    -ms-touch-action: pan-x pan-y;
}

.banners-comp-izq,
.banners-comp-der {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    max-width: 100%;
    vertical-align: middle;
    border: 0;
}

.lateral-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #0f1117;
    border-radius: 15px;
    padding-bottom: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    width: 100%;
    height: 350px;
    max-width: 179px;
}

.lateral-item img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.lateral-item .text-laterales {
    margin: 5px 0;
    font-size: 14px;
    color: #0dff00;
    text-transform: uppercase;
    position: absolute;
    top: 230px;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: -1px -1px 0 #072f16, 1px -1px 0 #072f16, -1px 1px 0 #072f16, 1px 1px 0 #072f16, -2px -2px 2px #072f16, 2px -2px 2px #072f16, -2px 2px 2px #072f16, 2px 2px 2px #072f16;
    white-space: nowrap;
}

/* Contenedor para la informaciÃ³n en la parte inferior */
.lateral-info-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.lateral-item .accepts-card {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    align-items: center;
}

.lateral-item .accepts-card::before {
    content: '';
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 85.6 53.98'%3E%3C!-- Fondo azul premium --%3E%3Cdefs%3E%3ClinearGradient id='blueGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%232E86AB;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23A23B72;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='85.6' height='53.98' rx='4' ry='4' fill='url(%23blueGrad)' stroke='%23333' stroke-width='0.5'/%3E%3C!-- Chip EMV --%3E%3Crect x='10' y='20' width='12' height='9' rx='1' ry='1' fill='%23FFD700' stroke='%23E6C200' stroke-width='0.3'/%3E%3Cline x1='12' y1='22' x2='12' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='14' y1='22' x2='14' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='16' y1='22' x2='16' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='18' y1='22' x2='18' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='20' y1='22' x2='20' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3C!-- Logo Mastercard --%3E%3Ccircle cx='60' cy='27' r='8' fill='%23EB001B'/%3E%3Ccircle cx='72' cy='27' r='8' fill='%23FF5F00'/%3E%3Cpath d='M66 19.5c-1.8 1.8-2.9 4.3-2.9 7.5s1.1 5.7 2.9 7.5c1.8-1.8 2.9-4.3 2.9-7.5s-1.1-5.7-2.9-7.5z' fill='%23FF5F00'/%3E%3Ctext x='66' y='41' font-family='Arial, sans-serif' font-size='3' font-weight='bold' text-anchor='middle' fill='white'%3EMASTERCARD%3C/text%3E%3Ctext x='10' y='15' font-family='Courier, monospace' font-size='4' fill='%23E0E0E0'%3Eâ€¢â€¢â€¢â€¢ â€¢â€¢â€¢â€¢ â€¢â€¢â€¢â€¢ â€¢â€¢â€¢â€¢%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    border-radius: 2px;
}

.lateral-item .state {
    margin: 0;
    font-size: 12px;
    color: rgb(255, 255, 255);
    text-transform: uppercase;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
        -2px -2px 2px #000,
         2px -2px 2px #000,
        -2px  2px 2px #000,
         2px  2px 2px #000;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lateral-item .state::before {
    content: '';
    width: 17px;
    height: 17px;
    margin-right: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0000'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.lateral-item .state-gira {
    margin: 0;
    font-size: 12px;
    color: #ff8300;
    text-transform: uppercase;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
        -2px -2px 2px #000,
         2px -2px 2px #000,
        -2px  2px 2px #000,
         2px  2px 2px #000;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lateral-item .verified {
    position: absolute;
    top: 10px;
    left: 3%; /* Cambiado a left para que aparezca del lado izquierdo */
    width: 30px; /* TamaÃ±o del icono */
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lateral-item .verified::before {
    content: '';
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0000'%3E%3Cpath d='M22.5 12.5c0-1.58-.875-2.95-2.148-3.6.154-.435.238-.905.238-1.4 0-2.21-1.71-3.998-3.818-3.998-.47 0-.92.084-1.336.25C14.818 2.415 13.51 1.5 12 1.5s-2.816.917-3.437 2.25c-.415-.165-.866-.25-1.336-.25-2.11 0-3.818 1.79-3.818 4 0 .494.083.964.237 1.4-1.272.65-2.147 2.018-2.147 3.6 0 1.495.782 2.798 1.942 3.486-.02.17-.032.34-.032.514 0 2.21 1.708 4 3.818 4 .47 0 .92-.086 1.335-.25.62 1.334 1.926 2.25 3.437 2.25 1.512 0 2.818-.916 3.437-2.25.415.163.865.248 1.336.248 2.11 0 3.818-1.79 3.818-4 0-.174-.012-.344-.033-.513 1.158-.687 1.943-1.99 1.943-3.484zm-6.616-3.334l-4.334 6.5c-.145.217-.382.334-.625.334-.143 0-.288-.04-.416-.126l-.115-.094-2.415-2.415c-.293-.293-.293-.768 0-1.06s.768-.294 1.06 0l1.77 1.767 3.825-5.74c.23-.345.696-.436 1.04-.207.346.23.44.696.21 1.04z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5)); /* Sombra opcional para mejor visibilidad */
}

/* Ãcono de cÃ¡mara web - posicionamiento inteligente */
.lateral-item .serv-webcam {
    position: absolute;
    top: 35px; /* Por defecto debajo del verified */
    left: 0%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Si NO hay verified, webcam toma la posiciÃ³n principal */
.lateral-item:not(:has(.verified)) .serv-webcam {
    top: 5px; /* Misma posiciÃ³n que verified */
}

/* Fallback para navegadores que no soportan :has() */
.lateral-item .serv-webcam:first-child {
    top: 5px; /* Si webcam es el primer elemento, va arriba */
}

/* Si hay verified, webcam va abajo (especificidad mayor) */
.lateral-item .verified + .serv-webcam,
.lateral-item .verified ~ .serv-webcam {
    top: 35px; /* Debajo del verified */
}

.lateral-item .serv-webcam::before {
    content: '';
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF1744'%3E%3C!-- Cuerpo de la cÃ¡mara --%3E%3Crect x='4' y='6' width='16' height='12' rx='2' ry='2' fill='%23424242' stroke='%23212121' stroke-width='0.5'/%3E%3C!-- Lente principal --%3E%3Ccircle cx='12' cy='12' r='4' fill='%23212121' stroke='%23424242' stroke-width='0.5'/%3E%3C!-- Cristal del lente --%3E%3Ccircle cx='12' cy='12' r='3' fill='%231565C0'/%3E%3C!-- Reflejo del lente --%3E%3Ccircle cx='10.5' cy='10.5' r='1' fill='%2364B5F6' opacity='0.7'/%3E%3C!-- LED de grabaciÃ³n --%3E%3Ccircle cx='17' cy='8' r='1.5' fill='%23FF1744'/%3E%3C!-- Brillo del LED --%3E%3Ccircle cx='17' cy='8' r='0.8' fill='%23FF5252'/%3E%3C!-- Base/soporte --%3E%3Crect x='10' y='18' width='4' height='2' rx='1' fill='%23424242'/%3E%3Cpath d='M8 20 h8 l-1 2 h-6 z' fill='%23616161'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5)); /* Sombra para mejor visibilidad */
}

.nombre-modelos-laterales {
    font-size: 14px;
    position: absolute;
    top: 213px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, -2px -2px 2px #000, 2px -2px 2px #000, -2px 2px 2px #000, 2px 2px 2px #000;
    font-weight: bold;
    z-index: 10;
    white-space: nowrap;
    margin: 0;
}


.margen {
    margin-top: 20px;
}

/* Estilos para computadora */
@media (min-width: 767px) {
    .left-column,
    .right-column {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}


/* Estilos para mÃ³vil */
@media (max-width: 767px) {
    .center-column {
        width: 100%;
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item img,
    .banner-mobile img,
    .lateral-item img {
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        pointer-events: none;
    }
    
    /* Mantener los enlaces funcionales */
    .gallery-item a,
    .banner-mobile a,
    .lateral-item a {
        pointer-events: auto;
        display: block;
    }
    
    /* Alternativa más específica para imágenes de modelos */
    img[src*="foto/modelo/"],
    img[src*="foto/banner/"],
    img[src*="paneldecontrol/images/"] {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Prevenir el menú contextual al mantener presionado */
    .gallery-item,
    .banner-mobile,
    .lateral-item {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }    
    
/* === BANNER MOBILE STYLES === */
    .banner-mobile {
        display: block;
        grid-column: 1 / span 2;
        margin: 20px auto;
        border-radius: 15px;
        background-color: #0f1117;
        position: relative;
        overflow: hidden;
        max-width: 100%;
        height: 680px;
    }

    .banner-mobile a {
        display: block;
        position: relative;
        text-decoration: none;
    }

    .banner-mobile img {
        width: 100%;
        height: 570px;
        object-fit: cover;
        border-radius: 15px;
    }

    /* === NOMBRE Y TELÃ‰FONO === */
    .banner-mobile .nombre-modelos-banner-mobile {
        font-size: 16px;
        position: absolute;
        top: 510px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, -2px -2px 2px #000, 2px -2px 2px #000, -2px 2px 2px #000, 2px 2px 2px #000;
        font-weight: bold;
        z-index: 10;
        white-space: nowrap;
        margin: 0;
    }

    .banner-mobile .text-banner-mobile {
        font-size: 16px;
        color: #0dff00;
        text-transform: uppercase;
        position: absolute;
        top: 530px;
        left: 50%;
        transform: translateX(-50%);
        text-shadow: -1px -1px 0 #072f16, 1px -1px 0 #072f16, -1px 1px 0 #072f16, 1px 1px 0 #072f16, -2px -2px 2px #072f16, 2px -2px 2px #072f16, -2px 2px 2px #072f16, 2px 2px 2px #072f16;
        white-space: nowrap;
        margin: 0;
    }

    /* === ICONOS === */
    .banner-mobile .accepts-card {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 50px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 15;
    }

    .banner-mobile .accepts-card::before {
        content: '';
        width: 100%;
        height: 100%;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 85.6 53.98'%3E%3C!-- Fondo azul premium --%3E%3Cdefs%3E%3ClinearGradient id='blueGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%232E86AB;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23A23B72;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='85.6' height='53.98' rx='4' ry='4' fill='url(%23blueGrad)' stroke='%23333' stroke-width='0.5'/%3E%3C!-- Chip EMV --%3E%3Crect x='10' y='20' width='12' height='9' rx='1' ry='1' fill='%23FFD700' stroke='%23E6C200' stroke-width='0.3'/%3E%3Cline x1='12' y1='22' x2='12' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='14' y1='22' x2='14' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='16' y1='22' x2='16' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='18' y1='22' x2='18' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3Cline x1='20' y1='22' x2='20' y2='27' stroke='%23B8860B' stroke-width='0.3'/%3E%3C!-- Logo Mastercard --%3E%3Ccircle cx='60' cy='27' r='8' fill='%23EB001B'/%3E%3Ccircle cx='72' cy='27' r='8' fill='%23FF5F00'/%3E%3Cpath d='M66 19.5c-1.8 1.8-2.9 4.3-2.9 7.5s1.1 5.7 2.9 7.5c1.8-1.8 2.9-4.3 2.9-7.5s-1.1-5.7-2.9-7.5z' fill='%23FF5F00'/%3E%3Ctext x='66' y='41' font-family='Arial, sans-serif' font-size='3' font-weight='bold' text-anchor='middle' fill='white'%3EMASTERCARD%3C/text%3E%3Ctext x='10' y='15' font-family='Courier, monospace' font-size='4' fill='%23E0E0E0'%3Eâ€¢â€¢â€¢â€¢ â€¢â€¢â€¢â€¢ â€¢â€¢â€¢â€¢ â€¢â€¢â€¢â€¢%3C/text%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        border-radius: 4px;
    }

    .banner-mobile .verified {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 15;
    }

    .banner-mobile .verified::before {
        content: '';
        width: 100%;
        height: 100%;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0000'%3E%3Cpath d='M22.5 12.5c0-1.58-.875-2.95-2.148-3.6.154-.435.238-.905.238-1.4 0-2.21-1.71-3.998-3.818-3.998-.47 0-.92.084-1.336.25C14.818 2.415 13.51 1.5 12 1.5s-2.816.917-3.437 2.25c-.415-.165-.866-.25-1.336-.25-2.11 0-3.818 1.79-3.818 4 0 .494.083.964.237 1.4-1.272.65-2.147 2.018-2.147 3.6 0 1.495.782 2.798 1.942 3.486-.02.17-.032.34-.032.514 0 2.21 1.708 4 3.818 4 .47 0 .92-.086 1.335-.25.62 1.334 1.926 2.25 3.437 2.25 1.512 0 2.818-.916 3.437-2.25.415.163.865.248 1.336.248 2.11 0 3.818-1.79 3.818-4 0-.174-.012-.344-.033-.513 1.158-.687 1.943-1.99 1.943-3.484zm-6.616-3.334l-4.334 6.5c-.145.217-.382.334-.625.334-.143 0-.288-.04-.416-.126l-.115-.094-2.415-2.415c-.293-.293-.293-.768 0-1.06s.768-.294 1.06 0l1.77 1.767 3.825-5.74c.23-.345.696-.436 1.04-.207.346.23.44.696.21 1.04z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
    }

    .banner-mobile .serv-webcam {
        position: absolute;
        top: 55px; /* Debajo del verified */
        left: 10px;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 15;
    }

    /* Si no hay verified, webcam va arriba */
    .banner-mobile:not(:has(.verified)) .serv-webcam {
        top: 10px;
    }

    .banner-mobile .serv-webcam::before {
        content: '';
        width: 100%;
        height: 100%;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FF1744'%3E%3C!-- Cuerpo de la cÃ¡mara --%3E%3Crect x='4' y='6' width='16' height='12' rx='2' ry='2' fill='%23424242' stroke='%23212121' stroke-width='0.5'/%3E%3C!-- Lente principal --%3E%3Ccircle cx='12' cy='12' r='4' fill='%23212121' stroke='%23424242' stroke-width='0.5'/%3E%3C!-- Cristal del lente --%3E%3Ccircle cx='12' cy='12' r='3' fill='%231565C0'/%3E%3C!-- Reflejo del lente --%3E%3Ccircle cx='10.5' cy='10.5' r='1' fill='%2364B5F6' opacity='0.7'/%3E%3C!-- LED de grabaciÃ³n --%3E%3Ccircle cx='17' cy='8' r='1.5' fill='%23FF1744'/%3E%3C!-- Brillo del LED --%3E%3Ccircle cx='17' cy='8' r='0.8' fill='%23FF5252'/%3E%3C!-- Base/soporte --%3E%3Crect x='10' y='18' width='4' height='2' rx='1' fill='%23424242'/%3E%3Cpath d='M8 20 h8 l-1 2 h-6 z' fill='%23616161'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
    }

    /* === INFORMACIÃ"N INFERIOR === */
    .banner-mobile .banner-mobile-info-container {
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        z-index: 10;
    }

    .banner-mobile .state {
        margin: 0;
        font-size: 14px;
        color: rgb(255, 255, 255);
        text-transform: uppercase;
        text-shadow: 
            -1px -1px 0 #000,  
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            -2px -2px 2px #000,
            2px -2px 2px #000,
            -2px  2px 2px #000,
            2px  2px 2px #000;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .banner-mobile .state::before {
        content: '';
        width: 20px;
        height: 20px;
        margin-right: 5px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0000'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        flex-shrink: 0;
    }

    .banner-mobile .state-gira {
        margin: 0;
        font-size: 14px;
        color: #ff8300;
        text-transform: uppercase;
        text-shadow: 
            -1px -1px 0 #000,  
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            -2px -2px 2px #000,
            2px -2px 2px #000,
            -2px  2px 2px #000,
            2px  2px 2px #000;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    /* === BOTONES DE CONTACTO === */
    .banner-mobile .contact-buttons {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        justify-content: center;
        z-index: 15;
    }

    .banner-mobile .contact-buttons a {
        display: block;
    }

    .banner-mobile .contact-buttons img {
        width: 50px;
        height: 40px;
        border-radius: 5px;
    }

    /* HISTORIAS - ESTILOS BASE */
    /* El contenedor principal debe abarcar toda la pantalla y tener un z-index alto */
    .story-viewer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        display: flex; /* Añadido para centrar el contenido */
        justify-content: center;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .story-viewer {
        display: none; /* Oculta el visor por defecto */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* El contenedor de la historia no necesita un z-index específico, ya que está dentro de story-viewer */
    .story-content {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex; /* Para centrar la imagen/video */
        justify-content: center;
        align-items: center;
    }

    /* El video y la imagen también deben ser relativos para que los controles se posicionen sobre ellos */
    .story-media, .story-video {
        position: relative; /* Cambiado de 'relative' a 'absolute' si es necesario, pero 'relative' suele funcionar */
        width: auto; /* Permite que el video se ajuste a su tamaño original */
        height: 100%; /* Ajuste a la altura del contenedor */
        max-width: 100vw;
        max-height: 100vh;
        object-fit: contain;
        /* Eliminar el z-index de aquí. Será el z-index 1, los controles tendrán z-index 2 */
    }

    /* Los controles ahora deben ser hijos directos de .story-viewer o .story-content y usar 'absolute' */
    .story-header,
    .story-progress,
    .audio-control,
    .play-pause-control,
    .visit-profile,
    .story-nav {
        /* La clave es usar position: absolute con respecto a .story-viewer */
        position: absolute;
        /* Y un z-index superior al del video */
        z-index: 10000; 
    }

    /* Posiciones de los controles */
    .story-header {
        top: 0;
        left: 0;
        width: 100%;
    }

    .story-progress {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .audio-control {
        top: 70px;
        right: 15px;
    }

    .play-pause-control {
        top: 120px;
        right: 15px;
    }

    .visit-profile {
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
    }

    .story-nav {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .nav-prev, .nav-next {
        width: 50%;
        height: 100%;
    }
    
    .nav-next {
        justify-content: flex-end;
        padding-right: 15px;
    }
    
    .nav-arrow {
        width: 45px !important;
        height: 45px !important;
        background-color: rgba(255, 255, 255, 0.8) !important;
        color: #000 !important;
        border: 2px solid rgba(0, 0, 0, 0.4) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 18px !important;
        font-weight: bold !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
        backdrop-filter: blur(2px);
    }
    
    .story-content {
        z-index: 9998;
        position: relative;
    }
    
    .story-media, .story-video {
        z-index: 9998;
        position: relative;
    }
    
    /* Video configuración base */
    .story-video {
        -webkit-playsinline: true !important;
        playsinline: true !important;
        webkit-playsinline: true !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        object-fit: contain !important;
    }

    .story-user-info {
        cursor: pointer;
        transition: opacity 0.2s ease;
    }

    .story-user-info:hover {
        opacity: 0.8;
    }
    
    /* Para pantallas pequeñas */
    @media (max-width: 480px) {
        .audio-control, .play-pause-control {
            width: 35px;
            height: 35px;
        }
        
        .control-icon {
            width: 18px;
            height: 18px;
        }
        
        .visit-profile {
            padding: 8px 16px;
            font-size: 12px;
            bottom: 40px;
        }
        
        .nav-arrow {
            width: 40px !important;
            height: 40px !important;
            font-size: 16px !important;
        }
        
        .nav-prev {
            padding-left: 10px;
        }
        
        .nav-next {
            padding-right: 10px;
        }
    }
}