:root { 
    --main-color: #0d6efd; 
}
        
body { 
    background-color: #000000; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

.viewer-container {
    max-width: 600px;
    margin: auto;
    background: black;
    border-radius: 20px;
    padding: 20px;
}

#canvas-3d {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden; 
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px; /* Queda mejor en móviles */
}

.cuerpo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0; 
    transition: opacity 0.4s ease-in-out, transform 0.5s ease-in-out;
    pointer-events: auto; 
    cursor: pointer; 
    transform-origin: center center;
}

.cuerpo-img.active {
    opacity: 1;
    z-index: 10;
}

#canvas-3d:active {
    cursor: grabbing;
}

.angle-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* ==========================================================================
   CUADRO DE DIÁLOGO (ESCRITORIO)
   ========================================================================== */
#info-notification {
    position: fixed; 
    z-index: 2000;
    background: white;
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    max-width: 280px; 
    border-left: 5px solid #0d6efd;
    pointer-events: none; 
    opacity: 0;
    /* La animación inicial es desde abajo hacia arriba */
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#info-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.color {
    color: #3fd33e;
}

#notif-img {
    width: 100%;
    max-height: 140px;
    object-fit: cover; 
    border-radius: 8px;
    margin-bottom: 10px;
}

/* ==========================================================================
   EFECTO DE ARO ROJO
   ========================================================================== */
.click-pulse-indicator {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.2);
    border-radius: 50%;
    z-index: 30; 
    pointer-events: none; 
    transform: translate(-50%, -50%); 
    animation: pulseEffect 0.8s ease-out infinite alternate;
}

@keyframes pulseEffect {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    100% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

/* ==========================================================================
   DISEÑO RESPONSIVE (MÓVILES Y TABLETS PEQUEÑAS)
   ========================================================================== */
@media (max-width: 768px) {
    #info-notification {
        /* Ignora las posiciones X e Y enviadas por Javascript */
        left: 5% !important; 
        top: auto !important; 
        bottom: 20px !important; /* Anclado a la parte inferior de la pantalla */
        
        width: 90% !important; /* Ocupa casi todo el ancho */
        max-width: 100%;
        
        /* Modificamos la animación para pantallas pequeñas */
        transform: translateY(50px);
    }

    #info-notification.show {
        transform: translateY(0) !important;
    }

    .viewer-container {
        padding: 10px; /* Menos margen en celulares */
    }
}