/* ─── Globe page ─────────────────────────────────────── */
.globe-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #020b18;
    background: radial-gradient(ellipse at 50% 50%, #091a2a 0%, #020b18 70%);
}

/* ─── Globe container ────────────────────────────────── */
#globe-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: grab;
}

#globe-container:active {
    cursor: grabbing;
}

/* ─── UI overlay ─────────────────────────────────────── */
.globe-ui {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
}

/* Header */
.globe-header {
    text-align: center;
    pointer-events: none;
}

.globe-logo {
    max-height: 40px;
    margin-bottom: 14px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.globe-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #1BCEC8;
    display: block;
    margin-bottom: 14px;
}

.globe-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.globe-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* ─── Legend (bottom bar) ────────────────────────────── */
.globe-legend {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    pointer-events: auto;
}

.globe-legend__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    color: white;
    font-size: 13px;
}

.globe-legend__item:hover {
    background: rgba(27, 206, 200, 0.2);
    border-color: rgba(27, 206, 200, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 206, 200, 0.15);
}

.globe-legend__flag {
    font-size: 20px;
    line-height: 1;
}

.globe-legend__name {
    font-weight: 600;
}

.globe-legend__count {
    background: rgba(27, 206, 200, 0.25);
    color: #1BCEC8;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ─── Globe tooltip (polygon hover) ──────────────────── */
.globe-tooltip {
    background: rgba(2, 11, 24, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(27, 206, 200, 0.4);
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    line-height: 1.5;
}

.globe-tooltip strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1BCEC8;
}

.globe-tooltip span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ─── Globe HTML labels ──────────────────────────────── */
.globe-label {
    display: flex;
    align-items: center;
    gap: 6px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    padding: 4px 10px;
    background: rgba(2, 11, 24, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.globe-label:hover {
    background: rgba(27, 206, 200, 0.3);
    border-color: rgba(27, 206, 200, 0.6);
    transform: translate(-50%, -50%) scale(1.1);
}

.globe-label__flag {
    font-size: 16px;
    line-height: 1;
}

.globe-label__name {
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    font-family: 'Montserrat', sans-serif;
}

/* ─── Transition overlay (flash) ─────────────────────── */
.globe-transition {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.globe-transition.active {
    opacity: 1;
    pointer-events: auto;
    animation: globe-flash 0.5s ease forwards;
}

.globe-transition__content {
    text-align: center;
}

.globe-transition__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(3, 74, 94, 0.15);
    border-top-color: #034A5E;
    border-radius: 50%;
    animation: globe-spin 0.6s linear infinite;
    margin: 0 auto 14px;
}

.globe-transition__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #034A5E;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes globe-spin {
    to { transform: rotate(360deg); }
}

@keyframes globe-flash {
    0%   { opacity: 0; background: rgba(27, 206, 200, 0.9); }
    30%  { opacity: 1; background: white; }
    100% { opacity: 1; background: white; }
}

/* ─── Particles effect (subtle floating dots) ────────── */
.globe-page::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(27, 206, 200, 0.3), transparent),
        radial-gradient(1px 1px at 30% 65%, rgba(51, 160, 190, 0.2), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(27, 206, 200, 0.2), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(51, 160, 190, 0.15), transparent),
        radial-gradient(1.5px 1.5px at 15% 85%, rgba(27, 206, 200, 0.25), transparent),
        radial-gradient(1px 1px at 85% 15%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 60% 45%, rgba(27, 206, 200, 0.15), transparent);
    animation: globe-drift 20s linear infinite alternate;
    pointer-events: none;
}

@keyframes globe-drift {
    from { transform: translateY(0) translateX(0); }
    to   { transform: translateY(-30px) translateX(15px); }
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .globe-header h1 {
        font-size: 20px;
    }

    .globe-header p {
        font-size: 12px;
    }

    .globe-legend {
        gap: 6px;
    }

    .globe-legend__item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .globe-legend__name {
        display: none;
    }

    .globe-legend__flag {
        font-size: 24px;
    }

    .globe-ui {
        padding: 20px 10px;
    }
}
