/* ============================================================
   青屿科技 · 集团经营数据大屏
   独立视觉：深色、网格、霓虹
   ============================================================ */
:root {
  --cyan: #3fd8ff;
  --blue: #4a9bf0;
  --teal: #2bb3a0;
  --amber: #f0ad3c;
  --rose: #f2819c;
  --ink: #d7e9ff;
  --dim: #7f9dbd;
  --panel-line: rgba(87, 164, 255, .22);
  --sans: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; color: var(--ink); font-family: var(--sans);
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(38, 104, 196, .34), transparent 62%),
    radial-gradient(800px 500px at 88% 108%, rgba(43, 179, 160, .18), transparent 60%),
    radial-gradient(700px 480px at 8% 104%, rgba(109, 59, 212, .2), transparent 60%),
    #050c1a;
}
h1, h2 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

.wall {
  position: relative; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: clamp(8px, .9vw, 14px); padding: clamp(10px, 1.1vw, 20px);
}
.wall::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(87, 164, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 164, 255, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000, transparent 86%);
  mask-image: radial-gradient(circle at 50% 38%, #000, transparent 86%);
}
.wall::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background: linear-gradient(115deg, transparent 38%, rgba(63,216,255,.045) 39%, transparent 40%) 0 0 / 180px 180px,
              linear-gradient(58deg, transparent 44%, rgba(126,240,214,.04) 45%, transparent 46%) 20px 50px / 220px 220px;
  animation: atmosphere 18s linear infinite;
}

/* ---------- 顶部 ---------- */
.wall-head {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 2px 4px 12px; border-bottom: 1px solid rgba(87, 164, 255, .16);
}
.wall-back {
  justify-self: start; padding: 6px 14px; border-radius: 20px; font-size: 12px;
  color: #a9c6e2; border: 1px solid rgba(87, 164, 255, .3);
  background: rgba(12, 29, 53, .6); transition: color .25s, border-color .25s, background .25s;
}
.wall-back:hover { color: #eaf7ff; border-color: var(--cyan); background: rgba(63, 216, 255, .1); }
.wall-title { text-align: center; }
.wall-title span { font-size: 10px; letter-spacing: .34em; color: var(--dim); }
.wall-title h1 {
  margin-top: 5px; font-size: clamp(19px, 2.1vw, 32px); letter-spacing: .1em; font-weight: 800;
  background: linear-gradient(180deg, #ffffff, #8fd0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(63, 216, 255, .32));
}
.wall-clock { justify-self: end; text-align: right; }
.wall-clock b { display: block; font-size: clamp(16px, 1.5vw, 23px); letter-spacing: .07em; font-variant-numeric: tabular-nums; }
.wall-clock span { font-size: 11px; color: var(--dim); }

/* ---------- 主网格 ---------- */
.wall-main {
  position: relative; z-index: 1; min-height: 0; min-width: 0;
  display: grid; grid-template-columns: 1fr 1.62fr 1fr; gap: clamp(8px, .9vw, 14px);
}
.wall-col { display: grid; gap: clamp(8px, .9vw, 14px); min-height: 0; min-width: 0; }
.wall-col:nth-child(1) { grid-template-rows: auto 1.32fr 1fr; }
.wall-center { grid-template-rows: 1.78fr 1fr; }
.wall-col:nth-child(3) { grid-template-rows: 1fr 1fr 1fr; }

.panel {
  position: relative; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  padding: clamp(10px, .85vw, 14px) clamp(12px, 1vw, 16px);
  border: 1px solid var(--panel-line); border-radius: 10px;
  background: linear-gradient(160deg, rgba(16, 38, 70, .82), rgba(7, 16, 32, .88));
  box-shadow: inset 0 0 34px rgba(46, 118, 210, .07);
}
.panel::before,
.panel::after { content: ""; position: absolute; width: 13px; height: 13px; border: 1px solid rgba(63, 216, 255, .7); pointer-events: none; }
.panel::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.panel::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

.panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: clamp(12px, .95vw, 15px); font-weight: 700; letter-spacing: .06em;
}
.panel h2::before {
  content: ""; width: 3px; height: 12px; border-radius: 1px;
  background: var(--cyan); box-shadow: 0 0 9px var(--cyan);
}
.panel header i { font-style: normal; font-size: 11px; color: var(--dim); white-space: nowrap; }

/* ---------- KPI ---------- */
.panel-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  padding: 9px 12px; border-radius: 8px; min-width: 0;
  background: rgba(74, 155, 240, .07); border: 1px solid rgba(74, 155, 240, .16);
}
.kpi span { display: block; font-size: 11px; color: var(--dim); }
.kpi b {
  display: block; margin: 3px 0 2px; font-size: clamp(19px, 1.85vw, 28px);
  color: #eaf7ff; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(63, 216, 255, .38);
}
.kpi i { font-style: normal; font-size: 10.5px; color: var(--teal); }
.kpi i.down { color: var(--rose); }

/* ---------- 图表 ---------- */
.chart-line, .chart-area { position: relative; flex: 1; min-height: 0; }
.chart-line svg, .chart-area svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spark {
  fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(63, 216, 255, .65));
  stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s ease-out .2s forwards;
}
.spark.teal { stroke: var(--teal); filter: drop-shadow(0 0 5px rgba(43, 179, 160, .6)); }
.pts circle { fill: #061225; stroke: var(--cyan); stroke-width: 2; }

/* ---------- 排名 / 负荷 ---------- */
.rank { display: grid; gap: 9px; align-content: center; flex: 1; }
.rank li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; font-size: 12px; }
.rank span { color: #a9c6e2; white-space: nowrap; }
.rank b { color: var(--cyan); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank .track { height: 7px; border-radius: 4px; background: rgba(87, 164, 255, .12); overflow: hidden; }
.rank .track i {
  display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, rgba(74, 155, 240, .85), var(--cyan));
  box-shadow: 0 0 10px rgba(63, 216, 255, .45);
  transition: width 1.2s cubic-bezier(.22, .61, .36, 1);
}
.wall.is-live .rank .track i { width: var(--w); }
.bars .track i { background: linear-gradient(90deg, rgba(43, 179, 160, .85), #7ef0d6); box-shadow: 0 0 10px rgba(43, 179, 160, .45); }

/* ---------- 环形 ---------- */
.panel-donut { align-items: stretch; }
.donut { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; }
.donut::before {
  content: ""; width: auto; height: 88%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--cyan) 0 62%, var(--blue) 62% 86%, rgba(87, 164, 255, .16) 86% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  filter: drop-shadow(0 0 14px rgba(63, 216, 255, .35));
}
.donut span {
  position: absolute; text-align: center; font-size: 11px; color: var(--dim);
}
.donut b { display: inline-block; font-size: clamp(20px, 1.9vw, 28px); color: #eaf7ff; font-variant-numeric: tabular-nums; }
.donut-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--dim); }
.donut-legend li { display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.run { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot.idle { background: var(--blue); }
.dot.down { background: rgba(87, 164, 255, .35); }

/* ---------- 网络图 ---------- */
.panel-map { min-height: 0; }
.net { position: relative; flex: 1; min-height: 0; margin: 2px 0 6px; }
.net::before { content: ""; position: absolute; left: 50%; top: 50%; width: 66%; aspect-ratio: 1; transform: translate(-50%,-50%) rotate(30deg); border-radius: 28%; background: repeating-linear-gradient(0deg, rgba(63,216,255,.05) 0 1px, transparent 1px 17px), repeating-linear-gradient(90deg, rgba(63,216,255,.05) 0 1px, transparent 1px 17px); border: 1px solid rgba(63,216,255,.16); box-shadow: inset 0 0 48px rgba(63,216,255,.1), 0 0 45px rgba(63,216,255,.08); animation: atlasFloat 11s ease-in-out infinite; }
.net::after { content: ""; position: absolute; left: 50%; top: 50%; width: 49%; aspect-ratio: 1; transform: translate(-50%,-50%) rotate(45deg); border: 1px solid rgba(43,179,160,.42); border-radius: 26%; box-shadow: 0 0 28px rgba(43,179,160,.16), inset 0 0 30px rgba(43,179,160,.08); animation: atlasSpin 22s linear infinite; }
.net .ring {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: var(--d); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(87, 164, 255, .16); pointer-events: none;
}
.ring1 { --d: 34%; border-style: dashed; animation: spin 46s linear infinite; }
.ring2 { --d: 60%; border-color: rgba(87, 164, 255, .12); }
.ring3 { --d: 86%; border-color: rgba(87, 164, 255, .08); }
.net-links { position: absolute; inset: 0; width: 100%; height: 100%; }
.net-links path {
  fill: none; stroke: rgba(63, 216, 255, .55); stroke-width: 1.2; vector-effect: non-scaling-stroke;
  stroke-dasharray: 5 7; animation: dash 3.2s linear infinite;
}
.hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #04121f; letter-spacing: .06em;
  background: radial-gradient(circle at 36% 30%, #b9f2ff, var(--cyan) 62%, #1b9cc4);
  box-shadow: 0 0 0 8px rgba(63, 216, 255, .1), 0 0 30px rgba(63, 216, 255, .55);
}
.hub::after { content: ""; position: absolute; inset: -17px; border: 1px solid rgba(63,216,255,.5); border-radius: 50%; animation: hubPulse 2.8s ease-out infinite; }
.node {
  position: absolute; transform: translate(-50%, -50%);
  padding-left: 15px; font-size: 11.5px; color: #cfe7ff; white-space: nowrap;
}
.node::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.8s ease-in-out infinite;
}
.n1 { left: 50%; top: 8%; transform: translate(-50%, -50%) translateX(26px); }
.n2 { left: 84%; top: 32%; }
.n3 { left: 80%; top: 80%; }
.n4 { left: 50%; top: 94%; transform: translate(-50%, -50%) translateX(24px); }
.n5 { left: 14%; top: 76%; }
.n6 { left: 16%; top: 24%; }
.net-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.net-stats li {
  padding: 7px 10px; border-radius: 8px; text-align: center;
  background: rgba(74, 155, 240, .07); border: 1px solid rgba(74, 155, 240, .15);
}
.net-stats b { display: block; font-size: clamp(14px, 1.2vw, 18px); color: #eaf7ff; font-variant-numeric: tabular-nums; }
.net-stats em { font-style: normal; font-size: 10px; color: var(--dim); margin-left: 2px; }
.net-stats span { font-size: 10.5px; color: var(--dim); }

/* ---------- 实时事件 ---------- */
.feed { display: grid; gap: 7px; flex: 1; min-height: 0; overflow: hidden; align-content: start; }
.feed li {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline;
  padding: 7px 10px; border-radius: 7px; font-size: 12px; color: #a9c6e2;
  background: rgba(74, 155, 240, .06); border-left: 2px solid rgba(63, 216, 255, .5);
  animation: feedIn .45s ease both;
}
.feed time { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.feed b { color: var(--cyan); font-weight: 700; }

/* ---------- 底部 ---------- */
.wall-foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 16px;
  padding-top: 10px; border-top: 1px solid rgba(87, 164, 255, .16);
  font-size: 12px; color: var(--dim);
}
.ticker {
  flex: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.ticker ul { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.ticker li { padding-right: 42px; white-space: nowrap; color: #9fc3e4; }
.ticker b { color: var(--cyan); font-weight: 700; }
.wall-note { white-space: nowrap; font-size: 11px; }

/* ---------- 动效 ---------- */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dash { to { stroke-dashoffset: -24; } }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes atmosphere { to { background-position: 180px 180px, -200px 270px; } }
@keyframes atlasFloat { 0%,100% { transform: translate(-50%,-50%) rotate(30deg) scale(.96); opacity:.7; } 50% { transform: translate(-50%,-54%) rotate(38deg) scale(1.05); opacity:1; } }
@keyframes atlasSpin { to { transform: translate(-50%,-50%) rotate(405deg); } }
@keyframes hubPulse { 0% { opacity:.9; transform:scale(.5); } 100% { opacity:0; transform:scale(1.65); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .spark { stroke-dashoffset: 0; }
  .wall.is-live .rank .track i { width: var(--w); }
}

/* ---------- 小屏 ---------- */
@media (max-width: 1000px) {
  body { overflow: auto; }
  .wall { height: auto; min-height: 100dvh; gap: 12px; }
  .wall-head { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .wall-back { justify-self: start; }
  .wall-clock { justify-self: center; text-align: center; }
  .wall-clock b, .wall-clock span { display: inline; }
  .wall-clock span { margin-left: 10px; }
  .wall-main { grid-template-columns: 1fr; }
  .wall-col, .wall-center { grid-template-rows: none; }
  .wall-col:nth-child(1) { order: 2; }
  .wall-center { order: 1; }
  .wall-col:nth-child(3) { order: 3; }
  .panel { min-height: 190px; }
  .panel-kpi { min-height: 0; }
  .panel-map { min-height: 420px; }
  .panel-feed { min-height: 230px; }
  .panel-donut { min-height: 240px; }
  .chart-line, .chart-area { min-height: 150px; }
  .feed { flex: none; }
  .wall-foot { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 20px; }
  .ticker { width: 100%; }
  .wall-note { white-space: normal; }
}

@media (max-width: 560px) {
  .wall-title h1 { font-size: 18px; letter-spacing: .06em; }
  .panel-kpi { grid-template-columns: 1fr 1fr; }
  .kpi b { font-size: 20px; }
  .panel-map { min-height: 360px; }
  .net-stats li { padding: 6px 4px; }
  .feed li { font-size: 11.5px; }
}

/* 窗口不够高时按内容高度滚动，避免面板被裁切 */
@media (max-height: 720px) and (min-width: 1001px) {
  body { overflow: auto; }
  .wall { height: auto; min-height: 100dvh; }
  .wall-col, .wall-center { grid-template-rows: none; }
  .wall-col:nth-child(1), .wall-col:nth-child(3) { grid-template-rows: none; }
  .panel { min-height: 180px; }
  .panel-map { min-height: 380px; }
  .panel-feed { min-height: 215px; }
  .panel-donut { min-height: 225px; }
  .chart-line, .chart-area { min-height: 130px; }
  .feed { flex: none; }
}
