:root {
  --bg: #060a17;
  --bg2: #0a1122;
  --panel: rgba(13, 24, 44, 0.88);
  --panel-solid: #0d182c;
  --border: #1c3357;
  --border-lite: #16284a;
  --accent: #00b4d8;
  --accent2: #1e90ff;
  --gold: #f0c060;
  --green: #21e6a1;
  --yellow: #f5b50b;
  --red: #ff5b5b;
  --blue: #2b7fff;
  --text: #dbe7f5;
  --text2: #8aa0bd;
  --text3: #5a7396;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}
body {
  display: flex; align-items: center; justify-content: center;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0, 120, 255, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(0, 180, 216, 0.08), transparent 70%),
    radial-gradient(ellipse 40% 30% at 100% 100%, rgba(0, 180, 216, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(30, 60, 100, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 60, 100, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== 主容器：固定 32:9 画布 ===== */
#screen {
  position: relative; z-index: 1;
  width: 2560px; height: 720px;
  transform-origin: center center;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 12px 20px 8px;
  gap: 10px;
}

/* ===== 顶部标题栏 ===== */
.header {
  flex-shrink: 0;
  height: 54px;
  display: flex; align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(14, 28, 54, 0.95), rgba(10, 20, 40, 0.85));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 22px;
  position: relative;
}
.header::before {
  content: '';
  position: absolute; left: 18px; right: 18px; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.header-left {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text2);
  letter-spacing: 1px;
  min-width: 340px;
}
.logo-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}
.header-title { text-align: center; position: relative; }
.header-title h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 10px;
  background: linear-gradient(180deg, #ffffff 10%, #7fd4ff 55%, #2b8cd6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(0, 160, 255, 0.35);
  animation: titleGlow 3.5s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(0, 160, 255, 0.35)); }
  50% { filter: drop-shadow(0 0 32px rgba(0, 180, 216, 0.65)); }
}
.title-bar {
  width: 100%; height: 3px; margin-top: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #7fd4ff, var(--accent), transparent);
}
.header-right {
  display: flex; align-items: center; gap: 18px;
  font-size: 13px; color: var(--text2);
  min-width: 340px; justify-content: flex-end;
}
.wx-info { display: flex; align-items: center; gap: 6px; }
.wx-info::before {
  content: '☀'; font-size: 16px;
}
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.clock #clockTime {
  font-size: 19px; color: #fff; font-weight: 700;
  font-family: "Consolas", monospace;
  letter-spacing: 1px;
}
/* ===== 今日要情播报条 ===== */
.ticker {
  flex-shrink: 0;
  height: 30px;
  display: flex; align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(90deg, rgba(16, 32, 60, 0.92), rgba(8, 17, 34, 0.92));
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.ticker-label {
  flex-shrink: 0;
  font-size: 12px; font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #f0c060, #ff7a59);
  box-shadow: 0 0 10px rgba(240, 192, 96, 0.35);
}
.ticker-body {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden;
  font-size: 13px; color: var(--text);
  letter-spacing: 0.5px;
  line-height: 30px;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.tk-sep { margin: 0 10px; color: var(--text3); }
.tk-up { color: var(--green); }
.tk-down { color: var(--red); }
.tk-flat { color: var(--text3); }

/* ===== 主体 ===== */
.main {
  flex: 1;
  display: flex; gap: 10px;
  min-height: 0;
}
/* 左 / 中 / 右 = 1 : 3 : 1（左右各缩至 20%，中间地图占 60%） */
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.left { flex: 1 1 0; }
.center { flex: 3 1 0; }
.right { flex: 1 1 0; }

/* ===== 面板 ===== */
.panel {
  background: linear-gradient(180deg, rgba(14, 28, 54, 0.94), rgba(8, 17, 34, 0.94));
  border: 1px solid rgba(42, 78, 132, 0.55);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35), inset 0 0 26px rgba(0, 96, 190, 0.06);
}
.panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(0, 180, 216, 0.2) 45%, transparent 75%);
  opacity: 0.85;
}
.panel::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 40px; height: 40px;
  background: radial-gradient(circle at 100% 0%, rgba(0, 180, 216, 0.16), transparent 70%);
  pointer-events: none;
}
.panel.grow { flex: 1; min-height: 0; }
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
  flex-shrink: 0;
  height: 28px;
  margin-bottom: 4px;
}
.panel-title > span::before {
  content: '';
  display: inline-block;
  width: 4px; height: 15px;
  border-radius: 2px;
  margin-right: 9px;
  vertical-align: -2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 0 6px rgba(0, 180, 216, 0.6);
}
.panel-title .unit {
  font-style: normal;
  font-size: 11px; font-weight: 400;
  color: var(--text3);
  margin-left: auto;
}
.legend-inline {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text2);
}
.legend-inline .lg {
  width: 16px; height: 3px; border-radius: 2px;
  display: inline-block;
}
.lg-predict { background: var(--gold); }
.lg-real { background: var(--accent); }
.band-note {
  font-style: normal;
  font-size: 10px; color: var(--text3);
  border-left: 1px solid var(--border);
  padding-left: 8px; margin-left: 4px;
}

/* ===== Tab 切换 ===== */
.tab-group {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.tab {
  background: rgba(10, 22, 44, 0.8);
  border: none;
  color: var(--text2);
  font-size: 12px;
  padding: 2px 14px;
  cursor: pointer;
  transition: all .2s;
}
.tab + .tab { border-left: 1px solid var(--border); }
.tab.active {
  background: linear-gradient(180deg, rgba(0, 140, 200, 0.45), rgba(0, 90, 160, 0.3));
  color: #fff;
}

/* ===== KPI 卡片 ===== */
.kpi-panel { flex-shrink: 0; }
.kpi-cards {
  display: flex; gap: 8px;
  margin-top: 2px;
}
.kpi-card {
  flex: 1;
  background: linear-gradient(180deg, rgba(20, 40, 75, 0.55), rgba(12, 24, 46, 0.55));
  border: 1px solid var(--border-lite);
  border-radius: 5px;
  padding: 9px 10px 7px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.kpi-card:hover {
  border-color: rgba(0, 180, 216, 0.5);
  box-shadow: 0 0 16px rgba(0, 140, 210, 0.2), inset 0 0 14px rgba(0, 140, 210, 0.06);
  transform: translateY(-2px);
}
.kpi-card::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
}
.kpi-card:nth-child(2)::after { background: linear-gradient(180deg, transparent, var(--gold), transparent); }
.kpi-card:nth-child(3)::after { background: linear-gradient(180deg, transparent, var(--green), transparent); }
.kpi-label {
  font-size: 12px; color: var(--text2);
  margin-bottom: 4px;
  white-space: nowrap;
}
.kpi-value {
  font-size: 26px; font-weight: 800;
  color: var(--accent);
  font-family: "Consolas", "Microsoft YaHei", monospace;
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(0, 180, 216, 0.4);
}
.kpi-card:nth-child(2) .kpi-value { color: var(--gold); text-shadow: 0 0 12px rgba(240, 192, 96, 0.4); }
.kpi-card:nth-child(3) .kpi-value { color: var(--green); text-shadow: 0 0 12px rgba(33, 230, 161, 0.4); }
.kpi-value i {
  font-style: normal;
  font-size: 12px; font-weight: 400;
  color: var(--text3);
  margin-left: 3px;
}
.kpi-tip { font-size: 10px; color: var(--text3); margin-top: 3px; }
.kpi-progress {
  margin-top: 3px;
  height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.kpi-progress i {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

/* ===== 图表容器 ===== */
.chart { flex: 1; min-height: 0; }

/* ===== 地图面板 ===== */
.map-panel { flex: 1; min-height: 0; padding: 6px 10px; }
.map-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 28px; flex-shrink: 0;
  padding: 0 4px;
}
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text2);
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  padding: 1px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
}
.breadcrumb a:hover { border-color: var(--accent); background: rgba(0,180,216,0.1); }
.breadcrumb a.cur {
  color: #fff;
  background: linear-gradient(180deg, rgba(0,140,200,0.35), rgba(0,90,160,0.25));
  border-color: var(--accent);
}
.map-tools { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text2); }
#btnBack {
  background: rgba(0, 120, 180, 0.15);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 12px;
  padding: 2px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .2s;
  margin-left: 6px;
}
#btnBack:hover { background: rgba(0, 180, 216, 0.35); }
#btnBack.hidden { visibility: hidden; }

.map-chart {
  flex: 1;
  min-height: 0;
  background-color: rgba(8, 18, 36, 0.35);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(0, 120, 220, 0.1), transparent 70%),
    linear-gradient(90deg, rgba(44,79,133,0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(44,79,133,0.09) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* 饱和度浮窗轮播 */
.sat-popup {
  position: absolute;
  top: 46px; right: 16px;
  width: 230px;
  background: rgba(8, 18, 36, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.sat-popup-title {
  font-size: 11px; color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.sat-popup-title::before {
  content: '';
  width: 12px; height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--gold), #ff7a59);
}
.sat-popup-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(60, 90, 140, 0.3);
}
.sat-popup-row:last-child { border-bottom: none; }
.sat-popup-name { color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sat-popup-num { color: var(--text2); font-size: 11px; }
.sat-popup-sat { font-weight: 700; }
.sat-lv-low { color: var(--green); }
.sat-lv-mid { color: var(--yellow); }
.sat-lv-high { color: var(--red); }

/* 景区饱和度图例（地图左下角） */
.map-legend {
  position: absolute;
  left: 18px; bottom: 52px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 10;
}
.legend-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 14px;
  background: rgba(8, 18, 36, 0.95);
  border: 1px solid rgba(56, 96, 160, 0.6);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.55), inset 0 0 10px rgba(0, 120, 220, 0.08);
  backdrop-filter: blur(3px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.legend-chip:hover { transform: translateX(3px); box-shadow: 0 2px 16px rgba(0, 140, 220, 0.35); }
.legend-chip.c-blue::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.legend-chip.c-green::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.legend-chip.c-red::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }

/* 地图角标统计（右下角） */
.map-corner {
  position: absolute;
  right: 16px; bottom: 50px;
  display: flex; gap: 8px;
  z-index: 10;
}
.map-corner > div {
  background: rgba(8, 18, 36, 0.85);
  border: 1px solid var(--border-lite);
  border-radius: 5px;
  padding: 5px 12px;
  text-align: center;
  min-width: 78px;
}
.map-corner b { display: block; font-size: 18px; color: var(--accent); }
.map-corner span { font-size: 10px; color: var(--text3); }

/* ===== 时间控件 ===== */
.time-panel {
  flex-shrink: 0;
  height: 56px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
}
.play-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: radial-gradient(circle, rgba(0, 180, 216, 0.3), rgba(0, 90, 160, 0.2));
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.4);
}
.play-btn:hover { background: radial-gradient(circle, rgba(0, 180, 216, 0.55), rgba(0, 120, 190, 0.35)); }
.time-label {
  font-size: 13px; color: var(--text2);
  white-space: nowrap;
}
.time-label b {
  font-size: 22px; color: var(--accent);
  font-family: "Consolas", monospace;
  margin-left: 4px;
}
.time-slider { flex: 1; min-width: 0; position: relative; top: 4px; }
.time-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0f7ac0, #21c7e8);
  outline: none;
}
.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 30%, #21c7e8 65%);
  border: 2px solid #21c7e8;
  box-shadow: 0 0 10px rgba(33, 199, 232, 0.7);
  cursor: pointer;
}
.time-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 30%, #21c7e8 65%);
  border: 2px solid #21c7e8;
  box-shadow: 0 0 10px rgba(33, 199, 232, 0.7);
  cursor: pointer;
}
.time-scale {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text3);
  position: absolute;
  left: 12px; right: 12px; bottom: 8px;
  padding: 0 22px;
  pointer-events: none;
}

/* ===== 景区客流趋势 ===== */
.trend-panel { flex: 0 0 205px; }

/* ===== 景区列表 ===== */
.list-panel .scenic-table-wrap { flex: 1; min-height: 0; overflow-y: auto; }
.scenic-table-wrap::-webkit-scrollbar { width: 4px; }
.scenic-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.scenic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.scenic-table thead th {
  position: sticky; top: 0;
  background: rgba(10, 22, 44, 0.98);
  color: var(--text2);
  font-weight: 600;
  padding: 5px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  z-index: 2;
}
.scenic-table td {
  padding: 4px 4px;
  text-align: center;
  border-bottom: 1px solid rgba(30, 50, 90, 0.35);
  color: var(--text);
  white-space: nowrap;
}
.scenic-table tbody tr {
  cursor: pointer;
  transition: background .2s;
}
.scenic-table tbody tr:hover { background: rgba(0, 180, 216, 0.08); }
.scenic-table tbody tr.active {
  background: rgba(0, 180, 216, 0.18);
  box-shadow: inset 2px 0 0 var(--accent);
}
.scenic-table tr.warn-sat td:last-child { color: var(--yellow); }
.scenic-table tr.over-sat td:last-child { color: var(--red); }
.c-rank { width: 30px; }
.c-name { text-align: left !important; }
.c-num { width: 60px; }
.c-sat { width: 62px; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--text3); }
.sat-bar-cell { position: relative; }
.sat-bar {
  position: absolute; left: 2px; right: 2px; bottom: 1px;
  height: 3px; border-radius: 2px;
  background: rgba(0, 180, 216, 0.5);
}
.sat-lv0 { color: var(--green); }
.sat-lv1 { color: var(--yellow); }
.sat-lv2 { color: var(--red); }

/* ===== 页脚 ===== */
.footer-note {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(10, 20, 40, 0.9) 20%, rgba(10, 20, 40, 0.9) 80%, transparent);
  padding: 2px 0;
  pointer-events: none;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1c3357; border-radius: 3px; }
