/* ========== Cesium 容器 ========== */
#cesiumContainer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    max-height: 960px;
    overflow: hidden;
    overscroll-behavior: contain;
}

@media screen and (max-width: 768px) {
    #cesiumContainer {
        height: 120vh;
        max-height: none;
    }
}

/* 强制隐藏原生 infoBox 及选择指示器 */
.cesium-infoBox,
.cesium-selection-wrapper,
.cesium-selection-indicator,
.cesium-infoBox-title,
.cesium-infoBox-camera {
    display: none !important;
}

/* ========== 自定义项目卡片（fixed 定位，突破容器）========== */
.cesium-overlay-card {
    position: fixed;          /* 关键：fixed 定位，悬浮在整个页面最上层 */
    left: 50%;
    top: 80px;                /* 导航栏下方，地球上方 */
    width: 320px;
    max-width: calc(100% - 20px);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    transform: translateX(-50%) translateY(12px) scale(0.96);
    z-index: 99999;           /* 最高层级，确保在最上层 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cesium-overlay-card.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* 关闭按钮 */
.overlay-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
    padding: 0;
}

.overlay-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 缩略图 */
.overlay-image {
    width: 100%;
    height: 0;
    padding-bottom: 66.67%;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.overlay-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cesium-overlay-card:hover .overlay-image img {
    transform: scale(1.05);
}

/* 内容区 */
.overlay-body {
    padding: 16px 18px 18px;
}

/* 分类标签 */
.overlay-meta {
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.overlay-meta a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.overlay-meta a:hover {
    color: #000;
}

/* 标题 */
.overlay-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: #111;
}

/* 摘要 */
.overlay-excerpt {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 按钮组 */
.overlay-actions {
    display: flex;
    gap: 10px;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    border: none;
    line-height: 1.4;
}

/* 聚焦按钮 */
.overlay-btn-focus {
    background: #1a1a1a;
    color: #fff;
}

.overlay-btn-focus:hover {
    background: #333;
}

.overlay-btn-focus svg {
    flex-shrink: 0;
}

/* 继续阅读按钮 */
.overlay-btn-read {
    background: #f2f2f2;
    color: #111;
}

.overlay-btn-read:hover {
    background: #e5e5e5;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    .cesium-overlay-card {
        width: 90vw;
        top: 60px;            /* 手机端：导航栏下方 */
        border-radius: 10px;
    }

    .overlay-body {
        padding: 14px 16px 16px;
    }

    .overlay-title {
        font-size: 15px;
    }

    .overlay-excerpt {
        font-size: 12px;
    }

    .overlay-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
}