* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #060d1f; --panel: rgba(16, 32, 64, 0.55); --panel-br: rgba(64, 158, 255, 0.25);
  --cyan: #25d8e8; --blue: #2e86de; --txt: #cfe3ff; --txt-dim: #7f9bc4;
  --red: #d7263d; --orange: #f46036; --yellow: #f5c518; --lblue: #2e86de; --green: #27ae60;
}
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--txt); overflow: hidden;
  background-image: radial-gradient(circle at 20% 10%, rgba(37,216,232,.08), transparent 40%),
                    radial-gradient(circle at 80% 90%, rgba(46,134,222,.10), transparent 45%);
}
#app { height: 100vh; display: flex; flex-direction: column; padding: 0 18px 16px; }

/* 滚动广播条 */
.marquee {
  display: flex; align-items: center; height: 32px; margin: 6px -18px 6px;
  background: linear-gradient(90deg, rgba(215,38,61,.15), rgba(244,96,54,.08) 30%, rgba(10,22,48,.5));
  border-bottom: 1px solid rgba(215,38,61,.4); position: relative; overflow: hidden;
}
.marquee::before {
  content: '📢 实时广播'; color: var(--red); font-weight: 700; font-size: 13px;
  padding: 0 14px; background: rgba(215,38,61,.2); height: 100%; display: flex; align-items: center;
  flex-shrink: 0; letter-spacing: 1px; z-index: 2; border-right: 1px solid rgba(215,38,61,.5);
}
.marquee-track { display: inline-flex; gap: 0; flex-shrink: 0; animation: marquee-scroll 90s linear infinite; padding-left: 14px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 13px;
  white-space: nowrap; color: var(--txt); border-right: 1px dashed rgba(255,255,255,.15); }
.marquee-item .lv-pill { font-size: 10px; padding: 1px 6px; border-radius: 2px; color: #fff; font-weight: 600; }
.marquee-item.lv1 .lv-pill { background: var(--red); animation: pulse 1.4s infinite; }
.marquee-item.lv2 .lv-pill { background: var(--orange); }
.marquee-item.lv3 .lv-pill { background: var(--yellow); color: #4a3a00; }
.marquee-item.lv4 .lv-pill { background: var(--lblue); }
.marquee-item.lv0 .lv-pill { background: var(--cyan); color: var(--bg); }
.marquee-item.lv1 .text { color: #ffb0b8; font-weight: 600; }
.marquee-item.lv2 .text { color: #ffd0bd; }
.marquee-item .time { color: var(--txt-dim); font-size: 11px; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-empty { color: var(--txt-dim); font-size: 12px; padding: 0 18px; }

/* 顶栏 */
.topbar { display: flex; align-items: center; justify-content: space-between;
  height: 64px; border-bottom: 1px solid var(--panel-br); position: relative; margin-bottom: 12px; }
.topbar::after { content:''; position:absolute; left:0; bottom:-1px; width:100%; height:2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity:.6; }
.title { font-size: 30px; font-weight: 700; letter-spacing: 3px;
  background: linear-gradient(90deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 20px rgba(37,216,232,.3); }
.subtitle { font-size: 13px; color: var(--txt-dim); margin-top: 4px; letter-spacing: 1px; }
.topinfo { text-align: right; font-size: 13px; color: var(--txt-dim); }
.topinfo .clock { font-size: 22px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.adminlink { color: var(--txt-dim); text-decoration: none; border: 1px solid var(--panel-br);
  padding: 4px 12px; border-radius: 4px; font-size: 12px; margin-left: 12px; }
.adminlink:hover { color: var(--cyan); border-color: var(--cyan); }

/* 三栏布局 */
.main { flex: 1; display: grid; grid-template-columns: 340px 1fr 360px; gap: 14px; min-height: 0; }
.col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.panel { background: var(--panel); border: 1px solid var(--panel-br); border-radius: 8px;
  padding: 12px 14px; display: flex; flex-direction: column; min-height: 0; position: relative;
  backdrop-filter: blur(4px); }
.panel::before { content:''; position:absolute; top:0; left:14px; width:28px; height:2px; background:var(--cyan); }
.panel h3 { font-size: 15px; font-weight: 600; color: #eaf4ff; margin-bottom: 10px; letter-spacing: 1px;
  display: flex; align-items: center; gap: 6px; }
.panel h3 small { color: var(--txt-dim); font-weight: 400; font-size: 11px; }
.lyr { background: rgba(255,255,255,.06); color: var(--txt-dim); border: 1px solid var(--panel-br);
  padding: 2px 8px; border-radius: 3px; cursor: pointer; font-size: 11px; font-family: inherit; white-space: nowrap; }
.lyr.on { background: rgba(37,216,232,.18); color: var(--cyan); border-color: var(--cyan); }
.lyr:hover { color: #fff; }
.grow { flex: 1; min-height: 0; }

/* 指标卡 */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: rgba(10,22,48,.5); border: 1px solid var(--panel-br); border-radius: 6px; padding: 10px 12px; }
.kpi .num { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .lbl { font-size: 12px; color: var(--txt-dim); margin-top: 2px; }

/* 风险等级条 */
.levelbar { display: flex; flex-direction: column; gap: 8px; }
.lvrow { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lvdot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.lvname { width: 76px; }
.lvtrack { flex: 1; height: 14px; background: rgba(255,255,255,.06); border-radius: 7px; overflow: hidden; }
.lvfill { height: 100%; border-radius: 7px; transition: width .6s; }
.lvcount { width: 30px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* 排行榜 */
.rank { overflow-y: auto; }
.rankrow { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13px; }
.rankrow:hover { background: rgba(37,216,232,.06); }
.rankidx { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); flex-shrink: 0; }
.rankidx.top { background: var(--red); }
.rankname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankhz { font-size: 11px; padding: 1px 6px; border-radius: 3px; color: #fff; }
.rankR { width: 44px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lvtag { font-size: 11px; padding: 1px 7px; border-radius: 10px; color: #fff; }

/* 告警滚动 */
.alerts { overflow-y: auto; }
.alertrow { padding: 8px; margin-bottom: 6px; border-left: 3px solid; border-radius: 4px;
  background: rgba(255,255,255,.04); font-size: 12px; }
.alertrow .at { color: var(--txt-dim); font-size: 11px; }
.alertrow .am { margin-top: 2px; line-height: 1.4; }

/* 地图区 */
#map { flex: 1; min-height: 0; }
.maplegend { position: absolute; bottom: 14px; right: 16px; display: flex; gap: 12px;
  background: rgba(6,13,31,.7); padding: 6px 12px; border-radius: 6px; font-size: 12px; }
.maplegend span { display: flex; align-items: center; gap: 4px; }
.maplegend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.foot { text-align: center; font-size: 11px; color: var(--txt-dim); margin-top: 8px; letter-spacing: 1px; }
.scroll::-webkit-scrollbar { width: 4px; }
.scroll::-webkit-scrollbar-thumb { background: var(--panel-br); border-radius: 2px; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.err { color: var(--orange); font-size: 11px; }

/* 时间轴 */
.timeline { background: var(--panel); border: 1px solid var(--panel-br); border-radius: 8px;
  padding: 8px 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px;
  position: relative; }
.timeline::before { content:''; position:absolute; top:0; left:14px; width:28px; height:2px; background:var(--cyan); }
.tl-btn { background: rgba(37,216,232,.15); color: var(--cyan); border: 1px solid var(--cyan); padding: 4px 12px;
  border-radius: 4px; cursor: pointer; font-size: 12px; }
.tl-btn:hover { background: var(--cyan); color: var(--bg); }
.tl-time { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 170px; }
.tl-time .live { color: var(--cyan); font-weight: 600; }
.tl-time .past { color: var(--orange); font-weight: 600; }
.tl-slider { flex: 1; height: 30px; display: flex; align-items: center; position: relative; }
.tl-slider input[type=range] { width: 100%; accent-color: var(--cyan); }
.tl-marks { display: flex; justify-content: space-between; position: absolute; left: 0; right: 0; top: 0;
  font-size: 10px; color: var(--txt-dim); pointer-events: none; }
.tl-now-mark { position: absolute; width: 2px; height: 18px; background: var(--cyan); top: 6px;
  box-shadow: 0 0 6px var(--cyan); pointer-events: none; }
.tl-label { font-size: 11px; color: var(--txt-dim); }
.county-sel { background: rgba(10,22,48,.65); color: var(--cyan); border: 1px solid var(--cyan);
  padding: 4px 10px; border-radius: 4px; font-size: 12px; font-family: inherit; cursor: pointer; }
.county-sel optgroup { background: #0a1630; color: var(--txt-dim); font-style: normal; }
.county-sel option { background: #0a1630; color: var(--txt); padding: 4px; }

/* 详情下钻 */
.detail-bg { position: fixed; inset: 0; background: rgba(6,13,31,.78); z-index: 30;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.detail-card { background: linear-gradient(180deg, rgba(20,40,80,.95), rgba(10,22,48,.95));
  border: 1px solid var(--cyan); border-radius: 10px; width: 880px; max-height: 90vh; overflow: auto;
  box-shadow: 0 0 30px rgba(37,216,232,.3); }
.detail-head { padding: 16px 22px; border-bottom: 1px solid var(--panel-br); display: flex;
  justify-content: space-between; align-items: flex-start; }
.detail-head .nm { font-size: 18px; font-weight: 700; color: #eaf4ff; }
.detail-head .sub { font-size: 12px; color: var(--txt-dim); margin-top: 4px; }
.detail-close { background: transparent; border: 1px solid var(--panel-br); color: var(--txt);
  padding: 4px 12px; border-radius: 4px; cursor: pointer; }
.detail-body { padding: 18px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-body h4 { font-size: 13px; color: var(--cyan); margin-bottom: 8px; letter-spacing: 1px; }
.det-kpi { display: flex; gap: 12px; align-items: center; padding: 12px; background: rgba(255,255,255,.04); border-radius: 6px; }
.det-kpi .big { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.det-kpi .small { font-size: 12px; color: var(--txt-dim); }
.det-haz { display: grid; gap: 6px; font-size: 12px; }
.det-haz .row { display: grid; grid-template-columns: 56px 1fr 50px; align-items: center; gap: 8px; }
.det-haz .bar { height: 8px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.det-haz .fill { height: 100%; border-radius: 4px; }
.det-env { font-size: 12px; }
.det-env table { width: 100%; }
.det-env td { padding: 4px 8px; border-bottom: 1px dashed rgba(255,255,255,.06); }
.det-env td:first-child { color: var(--txt-dim); width: 90px; }
.det-rain { height: 130px; }
.det-history { font-size: 12px; max-height: 140px; overflow-y: auto; }
.det-history .row { padding: 6px 8px; border-left: 2px solid; margin-bottom: 4px; background: rgba(255,255,255,.04); border-radius: 3px; }
.det-history .row .ts { color: var(--txt-dim); font-size: 10px; }
.full2 { grid-column: 1/3; }
.disclaim { background: rgba(244,96,54,.08); border: 1px solid rgba(244,96,54,.3); padding: 8px 12px;
  border-radius: 4px; font-size: 11px; color: #f5b39f; line-height: 1.5; }
.disclaim b { color: var(--orange); }
.modelver { font-size: 10px; color: var(--txt-dim); }

.fcst-bands { display: flex; gap: 8px; margin-bottom: 4px; }
.fcst-band { flex: 1; padding: 6px 10px; background: rgba(10,22,48,.55); border: 1px solid var(--panel-br);
  border-radius: 4px; font-size: 12px; }
.fcst-band .nm { color: var(--txt-dim); font-size: 11px; }
.fcst-band .mx { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fcst-band .ct { font-size: 11px; color: var(--txt-dim); }
.fcst-band.red    { border-color: var(--red);    }
.fcst-band.red    .mx { color: var(--red); }
.fcst-band.orange { border-color: var(--orange); }
.fcst-band.orange .mx { color: var(--orange); }
.fcst-band.yellow { border-color: var(--yellow); }
.fcst-band.yellow .mx { color: var(--yellow); }
.fcst-band.blue   { border-color: var(--lblue);  }
.fcst-band.blue   .mx { color: var(--lblue); }
.fcst-band.normal { border-color: var(--green);  }
.fcst-band.normal .mx { color: var(--green); }

/* 卫星图与承灾体面板 */
.det-sat { height: 240px; border-radius: 6px; overflow: hidden; }
.det-sat .leaflet-container { background: #0a162e; }
.urgency-card { display: flex; gap: 14px; align-items: center; padding: 12px; background: rgba(255,255,255,.04); border-radius: 6px; }
.urgency-card .big { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.exposure-bar { background: linear-gradient(to right, #27ae60, #f5c518, #e67e22, #d7263d); height: 8px; border-radius: 4px; position: relative; }
.exposure-bar .arrow { position: absolute; top: -6px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #fff; transform: translateX(-6px); }
.exp-pill { display: inline-block; padding: 1px 8px; border-radius: 3px; background: rgba(46,108,240,.18); color: #aac8ff; font-size: 11px; margin: 2px 4px 2px 0; }



