/*
 * 展厅大屏前端 · 藏青/藏蓝科技主题 / 1920×1080 等比缩放舞台 / A1~A8 布局
 * 全部样式本地文件；零外链字体、零外链图片、零构建产物。
 * 主题色：以藏青（navy blue）为底，整体明度较初版提升，避免展厅大屏发闷；
 * 保留深色科技指挥风格，图表强调色不变，保证对比度与长时间观看舒适度。
 */
:root {
  --xy-bg: #103b4c;
  --xy-bg-2: #1a5064;
  --xy-panel: rgba(22, 72, 90, 0.86);
  --xy-panel-2: rgba(28, 88, 108, 0.76);
  --xy-border: rgba(120, 200, 216, 0.38);
  --xy-border-strong: rgba(136, 226, 232, 0.62);
  --xy-cyan: #7ce4f2;
  --xy-blue: #4fb8d0;
  --xy-green: #6fdfb2;
  --xy-amber: #f5c67c;
  --xy-text: #ecfafb;
  --xy-sub: #b0d0ea;
  --xy-dim: #8aabce;
}
* { box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
  background: #0c2c3c; color: var(--xy-text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
#xy-viewport {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 40%, #1d5a70 0%, #144358 58%, #0c2c3c 100%);
  overflow: hidden;
}
/* 单一 transform：X / Y 独立缩放自动铺满全屏，内部布局不随视口 reflow */
#xy-stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(1);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(56, 158, 182, 0.30) 0%, rgba(0, 0, 0, 0) 62%),
    linear-gradient(180deg, #1a5064 0%, #154358 48%, #103b4c 100%);
  border: 1px solid rgba(120, 196, 214, 0.24);
}
.xy-region { position: absolute; }
.xy-panel {
  background: linear-gradient(180deg, var(--xy-panel) 0%, var(--xy-panel-2) 100%);
  border: 1px solid var(--xy-border);
  border-radius: 4px;
  box-shadow: inset 0 0 28px rgba(70, 170, 190, 0.16), 0 0 18px rgba(6, 28, 38, 0.36);
  overflow: hidden;
}
.xy-panel::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, rgba(124, 228, 242, 0) 0%, rgba(124, 228, 242, 0.62) 22%, rgba(99, 169, 234, 0.22) 78%, rgba(124, 228, 242, 0) 100%);
  pointer-events: none;
}
.xy-panel-title {
  position: relative; height: 34px; line-height: 34px; padding-left: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px; color: var(--xy-cyan);
  border-bottom: 1px solid rgba(120, 200, 216, 0.26);
  background: linear-gradient(90deg, rgba(30, 104, 128, 0.46) 0%, rgba(0, 0, 0, 0) 76%);
  white-space: nowrap;
}
.xy-panel-title::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px;
  vertical-align: 2px; border-radius: 1px; background: var(--xy-cyan);
  box-shadow: 0 0 8px rgba(124, 228, 242, 0.80);
}
.xy-canvas { display: block; width: 100%; }
.xy-hidden { display: none !important; }

/* ---------- A1 顶部通栏标题 ---------- */
#a1-title { left: 0; top: 0; width: 1920px; height: 76px; }
.xy-titlebar {
  background: linear-gradient(180deg, rgba(30, 70, 124, 0.94) 0%, rgba(20, 48, 92, 0.90) 100%);
  border-bottom: 1px solid rgba(136, 226, 232, 0.48);
  box-shadow: 0 6px 26px rgba(6, 28, 38, 0.42);
}
.xy-title-deco {
  position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px;
  background: linear-gradient(90deg, rgba(124, 228, 242, 0) 0%, rgba(124, 228, 242, 0.68) 30%, rgba(99, 169, 234, 0.42) 70%, rgba(124, 228, 242, 0) 100%);
  animation: xy-flow 9s linear infinite;
}
.xy-title-text {
  margin: 0; height: 76px; line-height: 76px; text-align: center;
  font-size: 34px; font-weight: 700; letter-spacing: 7px;
  color: #eefcfd; text-shadow: 0 0 16px rgba(84, 200, 210, 0.62), 0 0 44px rgba(60, 130, 200, 0.38);
}
.xy-title-right { position: absolute; right: 22px; top: 0; height: 76px; display: flex; align-items: center; gap: 16px; }
.xy-badge {
  display: inline-block; padding: 5px 12px; border-radius: 3px;
  font-size: 13px; letter-spacing: 1px; white-space: nowrap;
}
.xy-demo-badge {
  color: var(--xy-amber); border: 1px solid rgba(245, 198, 124, 0.58);
  background: rgba(96, 72, 28, 0.48);
}
.xy-status-note { font-size: 13px; color: var(--xy-sub); letter-spacing: 1px; }
/* 恢复主页面：纯视图复位控件，不发起任何写请求（只读展示） */
.xy-home-btn {
  cursor: pointer; padding: 6px 14px; border-radius: 3px;
  font-size: 13px; letter-spacing: 1px; color: #eefcfd;
  background: rgba(26, 96, 116, 0.92);
  border: 1px solid rgba(136, 226, 232, 0.62);
  transition: background 0.25s linear, border-color 0.25s linear;
}
.xy-home-btn:hover { background: rgba(36, 124, 146, 0.96); border-color: rgba(184, 234, 252, 0.92); }
.xy-home-btn:active { background: rgba(50, 150, 170, 1); }

/* ---------- A2 地球 / 卫星 ---------- */
#a2-globe { left: 1516px; top: 92px; width: 380px; height: 250px; }
#xy-globe-canvas { height: 190px; }

/* ---------- A3 左侧柱状 ---------- */
#a3-bars { left: 24px; top: 92px; width: 380px; height: 556px; }
#xy-bars-canvas { height: 498px; }

/* ---------- A4 右侧折线 ---------- */
#a4-lines { left: 1516px; top: 354px; width: 380px; height: 294px; }
.xy-line-item { padding: 5px 12px 0 12px; }
.xy-line-label { display: block; height: 19px; line-height: 19px; font-size: 12px; color: var(--xy-sub); letter-spacing: 1px; }
#xy-line-snr, #xy-line-loss, #xy-line-online { height: 56px; }

/* ---------- A5 中部地图 ---------- */
#a5-map { left: 420px; top: 92px; width: 1080px; height: 556px; }
.xy-map-surface {
  position: absolute; left: 8px; top: 40px; right: 8px; bottom: 8px;
  overflow: hidden; border: 1px solid rgba(120, 200, 216, 0.32);
  background: #123f54; cursor: grab;
  /* 堆叠上下文隔离：TMap 正式态 SDK 会在 surface 内部生成 z-index:1000 的
     全屏事件捕获 DIV；不隔离时它会越权压制 surface 外的兄弟元素
     （.xy-map-controls / .xy-level-note / .xy-map-badge / 详情弹窗），
     导致缩放按钮、L1~L5 链路按钮、弹窗关闭按钮全部点击失效。
     isolate 把 SDK 内部层级关进 surface，兄弟元素按自身 z-index 正常压栈。 */
  isolation: isolate;
}
.xy-map-surface:active { cursor: grabbing; }
.xy-grid-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.xy-map-layer {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none;
  /* 点位层位于 surface 内部，须压过 TMap 内部 z-index:1000 的事件捕获层；
     层自身 pointer-events:none 保证 SDK 原生拖拽/缩放不受影响，
     仅 .xy-point（pointer-events:auto）可被命中点击。降级态无 SDK 层，同样成立。 */
  z-index: 2000;
}
.xy-point {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: default; text-align: center;
  white-space: nowrap; transition: filter 0.4s linear;
}
.xy-point-icon {
  display: block; width: 22px; height: 22px; margin: 0 auto;
  animation: xy-breathe 3.4s ease-in-out infinite;
}
.xy-point-icon svg { display: block; width: 22px; height: 22px; }
.xy-point-name {
  display: block; margin-top: 2px; padding: 1px 6px; border-radius: 2px;
  font-size: 11px; line-height: 16px; color: #e2f2ff;
  background: rgba(14, 54, 68, 0.82); border: 1px solid rgba(120, 200, 216, 0.40);
}
.xy-point[data-clickable="1"] { cursor: pointer; }
.xy-point[data-clickable="1"]:hover { filter: drop-shadow(0 0 8px rgba(124, 228, 242, 0.85)); }
.xy-map-controls { position: absolute; right: 20px; top: 50px; display: flex; flex-direction: column; gap: 6px; z-index: 30; }
.xy-map-btn {
  width: 34px; height: 30px; padding: 0; cursor: pointer;
  color: var(--xy-cyan); font-size: 15px; line-height: 28px; text-align: center;
  background: rgba(20, 72, 90, 0.90); border: 1px solid rgba(130, 214, 220, 0.56);
  border-radius: 3px; transition: background 0.3s linear, border-color 0.3s linear;
}
.xy-map-btn:hover { background: rgba(30, 104, 124, 0.94); border-color: rgba(160, 228, 250, 0.88); }
.xy-level-btn { font-size: 12px; letter-spacing: 0; }
.xy-level-btn.xy-level-active { background: rgba(36, 116, 138, 0.96); border-color: var(--xy-cyan); }
.xy-level-note {
  position: absolute; left: 20px; bottom: 18px; z-index: 30;
  font-size: 12px; color: var(--xy-sub); letter-spacing: 1px;
  background: rgba(14, 54, 68, 0.74); padding: 3px 9px; border-radius: 2px;
}
.xy-map-badge {
  position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 40;
  color: var(--xy-amber); border: 1px solid rgba(245, 198, 124, 0.54);
  background: rgba(94, 68, 26, 0.82); letter-spacing: 2px;
  box-shadow: 0 0 16px rgba(6, 28, 38, 0.46);
}

/* ---------- A6 三面板 ---------- */
#a6-panels { left: 24px; top: 664px; width: 1872px; height: 300px; display: flex; gap: 16px; }
.xy-subpanel { position: relative; flex: 1 1 0; min-width: 0; }
.xy-image-frame {
  position: relative; margin: 10px 12px 0 12px; height: 212px; overflow: hidden;
  border: 1px solid rgba(120, 200, 216, 0.32); background: #1a5064;
}
.xy-image-view { display: block; width: 100%; height: 100%; object-fit: cover; }
.xy-image-meta {
  position: absolute; right: 8px; bottom: 8px; min-width: 190px;
  padding: 7px 10px; border-radius: 3px;
  background: rgba(12, 48, 62, 0.88); border: 1px solid rgba(130, 214, 220, 0.44);
  font-size: 11px; line-height: 17px; color: var(--xy-text);
}
.xy-meta-row { display: flex; justify-content: space-between; gap: 14px; }
.xy-meta-row span { color: var(--xy-sub); }
.xy-meta-row b { font-weight: 600; color: #f0f9ff; }
.xy-carousel-dots { display: flex; gap: 7px; justify-content: center; margin-top: 8px; }
.xy-dot { width: 18px; height: 4px; border-radius: 2px; background: rgba(130, 204, 214, 0.42); }
.xy-dot.xy-dot-active { background: var(--xy-cyan); box-shadow: 0 0 8px rgba(124, 228, 242, 0.75); }
.xy-message-list { padding: 10px 12px 0 12px; display: flex; flex-direction: column; gap: 7px; }
.xy-message-slot {
  height: 48px; padding: 5px 10px; border-radius: 3px;
  background: rgba(22, 74, 92, 0.68); border: 1px solid rgba(120, 200, 216, 0.28);
  font-size: 11px; line-height: 18px; color: var(--xy-text);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.xy-message-slot.xy-message-current {
  border-color: rgba(124, 228, 242, 0.68); background: rgba(28, 96, 116, 0.82);
  box-shadow: inset 0 0 14px rgba(56, 166, 182, 0.28);
}
.xy-message-slot[data-detail-key] { cursor: pointer; }
.xy-message-line { display: inline-block; margin-right: 14px; }
.xy-message-line span { color: var(--xy-sub); }
.xy-message-line b { font-weight: 600; color: #f0f9ff; }
#xy-donut-canvas { height: 224px; }

/* ---------- A7 事件滚动栏 ---------- */
#a7-events { left: 24px; top: 976px; width: 1872px; height: 62px; display: flex; align-items: center; }
.xy-events {
  background: linear-gradient(180deg, rgba(20, 72, 90, 0.92) 0%, rgba(14, 54, 68, 0.90) 100%);
}
.xy-events-label {
  flex: 0 0 128px; height: 100%; line-height: 60px; text-align: center;
  font-size: 14px; letter-spacing: 2px; color: var(--xy-cyan);
  border-right: 1px solid rgba(120, 200, 216, 0.32);
  background: linear-gradient(90deg, rgba(30, 104, 128, 0.48), rgba(0, 0, 0, 0));
}
.xy-events-window { flex: 1 1 auto; height: 100%; overflow: hidden; position: relative; }
.xy-events-track { display: flex; align-items: center; height: 100%; white-space: nowrap; will-change: transform; }
.xy-event-slot {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  height: 34px; margin: 0 14px; padding: 0 14px;
  border-radius: 3px; border: 1px solid rgba(120, 200, 216, 0.32);
  background: rgba(22, 74, 92, 0.64); font-size: 13px; color: var(--xy-text);
}
.xy-event-slot[data-detail-key] { cursor: pointer; }
.xy-event-type { color: var(--xy-green); margin-right: 10px; letter-spacing: 1px; }
.xy-event-text { color: #e8f5ff; }
.xy-event-time { color: var(--xy-dim); margin-left: 12px; font-size: 12px; }

/* ---------- A8 右下角固定署名 ---------- */
.xy-signature {
  position: absolute; right: 24px; top: 1044px; width: 620px; height: 28px;
  line-height: 28px; text-align: right; font-size: 14px; letter-spacing: 3px;
  color: var(--xy-sub); text-shadow: 0 0 12px rgba(44, 158, 176, 0.46);
}

/* ---------- 四类详情共用面板 ---------- */
.xy-detail-panel {
  position: absolute; right: 430px; top: 120px; width: 420px; z-index: 90;
  background: linear-gradient(180deg, rgba(28, 62, 110, 0.97), rgba(14, 54, 68, 0.97));
  border: 1px solid var(--xy-border-strong); border-radius: 4px;
  box-shadow: 0 16px 48px rgba(6, 28, 38, 0.66), inset 0 0 24px rgba(56, 166, 182, 0.20);
}
.xy-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; padding: 0 12px; border-bottom: 1px solid rgba(120, 200, 216, 0.36);
}
.xy-detail-title { font-size: 15px; letter-spacing: 2px; color: var(--xy-cyan); }
.xy-detail-actions { display: flex; align-items: center; gap: 8px; }
.xy-detail-reset {
  height: 26px; padding: 0 10px; cursor: pointer; font-size: 12px; letter-spacing: 1px;
  color: var(--xy-text); background: rgba(24, 82, 100, 0.76);
  border: 1px solid rgba(126, 208, 214, 0.44); border-radius: 3px;
}
.xy-detail-reset:hover { background: rgba(36, 124, 146, 0.96); color: #eefcfd; }
.xy-detail-close {
  width: 26px; height: 26px; padding: 0; cursor: pointer; font-size: 19px; line-height: 24px;
  color: var(--xy-sub); background: rgba(24, 82, 100, 0.76);
  border: 1px solid rgba(126, 208, 214, 0.44); border-radius: 3px;
}
.xy-detail-close:hover { color: #eefcfd; }
.xy-detail-body { padding: 10px 14px 16px 14px; max-height: 420px; overflow: hidden; }
.xy-detail-row {
  display: flex; justify-content: space-between; gap: 16px;
  min-height: 30px; line-height: 30px; font-size: 13px;
  border-bottom: 1px dashed rgba(120, 200, 216, 0.24);
}
.xy-detail-row span { color: var(--xy-sub); }
.xy-detail-row b { font-weight: 600; color: #eefcfd; text-align: right; }

/* ---------- 舒缓动画（低对比、无高频闪烁、无炫光堆叠） ---------- */
@keyframes xy-breathe {
  0%, 100% { opacity: 0.66; }
  50% { opacity: 1; }
}
@keyframes xy-flow {
  0% { opacity: 0.42; transform: translateX(-3%); }
  50% { opacity: 0.82; }
  100% { opacity: 0.42; transform: translateX(3%); }
}

/* ---------- V3.0 增量：软件版本 / 升级状态色标 ----------
   仅追加新 class，复用既有 --xy-* 变量；.xy-detail-* 及全部既有
   DOM 节点样式 0 改动。六态色标与后台 UPDATE_STATE_* 枚举同名同义。 */
.xy-v3-badge {
  position: absolute; right: 18px; bottom: 74px; z-index: 6;
  display: flex; gap: 14px; align-items: center;
  padding: 6px 12px; border-radius: 6px;
  background: rgba(12, 40, 62, 0.58);
  border: 1px solid rgba(120, 200, 216, 0.28);
  color: var(--xy-sub); font-size: 12px; letter-spacing: 0.4px;
}
.xy-v3-badge span + span { border-left: 1px solid rgba(120, 200, 216, 0.24); padding-left: 14px; }
.xy-v3-state-wait { color: var(--xy-sub); }
.xy-v3-state-running { color: #f0b96b; }
.xy-v3-state-success { color: #63d6a8; }
.xy-v3-state-failed { color: #f08a8a; }
