/* Fondo oscuro que cubre toda la pantalla */
#ts-thunderads-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999999; /* Por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Efecto cristal Apple/Élite */
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* El contenedor del anuncio con proporción 3:4 */
#ts-thunderads-container {
    position: relative;
    width: 90%;
    max-width: 450px; /* Tamaño máximo en PC */
    aspect-ratio: 3 / 4; /* La regla de oro vertical */
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

/* Que la imagen ocupe todo el espacio y se vea perfecta */
#ts-thunderads-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* El botón de cerrar (X) */
#ts-thunderads-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: #000;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background 0.2s;
}

#ts-thunderads-close:hover {
    background-color: #ff3333; /* Rojo al pasar el mouse */
}

/* Clases para la animación de entrada */
#ts-thunderads-overlay.ts-show {
    opacity: 1;
}
#ts-thunderads-overlay.ts-show #ts-thunderads-container {
    transform: scale(1);
}