:root {
    --globe-bg: #050814;
    --globe-bg-2: #0a1230;
    --accent: #4cc9ff;
    --accent-glow: rgba(76, 201, 255, 0.55);
}

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--globe-bg-2) 0%, var(--globe-bg) 60%);
    color: #e8eef9;
    font-family: 'Inter', sans-serif;
    overflow: hidden;       /* el globo ocupa el viewport completo */
    height: 100vh;
}

/* Animated starfield */
.stars, .stars::after {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 60% 70%, white, transparent),
        radial-gradient(1.5px 1.5px at 80% 20%, white, transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 90% 50%, white, transparent),
        radial-gradient(2px 2px at 10% 60%, white, transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.8), transparent);
    background-size: 600px 600px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}
.stars { animation: twinkle 8s ease-in-out infinite alternate; }
.stars::after {
    content: '';
    background-position: 50% 50%;
    animation: twinkle 5s ease-in-out infinite alternate-reverse;
    opacity: 0.4;
}
@keyframes twinkle {
    from { opacity: 0.4; }
    to { opacity: 0.85; }
}

/* Header — flota sobre el globo, no le quita espacio vertical */
.globe-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(5,8,20,0.78) 0%, rgba(5,8,20,0.35) 70%, rgba(5,8,20,0) 100%);
}
.globe-header img.logo { height: 48px; transition: transform 0.3s ease; }
.globe-header img.logo:hover { transform: scale(1.05); }
.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}
.header-tagline {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.tagline-headline {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 70%, #b388ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.tagline-date {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 1px;
    opacity: 0.85;
}
.tagline-credit {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    margin-top: 2px;
    transition: color 0.2s ease;
}
.tagline-credit a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
}
.tagline-credit:hover { color: rgba(255, 255, 255, 0.85); }
.tagline-credit:hover a { border-bottom-color: rgba(255, 255, 255, 0.6); }
.globe-header .nav-actions { display: flex; gap: 0.6rem; align-items: center; }
.globe-header .nav-link-pill {
    background: rgba(76, 201, 255, 0.12);
    border: 1px solid rgba(76, 201, 255, 0.4);
    color: #cfeaff;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.globe-header .nav-link-pill:hover {
    background: rgba(76, 201, 255, 0.25);
    color: white;
    border-color: var(--accent);
}

/* Mode switcher: segmento único con los 3 modos (globo / nube / clima).
   El modo activo se resalta. */
.globe-header .mode-switcher {
    display: inline-flex;
    background: rgba(15, 22, 55, 0.55);
    border: 1px solid rgba(76, 201, 255, 0.28);
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.15rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.globe-header .mode-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.globe-header .mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}
.globe-header .mode-btn.active {
    background: rgba(76, 201, 255, 0.28);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.55);
    pointer-events: none;
}
.globe-header .icon-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #cfeaff;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
}
.globe-header .user-info {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: #cfeaff; font-size: 0.9rem;
}
.globe-header .user-info img {
    width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3);
}

/* Globe canvas container — viewport completo */
#globe-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 2;
}
#globe-container canvas { outline: none; }

/* Loading overlay */
.globe-loader {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #cfeaff;
    z-index: 3;
    pointer-events: none;
    width: min(380px, 80vw);
    transition: opacity 0.5s ease;
}
.globe-loader.done {
    opacity: 0;
    pointer-events: none;
}

.globe-loader .spinner-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 1.2rem;
}
.globe-loader .spinner {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(76, 201, 255, 0.18);
    border-top-color: var(--accent);
    border-right-color: rgba(179, 136, 255, 0.6);
    border-radius: 50%;
    animation: spin 1.4s linear infinite;
}
.globe-loader .spinner-pulse {
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(76, 201, 255, 0.35);
    border-radius: 50%;
    animation: pulse-ring 2.2s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.18); opacity: 0.05; }
}

.globe-loader .loader-msg {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: white;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
    transition: opacity 0.25s ease;
    min-height: 1.4em;
}
.globe-loader .loader-sub {
    font-size: 0.7rem;
    color: rgba(168, 179, 204, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.1rem;
    transition: opacity 0.25s ease;
    min-height: 1em;
}
.globe-loader .loader-bar {
    width: 100%;
    height: 3px;
    background: rgba(76, 201, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.globe-loader .loader-bar-fill {
    height: 100%;
    width: 5%;
    background: linear-gradient(90deg, var(--accent) 0%, #b388ff 100%);
    border-radius: 2px;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px var(--accent);
    position: relative;
}
.globe-loader .loader-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
    animation: shimmer 1.8s linear infinite;
}
@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* Floating tooltip */
.globe-tooltip {
    position: fixed;
    pointer-events: none;
    background: rgba(10, 18, 48, 0.92);
    border: 1px solid rgba(76, 201, 255, 0.5);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    color: white;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}
.globe-tooltip.visible { opacity: 1; }
.globe-tooltip .tt-flag {
    display: inline-block;
    width: 22px; height: 16px;
    margin-right: 8px;
    border-radius: 2px;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
    background-size: cover;
    background-position: center;
}
.globe-tooltip .tt-name { font-weight: 600; }
.globe-tooltip .tt-count {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 500;
}

/* Global chip — botón siempre visible, esquina superior derecha del globo */
.global-chip {
    position: fixed;
    top: 90px;
    right: 1.4rem;
    z-index: 130;
    background: rgba(15, 22, 55, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(179, 136, 255, 0.35);
    border-radius: 999px;
    padding: 0.55rem 1rem 0.55rem 0.65rem;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-family: inherit;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease;
}
.global-chip:hover {
    background: rgba(30, 22, 70, 0.78);
    border-color: rgba(179, 136, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 28px rgba(179, 136, 255, 0.3);
}
.global-chip-icon {
    font-size: 1.25rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(179, 136, 255, 0.4));
}
.global-chip-label {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}
.global-chip-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 500;
}
.global-chip-meta {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: #b388ff;
    margin-top: 1px;
}

/* Country chip — flota arriba al centro cuando se abre un país */
.country-chip {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translate(-50%, -16px);
    opacity: 0;
    z-index: 140;
    background: rgba(15, 22, 55, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(76, 201, 255, 0.32);
    border-radius: 999px;
    padding: 0.55rem 0.65rem 0.55rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(76, 201, 255, 0.15);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}
.country-chip.open {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.country-chip img {
    width: 32px; height: 22px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.country-chip .chip-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    /* Permite que el chip crezca lo necesario para que "5 NOTICIAS" no se
       quiebre en 2 líneas en mobile/zoom alto. */
    flex-shrink: 0;
}
.country-chip .chip-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: white;
    font-weight: 500;
    white-space: nowrap;
}
.country-chip .chip-meta {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    margin-top: 1px;
    white-space: nowrap;
}
.country-chip .chip-close {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cfeaff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}
.country-chip .chip-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: rotate(90deg);
}

/* Botón TTS — escuchar las top noticias del país como noticiero. */
.country-chip .chip-tts {
    background: rgba(76, 201, 255, 0.18);
    border: 1px solid rgba(76, 201, 255, 0.4);
    color: #cfeaff;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease,
                box-shadow 0.2s ease;
    font-size: 0.8rem;
    margin-right: 0.15rem;
}
.country-chip .chip-tts:hover {
    background: rgba(76, 201, 255, 0.32);
    color: white;
    transform: scale(1.06);
}
.country-chip .chip-tts.chip-tts-playing {
    background: rgba(180, 130, 255, 0.5);
    border-color: rgba(200, 160, 255, 0.85);
    color: white;
    box-shadow: 0 0 14px rgba(180, 130, 255, 0.55);
    animation: chip-tts-pulse 1.4s ease-in-out infinite;
}
.country-chip .chip-tts.chip-tts-loading {
    background: rgba(76, 201, 255, 0.28);
    color: white;
}
.country-chip .chip-tts.chip-tts-paused {
    background: rgba(76, 201, 255, 0.32);
}
@keyframes chip-tts-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(180, 130, 255, 0.4); }
    50%      { box-shadow: 0 0 22px rgba(180, 130, 255, 0.85); }
}

/* Card en reproducción TTS — borde violeta brillante y sutil scale. */
.news-card-glass.nc-playing {
    border-color: rgba(180, 130, 255, 0.85) !important;
    box-shadow: 0 0 24px rgba(180, 130, 255, 0.45),
                0 12px 40px rgba(0, 0, 0, 0.55) !important;
    transform: scale(1.015);
}
.news-card-glass.nc-playing .nc-title {
    color: #f5e9ff;
}
.news-card-glass.nc-playing::before {
    /* Mini banner "Reproduciendo" en la esquina superior izquierda */
    content: '🎙 LEYENDO';
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 4;
    background: rgba(180, 130, 255, 0.92);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(180, 130, 255, 0.4);
    animation: chip-tts-pulse 1.4s ease-in-out infinite;
}

/* News carousel — barra horizontal flotante de cards translúcidas */
.news-carousel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    padding: 1rem 0 1.6rem;
    transform: translateY(115%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    /* sin fondo: que se vea el globo detrás */
}
.news-carousel.open {
    transform: translateY(0);
    pointer-events: auto;
}

.news-carousel-track {
    display: flex;
    gap: 1.1rem;
    padding: 1rem 4rem 1.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 4rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(76, 201, 255, 0.3) transparent;
}
.news-carousel-track::-webkit-scrollbar { height: 4px; }
.news-carousel-track::-webkit-scrollbar-track { background: transparent; }
.news-carousel-track::-webkit-scrollbar-thumb {
    background: rgba(76, 201, 255, 0.32);
    border-radius: 2px;
}

/* Botones laterales para navegar (desktop) */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(15, 22, 55, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 201, 255, 0.3);
    color: #cfeaff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 5;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.carousel-nav:hover {
    background: rgba(20, 30, 70, 0.9);
    border-color: var(--accent);
    color: white;
}
.carousel-nav-prev { left: 0.8rem; }
.carousel-nav-next { right: 0.8rem; }

/* News card — vidrio esmerilado, deja ver el globo atrás */
.news-card-glass {
    flex: 0 0 320px;
    position: relative; /* contexto para .nc-admin-overlay */
    background: rgba(15, 22, 55, 0.55);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: 0;
    color: white;
    text-decoration: none;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    height: 420px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}
.news-card-glass:hover {
    transform: translateY(-6px);
    border-color: rgba(76, 201, 255, 0.5);
    background: rgba(20, 30, 70, 0.65);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 32px rgba(76, 201, 255, 0.18);
}

.news-card-glass .nc-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #1a2548;
    flex-shrink: 0;
    position: relative;
}
.news-card-glass .nc-image::after {
    /* viñeta inferior para que el texto siguiente se lea mejor */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(15,22,55,0.4) 100%);
    pointer-events: none;
}

/* Card variant para noticias-video (YouTube): iframe en lugar de bg image.
   El card NO es <a> (los iframes no anidan en links); el CTA del footer
   sirve como link explícito. */
.news-card-glass.news-card-video {
    cursor: default;
}
.news-card-glass .nc-video {
    width: 100%;
    height: 165px;
    background: #000;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.news-card-glass .nc-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.news-card-glass.news-card-video .nc-source i.fab.fa-youtube {
    color: #ff4757;
    font-size: 0.9rem;
    margin-right: 0.25rem;
    vertical-align: -1px;
}
.news-card-glass.news-card-video .nc-cta {
    cursor: pointer;
    text-decoration: none;
}

/* Overlay admin (delete + unlink) — solo visible para elandivar@gmail.com.
   Esquina superior derecha de cada card, semi-translúcido para no
   dominar pero accesible. */
.nc-admin-overlay {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: flex;
    gap: 0.35rem;
    z-index: 5;
    opacity: 0.4;
    transition: opacity 0.18s ease;
}
.news-card-glass:hover .nc-admin-overlay { opacity: 1; }
.nc-admin-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.nc-admin-btn:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.55);
}
.nc-admin-btn.nc-admin-delete:hover {
    background: rgba(180, 30, 30, 0.92);
    color: white;
}
.nc-admin-btn.nc-admin-unlink:hover {
    background: rgba(180, 130, 50, 0.92);
    color: white;
}

.news-card-glass .nc-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.news-card-glass .nc-source {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.55rem;
}
.news-card-glass .nc-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.55rem;
    color: white;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-glass .nc-excerpt {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #b6c2dd;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 0.9rem;
    font-weight: 300;
}
.news-card-glass .nc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.news-card-glass .nc-cta {
    background: rgba(76, 201, 255, 0.18);
    border: 1px solid rgba(76, 201, 255, 0.45);
    color: #cfeaff;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.news-card-glass:hover .nc-cta {
    background: rgba(76, 201, 255, 0.32);
    border-color: var(--accent);
    color: white;
}
.news-card-glass .nc-date {
    font-size: 0.72rem;
    color: #8d9ab8;
}

.nc-loading, .nc-empty {
    flex: 0 0 100%;
    text-align: center;
    color: #b6c2dd;
    font-size: 0.95rem;
    padding: 3rem 2rem;
    background: rgba(15, 22, 55, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    margin: 0 1rem;
}
.nc-loading .spinner {
    width: 32px; height: 32px;
    border: 2px solid rgba(76, 201, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

/* Footer hint */
.globe-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    background: rgba(5,8,20,0.6);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    z-index: 4;
    pointer-events: none;
    animation: fade-pulse 3s ease-in-out infinite;
}
@keyframes fade-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Toggles de capas opcionales (día/noche, conflictos GDELT, relaciones).
   Por omisión OFF; flotan abajo a la derecha alineados horizontalmente.
   Se ocultan cuando el carousel está abierto (.hidden). El contenedor
   tiene position:fixed para no quedar tapado por el stacking context
   que crea globe.gl al inyectar su scene-container. */
.layer-toggles {
    position: fixed;
    /* Subido para hacerle lugar al ticker (~2.4rem) en el borde inferior. */
    bottom: 3.4rem;
    right: 1rem;
    z-index: 130;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

/* ---------- Topic ticker (rotativo, full-width, borde inferior) ---------- */
.topic-ticker {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.4rem;
    /* Por debajo de carousel (150), tooltip (140) y toggles (130) — el
       ticker es ambient, no debe taparse a sí mismo sobre nada activo. */
    z-index: 120;
    overflow: hidden;
    background: linear-gradient(180deg,
                                rgba(5, 8, 20, 0.55) 0%,
                                rgba(5, 8, 20, 0.85) 100%);
    border-top: 1px solid rgba(180, 130, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.topic-ticker.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
}
.topic-ticker-track {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    width: max-content;
    padding: 0 1rem;
    will-change: transform;
    /* Loop infinito: contenido duplicado en JS, animación va de 0 a -50%
       (ancho de un set), el segundo set queda exactamente donde estaba el
       primero al terminar — sin saltos visibles. */
    animation: topic-ticker-scroll 75s linear infinite;
}
.topic-ticker:hover .topic-ticker-track {
    animation-play-state: paused;
}
@keyframes topic-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.topic-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.92);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(45, 22, 75, 0.55);
    border: 1px solid rgba(180, 130, 255, 0.42);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
    user-select: none;
}
.topic-pill:hover {
    background: rgba(70, 38, 115, 0.88);
    border-color: rgba(200, 160, 255, 0.85);
    transform: translateY(-1px);
}
.topic-pill .topic-count {
    color: #b388ff;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
}
.topic-pill .topic-intl {
    font-size: 0.65rem;
    color: #ffd166;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
}
.layer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(5, 8, 20, 0.65);
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease,
                background 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.layer-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

/* Variante azul (arcos) */
.arcs-toggle { border-color: rgba(76, 201, 255, 0.35); }
.arcs-toggle:hover {
    background: rgba(15, 30, 60, 0.85);
    border-color: rgba(76, 201, 255, 0.7);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5),
                0 0 18px rgba(76, 201, 255, 0.25);
}
.arcs-toggle[aria-pressed="true"] {
    background: rgba(20, 50, 95, 0.85);
    border-color: rgba(76, 201, 255, 0.85);
    color: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5),
                0 0 22px rgba(76, 201, 255, 0.45);
}
.arcs-toggle i { color: #4cc9ff; }

/* Variante roja (conflictos GDELT) */
.gdelt-toggle { border-color: rgba(255, 90, 60, 0.4); }
.gdelt-toggle:hover {
    background: rgba(60, 18, 12, 0.85);
    border-color: rgba(255, 90, 60, 0.75);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5),
                0 0 18px rgba(255, 70, 40, 0.25);
}
.gdelt-toggle[aria-pressed="true"] {
    background: rgba(95, 25, 18, 0.85);
    border-color: rgba(255, 90, 60, 0.9);
    color: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5),
                0 0 22px rgba(255, 70, 40, 0.45);
}
.gdelt-toggle i { color: #ff7a4a; }

/* Variante violeta (día/noche) */
.night-toggle { border-color: rgba(180, 140, 255, 0.4); }
.night-toggle:hover {
    background: rgba(30, 22, 60, 0.85);
    border-color: rgba(180, 140, 255, 0.75);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5),
                0 0 18px rgba(160, 130, 255, 0.25);
}
.night-toggle[aria-pressed="true"] {
    background: rgba(45, 32, 90, 0.88);
    border-color: rgba(180, 140, 255, 0.9);
    color: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5),
                0 0 22px rgba(160, 130, 255, 0.45);
}
.night-toggle i { color: #b48cff; }

@media (max-width: 768px) {
    .layer-toggle { font-size: 0.72rem; padding: 0.4rem 0.75rem; }
    .layer-toggle .layer-toggle-label { display: none; }
    .layer-toggles { gap: 0.4rem; bottom: 2.8rem; }
    .topic-ticker { height: 2rem; }
    .topic-ticker-track { gap: 0.6rem; padding: 0 0.6rem; }
    .topic-pill { font-size: 0.78rem; padding: 0.22rem 0.7rem; }
    .topic-pill .topic-count { font-size: 0.62rem; }
}

/* Marker de evento GDELT — globe.gl lo posiciona con translate(x, y).
   Usa color rojo-naranja con glow y pulso sutil. */
.gdelt-marker {
    margin-left: -7px;
    margin-top: -7px;
    color: #ff5a3a;
    font-size: 11px;
    text-shadow: 0 0 6px rgba(255, 90, 60, 0.85),
                 0 0 12px rgba(255, 50, 30, 0.55);
    transition: transform 0.18s ease, color 0.18s ease;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    animation: gdelt-pulse 2.6s ease-in-out infinite;
}
.gdelt-marker:hover {
    color: #ffd0b0;
    transform: scale(1.6);
    z-index: 20;
}
@keyframes gdelt-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

/* Tooltip de evento GDELT */
.gdelt-tooltip {
    position: fixed;
    z-index: 200;
    background: rgba(35, 12, 12, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 90, 60, 0.45);
    border-radius: 12px;
    padding: 0.85rem 1.05rem 0.8rem;
    color: white;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65),
                0 0 28px rgba(255, 70, 40, 0.18);
    min-width: 260px;
    max-width: 320px;
    pointer-events: auto;
}
.gdelt-tooltip .gt-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.1rem 0.35rem;
    transition: color 0.15s ease;
}
.gdelt-tooltip .gt-close:hover { color: white; }
.gdelt-tooltip .gt-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.gdelt-tooltip .gt-root-14, .gdelt-tooltip .gt-root-15 { color: #1a0f00; background: #ffd24a; }
.gdelt-tooltip .gt-root-16, .gdelt-tooltip .gt-root-17 { color: #1a0f00; background: #ff8a3a; }
.gdelt-tooltip .gt-root-18 { color: #fff; background: #ff5a3a; }
.gdelt-tooltip .gt-root-19, .gdelt-tooltip .gt-root-20 { color: #fff; background: #ff2a2a; }
.gdelt-tooltip .gt-place {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.55rem;
    line-height: 1.25;
}
.gdelt-tooltip .gt-place .fa-map-marker-alt { color: #ff8a3a; }
.gdelt-tooltip .gt-actors {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}
.gdelt-tooltip .gt-actor {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gdelt-tooltip .gt-arrow {
    color: rgba(255, 138, 58, 0.85);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.gdelt-tooltip .gt-meta {
    display: flex;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.55rem;
    letter-spacing: 0.04em;
}
.gdelt-tooltip .gt-mentions { color: #ffd2a8; font-weight: 600; }
.gdelt-tooltip .gt-tone { font-style: italic; }
.gdelt-tooltip .gt-gold { margin-bottom: 0.7rem; }
.gdelt-tooltip .gt-gold-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}
.gdelt-tooltip .gt-gold-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd24a 0%, #ff5a3a 60%, #ff2a2a 100%);
}
.gdelt-tooltip .gt-gold-label {
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.gdelt-tooltip .gt-source {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #ffd2a8;
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    background: rgba(255, 138, 58, 0.18);
    border: 1px solid rgba(255, 138, 58, 0.4);
    transition: background 0.15s ease, color 0.15s ease;
}
.gdelt-tooltip .gt-source:hover {
    color: #fff;
    background: rgba(255, 138, 58, 0.32);
}

/* Marker clickeable sobre sismos M5.5+ — pequeña píldora con la magnitud
   visible que invita al click. Pulse sutil + hover scale. globe.gl
   posiciona el wrapper con translate(x,y); centramos via margin negativo. */
.quake-marker {
    width: 30px; height: 18px;
    margin-left: -15px; margin-top: -9px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    cursor: pointer;
    pointer-events: auto;
    border: 1.5px solid rgba(255, 255, 255, 0.92);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    will-change: transform;
    z-index: 10;
}
.quake-marker.tier-1 {
    /* M5.5 - 6.4: naranja */
    background: rgba(255, 140, 60, 0.92);
    box-shadow: 0 0 12px rgba(255, 140, 60, 0.55), 0 1px 4px rgba(0, 0, 0, 0.5);
    animation: quake-throb-1 2.6s ease-in-out infinite;
}
.quake-marker.tier-2 {
    /* M6.5 - 6.9: naranja-rojo */
    background: rgba(255, 95, 60, 0.95);
    box-shadow: 0 0 14px rgba(255, 95, 60, 0.65), 0 1px 4px rgba(0, 0, 0, 0.5);
    animation: quake-throb-2 2.2s ease-in-out infinite;
}
.quake-marker.tier-3 {
    /* M7.0+: rojo intenso */
    background: rgba(255, 60, 50, 0.97);
    box-shadow: 0 0 18px rgba(255, 60, 50, 0.8), 0 1px 4px rgba(0, 0, 0, 0.5);
    animation: quake-throb-3 1.8s ease-in-out infinite;
}
.quake-marker:hover {
    transform: scale(1.35);
    z-index: 20;
}
@keyframes quake-throb-1 {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 140, 60, 0.45), 0 1px 4px rgba(0, 0, 0, 0.5); }
    50%      { box-shadow: 0 0 18px rgba(255, 140, 60, 0.75), 0 1px 4px rgba(0, 0, 0, 0.5); }
}
@keyframes quake-throb-2 {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 95, 60, 0.55), 0 1px 4px rgba(0, 0, 0, 0.5); }
    50%      { box-shadow: 0 0 22px rgba(255, 95, 60, 0.85), 0 1px 4px rgba(0, 0, 0, 0.5); }
}
@keyframes quake-throb-3 {
    0%, 100% { box-shadow: 0 0 16px rgba(255, 60, 50, 0.7), 0 1px 4px rgba(0, 0, 0, 0.5); }
    50%      { box-shadow: 0 0 28px rgba(255, 60, 50, 1.0), 0 1px 4px rgba(0, 0, 0, 0.5); }
}

/* Chip de par: dos banderas + nombres con flecha entre medio */
.country-chip .chip-pair {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.country-chip .chip-pair img {
    width: 26px; height: 18px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.country-chip .chip-pair-arrow {
    color: var(--accent);
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0 0.1rem;
}

/* Tablet (oculta el tagline para preservar espacio del header) */
@media (max-width: 900px) {
    .header-tagline { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
    .globe-header { padding: 0.7rem 1rem; gap: 0.5rem; }
    .globe-header img.logo { height: 40px; }
    .globe-header .nav-link-pill .nav-text-full { display: none; }
    .country-chip { top: 78px; padding: 0.45rem 0.55rem 0.45rem 0.85rem; }
    .global-chip { top: 78px; right: 0.8rem; padding: 0.45rem 0.85rem 0.45rem 0.55rem; }
    .global-chip-title { font-size: 0.85rem; }
    .global-chip-meta { font-size: 0.6rem; }
    .country-chip .chip-name { font-size: 0.95rem; }
    .news-card-glass { flex: 0 0 280px; height: 400px; }
    .news-carousel-track { padding: 1rem 1.2rem 1.4rem; scroll-padding-left: 1.2rem; }
    /* En mobile las flechas estorban; el swipe es el gesto natural */
    .carousel-nav { display: none; }
}

/* ─────────────────────────────────────────────────────────────────────
   Badge "Internacional": noticias provenientes del flujo global
   (clusters cross-country con n_countries >= 3). Se posiciona arriba
   a la izquierda de la card y se acentúa el border de la card para
   diferenciarla del flujo local sin gritar.
   ───────────────────────────────────────────────────────────────────── */
.news-card-glass.news-card-intl {
    border-color: rgba(255, 187, 84, 0.45);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5),
                0 0 24px rgba(255, 187, 84, 0.12);
}
.news-card-glass.news-card-intl:hover {
    border-color: rgba(255, 187, 84, 0.75);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55),
                0 0 32px rgba(255, 187, 84, 0.28);
}
.nc-intl-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 168, 60, 0.92), rgba(255, 110, 70, 0.92));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 14px rgba(255, 110, 70, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.18) inset;
    pointer-events: none;
}
.nc-intl-badge i { font-size: 0.78rem; }
@media (max-width: 768px) {
    .nc-intl-badge { font-size: 0.62rem; padding: 0.26rem 0.55rem; top: 10px; left: 10px; }
}
