/* RESET BÁSICO */
html, body { 
    margin: 0; 
    padding: 0;
    height: 100%; 
    width: 100%;
    background: #000000;
    /* Flexbox para centrar la caja negra en la pantalla */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}

/* LA CAJA MAESTRA */
#contenedor-principal {
    position: relative; /* Importante: sirve de ancla para lo de adentro */
    width: 100%;
    max-width: 486px; /* No deja que crezca más que el original */
    aspect-ratio: 486 / 536; /* Mantiene la forma rectangular SIEMPRE */
    background: #313131;
    overflow: hidden; /* Corta cualquier cosa que sobresalga */
}

/* CAPA 1 y 2: Imágenes (Mapas) */
#show1, #overlay-imagen {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
}

/* Ajuste de la imagen superpuesta */
#overlay-imagen { z-index: 2; pointer-events: none; }
#overlay-imagen img {
    width: 100%; height: 100%; object-fit: fill; border: none;
}

/* CAPA 3: Texto (Esquina inferior derecha) */
#overlay-texto {
    position: absolute;
    bottom: 42px; /* Separación desde abajo */
    right: 5px;  /* Separación desde la derecha */
    z-index: 10;
    text-align: right;
    font-family: Arial, sans-serif;
    color: white;
    pointer-events: auto; /* Para que funcionen los clicks */
}

/* ESTILOS DE LOS ENLACES (Para que no salgan azules) */
.bloque-enlaces { margin-bottom: 5px; }

a.enlace-aemet { font-size: 16px; color: #fa8 !important; text-decoration: none; font-weight: bold; }
a.enlace-ofymat { font-size: 12px; color: #fe7 !important; text-decoration: none; }
a.enlace-virtual { font-size: 12px; color: #aef !important; text-decoration: none; }

/* Texto de la hora (PHP) */
.bloque-hora {
    font-size: 14px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}