/* 大屏实时展示 —— 1920x1080 固定画布，等比缩放适配任意屏幕 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #050B18;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: #C8D8F0;
}
#stage { position: fixed; left: 0; top: 0; transform-origin: 0 0; }

.sc {
  width: 1920px; height: 1080px; position: relative;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(30,90,180,.28), transparent 60%),
    radial-gradient(900px 500px at 5% 100%, rgba(20,140,140,.16), transparent 60%),
    radial-gradient(900px 500px at 95% 100%, rgba(90,40,160,.16), transparent 60%),
    #050B18;
  padding: 18px 24px 20px; display: flex; flex-direction: column;
}
.sc::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(60,120,220,.035) 0 1px, transparent 1px 3px);
}

/* ---------- 顶部 ---------- */
.sc-head {
  height: 74px; flex: none; position: relative; text-align: center; z-index: 2;
  border-bottom: 1px solid rgba(70,140,230,.28); margin-bottom: 14px;
}
.sc-title {
  font-size: 36px; font-weight: 800; letter-spacing: 6px; line-height: 1.15;
  background: linear-gradient(180deg, #EAF4FF 20%, #4EA3FF 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 26px rgba(70,150,255,.35);
}
.sc-sub { margin-top: 5px; font-size: 14px; color: #6E8CB8; letter-spacing: 2px; }
.sc-sub b { color: #7FD4FF; font-weight: 600; }
.sc-time {
  position: absolute; right: 4px; top: 6px; text-align: right;
  font-size: 13px; color: #6E8CB8; line-height: 1.7;
}
.sc-time .t { font-size: 26px; color: #EAF4FF; font-family: ui-monospace, "SF Mono", monospace; letter-spacing: 1px; }
.sc-time .d { font-size: 12px; }
.sc-tools { position: absolute; left: 4px; top: 12px; display: flex; gap: 8px; z-index: 5; }
.sc-tools button {
  background: rgba(30,80,160,.35); border: 1px solid rgba(80,150,240,.45); color: #A8CCFF;
  padding: 7px 14px; border-radius: 5px; font-size: 13px; cursor: pointer; letter-spacing: 1px;
}
.sc-tools button:hover { background: rgba(50,120,220,.5); color: #fff; }

/* ---------- 主体三栏 ---------- */
.sc-body { flex: 1; display: grid; grid-template-columns: 430px 1fr 430px; gap: 16px; min-height: 0; }
.sc-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }

.panel {
  background: linear-gradient(160deg, rgba(18,40,80,.62), rgba(10,22,48,.52));
  border: 1px solid rgba(70,140,230,.26); border-radius: 8px;
  padding: 12px 14px; position: relative; display: flex; flex-direction: column; min-height: 0;
  backdrop-filter: blur(2px);
}
.panel::before, .panel::after {
  content: ''; position: absolute; width: 12px; height: 12px; border: 2px solid #3E8FE8;
}
.panel::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.panel::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.p-h {
  font-size: 16px; font-weight: 700; color: #CFE6FF; letter-spacing: 2px;
  padding-bottom: 8px; margin-bottom: 10px; flex: none;
  border-bottom: 1px solid rgba(70,140,230,.2); display: flex; align-items: center; gap: 8px;
}
.p-h::before { content: ''; width: 4px; height: 15px; background: #3E8FE8; border-radius: 2px; box-shadow: 0 0 8px #3E8FE8; }
.p-h .r { margin-left: auto; font-size: 12px; color: #6E8CB8; font-weight: 400; letter-spacing: 0; }
.p-b { flex: 1; min-height: 0; overflow: hidden; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  background: linear-gradient(160deg, rgba(30,70,140,.4), rgba(12,28,60,.35));
  border: 1px solid rgba(70,140,230,.22); border-radius: 7px; padding: 11px 8px; text-align: center;
}
.kpi .n {
  font-size: 30px; font-weight: 800; color: #5CC8FF; line-height: 1.1;
  font-family: ui-monospace, "SF Mono", monospace; text-shadow: 0 0 16px rgba(80,190,255,.5);
}
.kpi .n small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.kpi .l { font-size: 12px; color: #7C9AC4; margin-top: 5px; letter-spacing: 1px; }
.kpi.warn .n { color: #FFB454; text-shadow: 0 0 16px rgba(255,180,84,.5); }
.kpi.hot .n { color: #FF6B6B; text-shadow: 0 0 16px rgba(255,107,107,.5); }
.kpi.ok .n { color: #4FE0A0; text-shadow: 0 0 16px rgba(79,224,160,.5); }

/* ---------- 条形排行 ---------- */
.rank { display: flex; flex-direction: column; justify-content: space-around; height: 100%; }
.rk { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.rk .i {
  width: 19px; height: 19px; flex: none; border-radius: 3px; font-size: 11px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  background: rgba(70,140,230,.22); color: #9CC4F5;
}
.rk:nth-child(1) .i { background: linear-gradient(135deg, #FF8A3D, #FF5A5A); color: #fff; }
.rk:nth-child(2) .i { background: linear-gradient(135deg, #FFC94D, #FF9636); color: #4A2A00; }
.rk:nth-child(3) .i { background: linear-gradient(135deg, #6FD3FF, #3E8FE8); color: #04203A; }
.rk .nm { width: 82px; flex: none; color: #B8D2F0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk .bar { flex: 1; height: 9px; background: rgba(70,140,230,.13); border-radius: 5px; overflow: hidden; }
.rk .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #2E7FD6, #5CC8FF); box-shadow: 0 0 9px rgba(92,200,255,.6); }
.rk:nth-child(1) .bar i { background: linear-gradient(90deg, #FF5A5A, #FFB454); box-shadow: 0 0 9px rgba(255,120,80,.6); }
.rk:nth-child(2) .bar i { background: linear-gradient(90deg, #FF9636, #FFD166); box-shadow: 0 0 9px rgba(255,180,90,.55); }
.rk .v { width: 44px; flex: none; text-align: right; color: #7FD4FF; font-family: ui-monospace, monospace; font-size: 13px; }

/* ---------- 环形/占比 ---------- */
.donut-wrap { display: flex; align-items: center; gap: 14px; height: 100%; }
.donut { flex: none; position: relative; }
.donut .ctr {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut .ctr .v { font-size: 24px; font-weight: 800; color: #5CC8FF; font-family: ui-monospace, monospace; }
.donut .ctr .l { font-size: 11px; color: #7C9AC4; margin-top: 2px; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.lg { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.lg .dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.lg .nm { color: #B8D2F0; width: 58px; }
.lg .bar { flex: 1; height: 7px; background: rgba(70,140,230,.13); border-radius: 4px; overflow: hidden; }
.lg .bar i { display: block; height: 100%; border-radius: 4px; }
.lg .v { width: 38px; text-align: right; color: #7FD4FF; font-family: ui-monospace, monospace; font-size: 12px; }

/* ---------- 情感条 ---------- */
.sent { flex: none; margin-top: 10px; }
.s-bar {
  display: flex; height: 14px; border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(70,140,230,.22);
}
.s-bar .s-seg { height: 100%; }
.s-legend { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.s-item { display: flex; align-items: baseline; gap: 5px; font-size: 12px; }
.s-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; align-self: center; }
.s-name { color: #B8D2F0; }
.s-count { color: #EAF4FF; font-weight: 700; font-family: ui-monospace, monospace; }
.s-pct { color: #7FD4FF; font-family: ui-monospace, monospace; font-size: 11px; }

/* ---------- 趋势图 ---------- */
.trend { height: 100%; display: flex; flex-direction: column; }
.trend-svg { flex: 1; width: 100%; min-height: 0; }
.trend-x { display: flex; margin-top: 4px; font-size: 11px; color: #6E8CB8; }
.trend-x span { flex: 1; text-align: center; }

/* ---------- 实时流 ---------- */
.feed { height: 100%; overflow: hidden; position: relative; }
.feed-list { position: absolute; width: 100%; }
.fd {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; margin-bottom: 7px;
  background: rgba(30,70,140,.2); border-left: 3px solid #3E8FE8; border-radius: 4px;
}
.fd.hot { border-left-color: #FF6B6B; background: rgba(120,40,50,.24); }
.fd.mid { border-left-color: #FFB454; background: rgba(110,80,30,.2); }
.fd .plat {
  flex: none; font-size: 11px; padding: 2px 7px; border-radius: 3px;
  background: rgba(62,143,232,.28); color: #9CC4F5; white-space: nowrap;
}
.fd .tx { flex: 1; font-size: 14px; color: #D6E6FA; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd .meta { flex: none; text-align: right; font-size: 11px; color: #6E8CB8; line-height: 1.5; white-space: nowrap; }
.fd .meta .ht { color: #FFB454; font-family: ui-monospace, monospace; font-size: 12px; }

/* ---------- 每日热榜（右列） ---------- */
.hl {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 6px;
  background: rgba(30,70,140,.18); border-left: 3px solid #3E8FE8; border-radius: 4px;
}
.hl.top { border-left-color: #FF9636; background: rgba(110,70,20,.22); }
.hl-r {
  flex: none; width: 18px; height: 18px; border-radius: 3px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: rgba(70,140,230,.22); color: #9CC4F5;
}
.hl.top .hl-r { background: linear-gradient(135deg, #FFC94D, #FF9636); color: #4A2A00; }
.hl-p { flex: none; font-size: 11px; font-weight: 600; white-space: nowrap; }
.hl-t { flex: 1; font-size: 13px; color: #D6E6FA; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-h { flex: none; font-size: 11px; color: #FFB454; font-family: ui-monospace, monospace; white-space: nowrap; }

/* ---------- 预警 ---------- */
.alerts { height: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 7px; }
.al {
  padding: 8px 10px; border-radius: 5px; background: rgba(130,40,50,.22);
  border: 1px solid rgba(255,90,90,.28); display: flex; gap: 9px; align-items: flex-start;
}
.al .lv {
  flex: none; font-size: 11px; padding: 2px 7px; border-radius: 3px; font-weight: 700;
  background: #FF5A5A; color: #fff;
}
.al.lv2 { background: rgba(130,90,25,.22); border-color: rgba(255,180,84,.3); }
.al.lv2 .lv { background: #FFB454; color: #4A2A00; }
.al .tx { flex: 1; font-size: 13px; color: #F0D6D6; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al .ht { flex: none; font-family: ui-monospace, monospace; font-size: 14px; color: #FF8A7A; font-weight: 700; }

/* ---------- 词云 ---------- */
.cloud { height: 100%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px 12px; padding: 4px; }
.cw { padding: 3px 9px; border-radius: 12px; font-weight: 600; letter-spacing: 1px; }
.cw.c0 { color: #7FD4FF; background: rgba(62,143,232,.16); font-size: 20px; }
.cw.c1 { color: #5CC8FF; background: rgba(62,143,232,.13); font-size: 17px; }
.cw.c2 { color: #9CC4F5; background: rgba(62,143,232,.1); font-size: 14px; }
.cw.c3 { color: #7C9AC4; background: rgba(62,143,232,.08); font-size: 12.5px; }

/* ---------- 处置进度 ---------- */
.prog { display: flex; flex-direction: column; gap: 9px; height: 100%; justify-content: center; }
.pg { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pg .nm { width: 84px; flex: none; color: #B8D2F0; }
.pg .bar { flex: 1; height: 14px; background: rgba(70,140,230,.13); border-radius: 7px; overflow: hidden; position: relative; }
.pg .bar i { display: block; height: 100%; border-radius: 7px; }
.pg .v { width: 54px; flex: none; text-align: right; font-family: ui-monospace, monospace; color: #7FD4FF; }
.pg .bar .txt {
  position: absolute; right: 8px; top: 0; line-height: 14px; font-size: 11px;
  color: #04203A; font-weight: 700;
}

/* ---------- 底部跑马灯 ---------- */
.ticker {
  flex: none; height: 34px; margin-top: 12px; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, rgba(30,70,140,.3), rgba(12,28,60,.25));
  border: 1px solid rgba(70,140,230,.22); border-radius: 6px; overflow: hidden; padding: 0 14px;
}
.ticker .tag {
  flex: none; font-size: 12px; padding: 3px 10px; border-radius: 3px;
  background: #FF5A5A; color: #fff; font-weight: 700; letter-spacing: 1px;
}
.ticker .scroll { flex: 1; overflow: hidden; white-space: nowrap; position: relative; height: 100%; }
.ticker .inner { position: absolute; white-space: nowrap; line-height: 34px; font-size: 14px; color: #CFE0F5; }
.ticker .inner span { margin-right: 60px; }
.ticker .inner b { color: #FFB454; }

/* ---------- 状态遮罩 ---------- */
.sc-mask {
  position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: rgba(5,11,24,.96); text-align: center;
}
.sc-mask h2 { font-size: 46px; letter-spacing: 5px; color: #4EA3FF; margin-bottom: 16px; }
.sc-mask p { font-size: 16px; color: #7C9AC4; line-height: 2; }
.sc-mask .card {
  margin-top: 26px; background: rgba(30,70,140,.28); border: 1px solid rgba(70,140,230,.35);
  border-radius: 10px; padding: 26px 40px; max-width: 620px;
}
.sc-mask .card .t { font-size: 20px; color: #CFE6FF; margin-bottom: 14px; letter-spacing: 2px; }
.sc-mask .card .row { display: flex; justify-content: space-between; font-size: 14px; color: #9CC4F5; padding: 7px 0; border-bottom: 1px dashed rgba(70,140,230,.2); }
.sc-mask .card .row:last-child { border: 0; }
.sc-mask .btn {
  margin-top: 24px; background: linear-gradient(90deg, #2E7FD6, #5CC8FF); color: #04203A;
  border: 0; padding: 12px 34px; border-radius: 6px; font-size: 15px; font-weight: 700;
  cursor: pointer; letter-spacing: 2px;
}

/* 加载 / 登录 */
.sc-loading { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 18px; color: #4EA3FF; letter-spacing: 3px; }
.sc-login {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #050B18; z-index: 50;
}
.sc-login .box {
  width: 400px; background: rgba(18,40,80,.6); border: 1px solid rgba(70,140,230,.35);
  border-radius: 10px; padding: 34px 32px;
}
.sc-login h1 { font-size: 22px; color: #CFE6FF; text-align: center; letter-spacing: 3px; margin-bottom: 6px; }
.sc-login .sub { text-align: center; font-size: 12.5px; color: #6E8CB8; margin-bottom: 22px; }
.sc-login input {
  width: 100%; padding: 11px 13px; margin-bottom: 12px; border-radius: 5px; font-size: 14px;
  background: rgba(5,15,35,.7); border: 1px solid rgba(70,140,230,.32); color: #D6E6FA; outline: none;
}
.sc-login input:focus { border-color: #3E8FE8; }
.sc-login button {
  width: 100%; padding: 12px; border: 0; border-radius: 5px; font-size: 15px; font-weight: 700;
  background: linear-gradient(90deg, #2E7FD6, #5CC8FF); color: #04203A; cursor: pointer; letter-spacing: 3px;
}
.sc-login .err { color: #FF8A7A; font-size: 12.5px; min-height: 20px; margin-bottom: 6px; text-align: center; }
.sc-login .tip { margin-top: 16px; font-size: 12px; color: #5A7AA8; line-height: 1.9; }
.sc-login .tip b { color: #7FD4FF; }
.sc-login .tip div { cursor: pointer; }
.sc-login .tip div:hover { color: #CFE6FF; }

/* ---------- 未授权水印 / 免费试用提示条 ---------- */
/* 到期未授权：数据照常展示，但整屏叠加倾斜重复水印，提示「该版本大屏系统未经授权」 */
.sc-watermark {
  position: absolute; inset: -12%; z-index: 35; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr;
  align-items: center; justify-items: center; gap: 40px 30px;
  transform: rotate(-24deg); opacity: .16; overflow: hidden;
}
.sc-watermark span {
  font-size: 30px; font-weight: 700; letter-spacing: 6px; color: #FF6B6B;
  white-space: nowrap; text-shadow: 0 0 12px rgba(0, 0, 0, .5);
}
.sc-trialbar {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 36; pointer-events: none;
  background: linear-gradient(90deg, rgba(46,127,214,.92), rgba(92,200,255,.92));
  color: #04203A; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  padding: 6px 26px; border-radius: 0 0 10px 10px;
}

/* ---------- 属地舆情地图 ---------- */
.map-body { position: relative; overflow: hidden; flex: 1; min-height: 0; }
#mapChart { position: absolute; inset: 0; }
.map-crumb {
  font-size: 12px; color: #6E8CB8; font-weight: 400; letter-spacing: 0;
  white-space: nowrap; margin-left: 6px;
}
.map-crumb b { color: #7FD4FF; font-weight: 600; }
.p-h .map-back {
  margin-left: auto;
  background: rgba(30,80,160,.35); border: 1px solid rgba(80,150,240,.45); color: #A8CCFF;
  padding: 3px 11px; border-radius: 5px; font-size: 12px; cursor: pointer; letter-spacing: 1px;
  line-height: 1.5;
}
.p-h .map-back:hover { background: rgba(50,120,220,.5); color: #fff; }

/* ---------- 大屏语音交互：长按说话（/voice.js + /assistant.js） ---------- */
#scVoice {
  position: fixed; right: 30px; bottom: 104px; z-index: 99989;
  width: 88px; height: 88px; border-radius: 50%; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #BFE3FF; user-select: none; -webkit-user-select: none;
  background: linear-gradient(135deg, rgba(24,64,124,.94), rgba(12,86,72,.94));
  border: 1px solid rgba(92,200,255,.45);
  box-shadow: 0 8px 26px rgba(4,20,44,.55), 0 0 0 calc(2px + 12px * var(--lv,0)) rgba(92,200,255,.16);
  transition: box-shadow .12s linear, background .15s, color .15s;
}
#scVoice .ico { width: 26px; height: 26px; display: block; }
#scVoice .lbl { font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
#scVoice .ring { position: absolute; inset: -3px; border-radius: 50%; pointer-events: none; opacity: 0; }
#scVoice:hover { border-color: #7FD4FF; color: #fff; }
#scVoice[data-sc="rec"] { background: linear-gradient(135deg,#B8352A,#E0453A); color: #fff; border-color: #FFB4AC; }
#scVoice[data-sc="rec"] .ring { opacity: 1; border: 2px solid rgba(255,180,172,.8); animation: scv_pulse 1.4s ease-out infinite; }
#scVoice[data-sc="busy"] { opacity: .7; cursor: progress; }
@keyframes scv_pulse { 0% { transform: scale(1); opacity: .9 } 100% { transform: scale(1.35); opacity: 0 } }

#scVoiceTip {
  position: fixed; right: 30px; bottom: 200px; z-index: 99990;
  max-width: 460px; padding: 9px 14px; border-radius: 10px;
  background: rgba(8,26,52,.9); border: 1px solid rgba(92,200,255,.35);
  color: #DCEEFF; font-size: 15px; line-height: 1.5; letter-spacing: .5px;
  opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s;
  pointer-events: none;
}
#scVoiceTip.on { opacity: 1; transform: translateY(0); }

/* ---------- AI 卫士通：大屏上默认的 370px 面板太小，整体放大并抬高到语音键上方 ---------- */
#yq_asst_btn { right: 30px !important; bottom: 30px !important; width: 60px !important; height: 60px !important; }
#yq_asst_btn .yq_logo { width: 60px !important; height: 60px !important; }
#yq_asst_panel {
  right: 30px !important; bottom: 254px !important;
  width: 520px !important; height: 620px !important;
  max-width: calc(100vw - 60px) !important;
  max-height: calc(100vh - 300px) !important;
}
#yq_asst_body { font-size: 14px !important; }
.yq_msg { font-size: 14px !important; max-width: 88% !important; }
#yq_asst_in { font-size: 14px !important; }
#yq_asst_quick button { font-size: 12.5px !important; padding: 6px 12px !important; }

/* 未登录时不显示助手浮层：大屏登录页是「收费版专属」入口，别被浮球压住 */
body.sc-locked #yq_asst_btn, body.sc-locked #yq_asst_panel { display: none !important; }
