/* Cloud — comparte la mayoría de estilos con globe.css (header, chip,
   carousel, loader, hint). Solo añadimos lo específico del canvas y los
   labels de cluster que flotan en 3D proyectados a 2D. */

#cloud-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 2;
}
#cloud-container canvas {
    outline: none;
    display: block;
}

/* Labels de cluster — divs HTML posicionados absolutamente sobre el canvas.
   La JS actualiza top/left por frame proyectando el centroide 3D.
   Usamos paleta violeta (etiquetas de tema) para diferenciarlas del
   tooltip de noticia individual (paleta cyan en .globe-tooltip). */
.cluster-label {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(45, 22, 75, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(180, 130, 255, 0.42);
    text-shadow: 0 0 10px rgba(180, 130, 255, 0.55);
    white-space: nowrap;
    z-index: 6;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, background 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    user-select: none;
}
.cluster-label:hover {
    background: rgba(70, 38, 115, 0.85);
    border-color: rgba(200, 160, 255, 0.85);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 28px rgba(180, 130, 255, 0.45);
    /* Mantengo el centrado translate y agrego scale al hover */
    transform: translate(-50%, -50%) scale(1.10);
}
.cluster-label.behind {
    pointer-events: none;
}
.cluster-label .cl-count {
    color: #b388ff;
    font-size: 0.7rem;
    margin-left: 0.45rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}
.cluster-label.behind {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(0.85);
}

/* Tooltip de noticia individual — reusa .globe-tooltip de globe.css.
   Tipografía normal (no bold) para que el bubble se sienta como cita
   de noticia, no como etiqueta enfática. */
.globe-tooltip .tt-name { font-weight: 400; }
.globe-tooltip .tt-count {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 400;
    max-width: 320px;
    white-space: normal;
}

/* Mobile: labels más pequeños */
@media (max-width: 768px) {
    .cluster-label { font-size: 0.85rem; padding: 0.3rem 0.7rem; }
    .cluster-label .cl-count { display: none; }
}
