/* ============================================================
 * 幸福容西智慧社区大屏 Demo - 科技蓝设计规范样式
 * 与 MicroCommunityWeb/public/bigScreen 保持同一设计体系
 * 标准分辨率 1920x1080, 通过 #screen-viewport scale 等比缩放
 * ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #01041a;
  color: #d6f4ff;
}

/* ---------------- 缩放视口 ---------------- */
#screen-viewport {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #050d2a 0%, #01041a 70%);
}

#screen-canvas {
  position: relative;
  width: 1920px;
  height: 1080px;
  flex-shrink: 0;
  transform-origin: center center;
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 100, 255, 0.15) 0%, transparent 55%),
    linear-gradient(160deg, #030f28 0%, #081a3d 50%, #030f28 100%);
  overflow: hidden;
  box-shadow: 0 0 120px rgba(0, 120, 255, 0.25);
}

/* ---------------- 背景网格与扫描光 ---------------- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.85) 0%, transparent 78%);
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(0, 220, 255, 0.09), transparent);
  animation: scan-move 9s linear infinite;
  pointer-events: none;
}

@keyframes scan-move {
  0%   { top: -15%; }
  100% { top: 115%; }
}

/* 粒子光斑 */
.bg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ---------------- 顶部 Header ---------------- */
.screen-header {
  position: absolute;
  top: 14px;
  left: 50px;
  right: 50px;
  height: 72px;
  z-index: 10;
}

.header-main {
  position: relative;
  height: 100%;
  background: linear-gradient(180deg, rgba(4, 30, 70, 0.6), rgba(2, 16, 45, 0.4));
  border: 1px solid rgba(0, 200, 255, 0.35);
  border-radius: 4px;
  clip-path: polygon(36px 0, calc(100% - 36px) 0, 100% 16px, 100% 100%, 0 100%, 0 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  box-shadow:
    inset 0 0 24px rgba(0, 160, 255, 0.12),
    0 0 18px rgba(0, 160, 255, 0.20);
}

.header-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00e5ff, #0099ff, #00e5ff, transparent);
  animation: header-flow 4s linear infinite;
  background-size: 200% 100%;
}

@keyframes header-flow {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 280px;
}

.community-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: rgba(0, 80, 160, 0.25);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  font-size: 16px;
  color: #7ee7ff;
  letter-spacing: 1px;
}

.community-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 8px #00f2fe;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(1.5); }
}

.header-center {
  text-align: center;
}

.screen-main-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 6px;
  background: linear-gradient(180deg, #ffffff 20%, #8ee9ff 60%, #38b6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 26px rgba(0, 180, 255, 0.35);
  white-space: nowrap;
}

.header-subtitle {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(120, 200, 255, 0.65);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 280px;
  justify-content: flex-end;
}

.online-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(0, 242, 254, 0.45);
  background: rgba(0, 180, 200, 0.12);
  border-radius: 20px;
  font-size: 14px;
  color: #6ff6ff;
}

.online-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ffa8;
  box-shadow: 0 0 8px #00ffa8;
}

.header-clock {
  font-size: 20px;
  color: #bdefff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

/* ---------------- 屏幕切换 Tab ---------------- */
.screen-tabs {
  position: absolute;
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  background: rgba(3, 20, 58, 0.82);
  border: 1px solid rgba(0, 200, 255, 0.42);
  border-radius: 24px;
  box-shadow:
    inset 0 0 16px rgba(0, 140, 255, 0.18),
    0 0 20px rgba(0, 180, 255, 0.28);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.screen-tab-btn {
  padding: 6px 24px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(210, 240, 255, 0.88);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  letter-spacing: 1.5px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.screen-tab-btn:hover {
  color: #ffffff;
  background: rgba(0, 180, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.35);
}

.screen-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 120, 255, 0.9), rgba(0, 220, 255, 0.9));
  border: 1px solid rgba(140, 245, 255, 0.85);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.65);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* ---------------- 主布局三栏 ---------------- */
.screen-body {
  position: absolute;
  top: 144px;
  left: 50px;
  right: 50px;
  bottom: 44px;
  display: flex;
  gap: 22px;
}

.col-left,
.col-right {
  width: 430px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.col-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------------- 科技感切角卡片 ---------------- */
.cyber-card {
  position: relative;
  background: linear-gradient(160deg, rgba(4, 26, 78, 0.82), rgba(2, 14, 46, 0.78));
  border: 1px solid rgba(0, 190, 255, 0.36);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  box-shadow:
    inset 0 0 24px rgba(0, 140, 255, 0.12),
    0 0 18px rgba(0, 120, 255, 0.18);
  padding: 14px 16px;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

/* 四角装饰折线 */
.cyber-card .corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.corner-tl { top: -1px; left: -1px; border-top: 2.5px solid #00f2fe; border-left: 2.5px solid #00f2fe; box-shadow: 0 0 12px rgba(0, 242, 254, 0.8), 0 0 20px rgba(0, 229, 255, 0.4); }
.corner-tr { top: -1px; right: -1px; border-top: 2.5px solid #00f2fe; border-right: 2.5px solid #00f2fe; box-shadow: 0 0 12px rgba(0, 242, 254, 0.8), 0 0 20px rgba(0, 229, 255, 0.4); }
.corner-bl { bottom: -1px; left: -1px; border-bottom: 2.5px solid #00f2fe; border-left: 2.5px solid #00f2fe; box-shadow: 0 0 12px rgba(0, 242, 254, 0.8), 0 0 20px rgba(0, 229, 255, 0.4); }
.corner-br { bottom: -1px; right: -1px; border-bottom: 2.5px solid #00f2fe; border-right: 2.5px solid #00f2fe; box-shadow: 0 0 12px rgba(0, 242, 254, 0.8), 0 0 20px rgba(0, 229, 255, 0.4); }

/* 卡片小标题 (527 科技蓝菱形装饰) */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 5px 8px;
  background: linear-gradient(90deg, rgba(0, 110, 240, 0.28), rgba(0, 50, 120, 0.06));
  border-radius: 4px;
}

.card-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
  white-space: nowrap;
}

.card-title::before {
  content: '◆';
  font-size: 12px;
  color: #00f2fe;
  text-shadow: 0 0 10px #00f2fe, 0 0 18px #00e5ff;
  display: inline-block;
}

.card-header .deco-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.9), rgba(0, 140, 255, 0.35) 60%, transparent);
  border-radius: 1px;
}

.card-header .deco-tag {
  font-size: 12px;
  color: rgba(0, 229, 255, 0.85);
  letter-spacing: 1px;
  font-weight: 600;
}

/* ---------------- KPI 卡片 ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi-card {
  position: relative;
  padding: 14px 12px 10px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 60, 140, 0.42), rgba(0, 25, 75, 0.32));
  border: 1px solid rgba(0, 200, 255, 0.38);
  box-shadow: inset 0 0 18px rgba(0, 150, 255, 0.15);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 22px rgba(0, 180, 255, 0.25), 0 0 14px rgba(0, 200, 255, 0.3);
}

.kpi-card .kpi-label {
  font-size: 14px;
  color: rgba(180, 230, 255, 0.88);
  letter-spacing: 2px;
  font-weight: 500;
}

.kpi-card .kpi-value {
  margin-top: 4px;
  font-size: 38px;
  font-weight: 800;
  font-family: 'DIN Alternate', 'DIN', 'Arial', sans-serif;
  color: #00f2fe;
  text-shadow: 0 0 18px rgba(0, 242, 254, 0.65);
  font-variant-numeric: tabular-nums;
}

.kpi-card .kpi-value .unit {
  font-size: 16px;
  color: rgba(180, 230, 255, 0.75);
  margin-left: 3px;
  font-weight: 500;
}

.kpi-card.accent .kpi-value { color: #ffce54; text-shadow: 0 0 18px rgba(255, 206, 84, 0.65); }
.kpi-card.green .kpi-value { color: #35f2a0; text-shadow: 0 0 18px rgba(53, 242, 160, 0.65); }
.kpi-card.orange .kpi-value { color: #ff9d4d; text-shadow: 0 0 18px rgba(255, 157, 77, 0.65); }

/* ---------------- 指标列表 ---------------- */
.metric-list {
  list-style: none;
}

.metric-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 1px dashed rgba(0, 180, 255, 0.14);
  font-size: 16px;
}

.metric-list li:last-child { border-bottom: none; }

.metric-list .m-label {
  color: rgba(190, 225, 255, 0.85);
  letter-spacing: 1px;
}

.metric-list .m-value {
  color: #00e5ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------------- ECharts 容器 ---------------- */
.chart {
  width: 100%;
  height: 100%;
  min-height: 120px;
}

/* ---------------- 无缝滚动列表 ---------------- */
.seamless-box {
  overflow: hidden;
  position: relative;
  height: 100%;
}

.seamless-track {
  will-change: transform;
}

.seamless-track.clone {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
}

.scroll-list {
  list-style: none;
}

.scroll-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px dashed rgba(0, 160, 255, 0.12);
  font-size: 14px;
  white-space: nowrap;
}

.scroll-list .s-time {
  color: rgba(160, 210, 255, 0.6);
  font-variant-numeric: tabular-nums;
  width: 78px;
}

.scroll-list .s-community {
  color: #a9e6ff;
  width: 96px;
}

.scroll-list .s-type {
  flex: 1;
  color: #dfefff;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 10px;
  letter-spacing: 1px;
  border: 1px solid transparent;
}

.status-done    { color: #35f2a0; border-color: rgba(53, 242, 160, 0.5); background: rgba(53, 242, 160, 0.1); }
.status-rectify { color: #38b6ff; border-color: rgba(56, 182, 255, 0.5); background: rgba(56, 182, 255, 0.1); }
.status-review  { color: #ffce54; border-color: rgba(255, 206, 84, 0.5); background: rgba(255, 206, 84, 0.1); }
.status-receive { color: #c86bff; border-color: rgba(200, 107, 255, 0.5); background: rgba(200, 107, 255, 0.1); }
.status-todo    { color: #ff9d4d; border-color: rgba(255, 157, 77, 0.5); background: rgba(255, 157, 77, 0.1); }

/* ---------------- 底部摘要条 ---------------- */
.bottom-summary {
  position: absolute;
  left: 50px;
  right: 50px;
  bottom: 8px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  border-top: 1px solid rgba(0, 160, 255, 0.2);
  background: linear-gradient(90deg, transparent, rgba(0, 60, 140, 0.3), transparent);
  font-size: 15px;
  color: rgba(190, 230, 255, 0.85);
  z-index: 5;
}

.bottom-summary .bs-item {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}

.bottom-summary .bs-num {
  color: #00f2fe;
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(0, 230, 255, 0.5);
}

.bottom-summary .bs-sep {
  color: rgba(0, 160, 255, 0.3);
}

/* ---------------- 容西 18 社区地图 ---------------- */
.rongxi-map {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 100, 220, 0.18) 0%, transparent 62%),
    linear-gradient(180deg, rgba(0, 40, 90, 0.25), rgba(0, 15, 40, 0.4));
  border: 1px solid rgba(0, 150, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.rongxi-map canvas {
  position: absolute;
  inset: 0;
}

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 3;
}

.map-node .dot-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 229, 255, 0.5);
  border-radius: 50%;
  animation: ring-pulse 2.2s ease-out infinite;
}

.map-node .dot-core {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b8f4ff, #00c8ff 55%, #0055ff);
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.9);
}

@keyframes ring-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; }
}

.map-node .node-label {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  color: rgba(200, 235, 255, 0.85);
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0, 150, 255, 0.8);
}

/* 点击弹窗 */
.community-popover {
  position: absolute;
  z-index: 20;
  width: 240px;
  padding: 12px 14px;
  background: rgba(4, 22, 60, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.6);
  border-radius: 4px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(0, 180, 255, 0.35);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%, 0 10px);
  display: none;
}

.community-popover.show {
  display: block;
  animation: pop-in 0.25s ease-out;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.community-popover .pop-title {
  font-size: 17px;
  color: #8ee9ff;
  letter-spacing: 2px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.3);
  padding-bottom: 6px;
}

.community-popover .pop-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  color: rgba(200, 230, 255, 0.9);
}

.community-popover .pop-row b {
  color: #00f2fe;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 人口大屏四联 ---------------- */
.quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.quad-grid .cyber-card {
  min-height: 0;
}

/* 水球容器 */
.liquidfill-box {
  width: 100%;
  height: 100%;
}

/* ---------------- 环形徽标 ---------------- */
.ring-badge {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---------------- 排行榜 ---------------- */
.rank-list {
  list-style: none;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  font-size: 14px;
  border-bottom: 1px dashed rgba(0, 160, 255, 0.12);
}

.rank-list .rank-no {
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  border-radius: 3px;
  background: rgba(0, 120, 220, 0.25);
  color: #7ee7ff;
}

.rank-list li:nth-child(1) .rank-no { background: rgba(255, 206, 84, 0.25); color: #ffce54; }
.rank-list li:nth-child(2) .rank-no { background: rgba(200, 200, 210, 0.22); color: #cfd8e6; }
.rank-list li:nth-child(3) .rank-no { background: rgba(255, 157, 77, 0.22); color: #ff9d4d; }

.rank-list .rank-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(210, 235, 255, 0.9);
}

.rank-list .rank-bar {
  width: 90px;
  height: 6px;
  background: rgba(0, 100, 200, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.rank-list .rank-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0077ff, #00e5ff);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.6);
}

.rank-list .rank-count {
  color: #00f2fe;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  width: 70px;
  text-align: right;
}

/* ---------------- 特殊人群标签 ---------------- */
.special-tag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.special-tag {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(0, 70, 160, 0.38), rgba(0, 30, 90, 0.25));
  border: 1px solid rgba(0, 200, 255, 0.38);
  border-left: 3.5px solid #ffce54;
  box-shadow: inset 0 0 12px rgba(0, 150, 255, 0.12);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%, 0 6px);
  transition: transform 0.2s ease;
}

.special-tag:hover {
  transform: translateX(2px);
}

.special-tag .st-name {
  font-size: 15px;
  color: #d6f2ff;
  letter-spacing: 1px;
  font-weight: 500;
}

.special-tag .st-count {
  margin-top: 2px;
  font-size: 26px;
  font-weight: 800;
  font-family: 'DIN Alternate', 'DIN', 'Arial', sans-serif;
  color: #ffce54;
  text-shadow: 0 0 14px rgba(255, 206, 84, 0.6);
  font-variant-numeric: tabular-nums;
}

.special-tag .st-count .unit {
  font-size: 13px;
  color: rgba(200, 230, 255, 0.7);
  margin-left: 4px;
  font-weight: 500;
}

/* ---------------- 头部指标条(物业屏) ---------------- */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metrics-bar .kpi-card .kpi-value {
  font-size: 34px;
}

/* ---------------- 隐藏/显示 屏幕 ---------------- */
.screen-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.screen-panel.active {
  display: flex;
}

/* ---------------- 状态 tag ---------------- */
.auto-play-tag {
  font-size: 13px;
  color: rgba(0, 229, 255, 0.75);
  letter-spacing: 1px;
  cursor: pointer;
  border: 1px dashed rgba(0, 200, 255, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  transition: all 0.2s;
}

.auto-play-tag:hover { color: #fff; border-color: #00e5ff; background: rgba(0, 120, 200, 0.2); }
.auto-play-tag.on { color: #35f2a0; border-color: rgba(53, 242, 160, 0.6); background: rgba(53, 242, 160, 0.1); }

/* ---------------- 滚动条美化 ---------------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: rgba(0, 60, 130, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(0, 200, 255, 0.4); border-radius: 2px; }