/*== 基础重置 ==*/
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body, #cesiumContainer {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #060a14;
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#cesiumContainer canvas {
    image-rendering: auto;
}

/* ================================================================
   加载动画
   ================================================================ */
.loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 9999;
    background: rgba(6, 10, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #00d4ff;
    font-size: 14px;
    letter-spacing: 3px;
    font-weight: 600;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(0, 212, 255, 0.18);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ================================================================
   飞行信息面板 — 玻璃拟态
   ================================================================ */
.flight-info {
    position: absolute;
    z-index: 3000;
    display: none;
    min-width: 200px;
    pointer-events: none;
    transform: translate(-50%, -100%);

    /* 玻璃拟态 */
    background: rgba(8, 14, 30, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);

    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 8px;
    box-shadow:
        0 8px 36px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(0, 212, 255, 0.06) inset,
        0 1px 0 rgba(255, 255, 255, 0.04) inset;

    overflow: hidden;
    transition: opacity 0.25s ease;
}

.flight-info.show {
    display: block;
    animation: panelIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-100% + 12px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, -100%);
    }
}

/* --- 面板头部 --- */
.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 10px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 212, 255, 0.03));
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.panel-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    background: linear-gradient(135deg, #00d4ff, #0090b8);
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.35);
}

.panel-header h3 {
    color: #e0f4ff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

/* --- 面板分区 --- */
.panel-section {
    padding: 8px 14px;
}

.panel-section + .panel-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- 遥测数据行 --- */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.info-row .label {
    color: rgba(180, 200, 220, 0.75);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.info-row .value {
    color: #d0e8f8;
    font-size: 12px;
    font-weight: 600;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'JetBrains Mono', monospace;
    letter-spacing: 0.2px;
}

/* 速度大号显示 — 用 ID 选择器自然覆盖 .info-row .value */
.info-row.highlight {
    padding: 6px 0 8px;
}

#speed {
    font-size: 24px;
    font-weight: 700;
    color: #00d4ff;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    letter-spacing: -0.5px;
}

/* 航班号高亮 */
#flightNo {
    color: #ffd60a;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- 状态指示 --- */
.status-section {
    background: rgba(0, 255, 100, 0.04);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 5px;
    vertical-align: middle;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }
    50%      { box-shadow: 0 0 12px rgba(34, 197, 94, 0.9); }
}

/* 异常警告状态 */
.flight-info.warning .status-section {
    background: rgba(255, 60, 48, 0.07);
}

.flight-info.warning .status-dot {
    background: #ff3b30;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.7);
    animation: warnPulse 0.8s ease-in-out infinite;
}

@keyframes warnPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 59, 48, 0.7);  transform: scale(1); }
    50%      { box-shadow: 0 0 16px rgba(255, 59, 48, 1);    transform: scale(1.4); }
}

.flight-info.warning #systemStatus {
    color: #ff6b60;
}

/* ================================================================
   相机跟随提示 — 顶部横幅
   ================================================================ */
.camera-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;

    /* 玻璃拟态 */
    background: rgba(8, 14, 30, 0.65);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    border: 1px solid rgba(0, 212, 255, 0.28);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 212, 255, 0.05) inset;

    color: #a0d8f0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.camera-hint.show {
    transform: translateX(-50%) translateY(0);
}

.lock-icon {
    font-size: 14px;
    animation: lockBounce 1.2s ease-in-out infinite;
}

@keyframes lockBounce {
    0%, 100% { transform: translateY(0); }
    40%      { transform: translateY(-3px); }
    60%      { transform: translateY(-1px); }
}

.hint-text {
    color: #00d4ff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hint-divider {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

.hint-action {
    color: rgba(180, 200, 220, 0.65);
    font-size: 12px;
    letter-spacing: 0.3px;
}

/* ================================================================
   日夜切换按钮
   ================================================================ */
.scene-mode-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1400;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 13px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    /* 玻璃拟态基底 */
    background: rgba(8, 14, 30, 0.6);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    border: 1px solid rgba(0, 212, 255, 0.2);
    color: #a0ddf8;

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(0, 212, 255, 0.04) inset;
}

.scene-mode-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(100, 100, 255, 0.04));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scene-mode-btn:hover {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow:
        0 6px 24px rgba(0, 212, 255, 0.12),
        0 0 0 1px rgba(0, 212, 255, 0.08) inset;
    transform: translateY(-1px);
}

.scene-mode-btn:hover::before {
    opacity: 1;
}

.scene-mode-btn:active {
    transform: translateY(0) scale(0.97);
}

.btn-icon {
    font-size: 15px;
    line-height: 1;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.scene-mode-btn:hover .btn-icon {
    transform: rotate(15deg) scale(1.1);
    filter: drop-shadow(0 0 6px rgba(255, 210, 10, 0.5));
}

.btn-label {
    line-height: 1;
}
