/* globe-widget.css */

/* ── block9 卡片 ── */
#block9 {
    position: relative;
    min-width: 240px;
    padding: 12px 16px 10px;
    overflow: hidden;
}

#block9 .globe-header {
    margin-bottom: 6px;
}

#block9 .globe-header h3 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: var(--black-color);
    letter-spacing: 0.04em;
}

#block9 .globe-subtitle {
    font-size: 0.72em;
    color: var(--gray-color);
    margin-top: 2px;
}

/* ── 端口 badge ── */
#globe-ports {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 5px;
    pointer-events: none;
    z-index: 10;
}

.port-badge {
    font-size: 0.65em;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 140, 0, 0.18);
    color: #ff8c00;
    border: 1px solid rgba(255, 140, 0, 0.4);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── 地球容器 ── */
#globe-container {
    width: 100%;
    height: 380px;
    position: relative;
    overflow: visible;
    cursor: grab;
    margin-top: 4px;
}

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

/* ── 加载动画 ── */
#globe-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

#globe-loading.hidden {
    opacity: 0;
}

.globe-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,140,0,0.2);
    border-top-color: #ff8c00;
    border-radius: 50%;
    animation: globeSpin 0.8s linear infinite;
    margin-bottom: 8px;
}

@keyframes globeSpin {
    to { transform: rotate(360deg); }
}

#globe-loading span {
    font-size: 0.7em;
    color: var(--gray-color);
    letter-spacing: 0.05em;
}

/* ── 统计数字叠层 ── */
#globe-stats {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 10;
    text-align: right;
    pointer-events: none;
}

#globe-stats .stat-line {
    font-size: 0.68em;
    color: var(--gray-color);
    line-height: 1.8;
}

#globe-stats .stat-val {
    color: #ff8c00;
    font-weight: bold;
    font-size: 1.15em;
}

/* ── Tooltip ── */
#globe-tooltip {
    position: absolute;
    z-index: 30;
    background: rgba(20, 20, 20, 0.88);
    color: #eee;
    font-size: 0.72em;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,140,0,0.3);
    pointer-events: none;
    white-space: nowrap;
    display: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* ── 全宽行容器 ── */
.stats-grid-globe {
    max-width: 65%;
    margin: 6px auto;
}

.stats-grid-globe > div {
    flex: 1 1 100%;
}

@media (max-width: 650px) {
    .stats-grid-globe {
        max-width: 100%;
    }
}
