* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #0a0f1e;
  color: #cfd8ea;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  min-height: 100vh;
}
a { color: #4da3ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.header {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background:
    radial-gradient(1100px 300px at 10% -60%, rgba(90,255,170,.14), transparent 62%),
    radial-gradient(900px 280px at 88% -40%, rgba(255,80,90,.14), transparent 62%),
    linear-gradient(90deg, rgba(18,42,36,.9), rgba(10,16,34,.6));
  border-bottom: 1px solid rgba(120,255,190,.22);
}
.header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120,255,190,.8), rgba(255,120,110,.5), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shield { font-size: 26px; filter: drop-shadow(0 0 10px rgba(120,255,190,.5)); }
.t-main {
  font-size: 26px; font-weight: 800; letter-spacing: 3px;
  background: linear-gradient(92deg, #ffffff 25%, #9effd0 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(120,255,190,.28));
}
.t-main em {
  font-style: normal;
  background: linear-gradient(92deg, #6affb8, #ff8a7a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t-sep { color: rgba(143,170,210,.5); font-size: 18px; }
.t-tags { display: inline-flex; gap: 8px; }
.t-tags b {
  font-size: 12px; font-weight: 600; letter-spacing: 2px; padding: 4px 11px;
  color: #9effd0; border: 1px solid rgba(120,255,190,.35); border-radius: 999px;
  background: rgba(120,255,190,.08);
}
.t-tags b:nth-child(2) { color: #ffb0a6; border-color: rgba(255,120,110,.4); background: rgba(255,120,110,.08); }
.t-tags b:nth-child(3) { color: #ffd28a; border-color: rgba(255,190,90,.35); background: rgba(255,190,90,.08); }
.t-tags b:nth-child(4) { color: #9cc6ff; border-color: rgba(77,163,255,.35); background: rgba(77,163,255,.08); }
.t-en { font-size: 10px; letter-spacing: 4px; color: #5f7ba6; align-self: flex-end; padding-bottom: 7px; }
.header .meta { font-size: 12px; color: #8aa2c8; }
.kpis { display: flex; gap: 16px; padding: 18px 28px; flex-wrap: wrap; }
.kpi {
  flex: 1; min-width: 180px;
  background: rgba(20,35,70,.55);
  border: 1px solid rgba(120,255,190,.16);
  border-radius: 10px; padding: 14px 18px;
}
.kpi .num { font-size: 26px; font-weight: bold; color: #7dffcb; }
.kpi.danger .num { color: #ff6b6b; }
.kpi.warn .num { color: #ffd28a; }
.kpi.info .num { color: #4da3ff; }
.kpi .sub { font-size: 12px; color: #8aa2c8; margin-top: 4px; }
/* 栏目纵向间隔统一为 18px（与顶部 header/KPI 区间距一致）：行距 18px、列距 16px、底部收边 18px */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 16px; padding: 0 28px 18px; align-items: start; }
.card {
  background: rgba(20,35,70,.45);
  border: 1px solid rgba(120,255,190,.14);
  border-radius: 10px; padding: 14px 16px;
  min-width: 0;
}
.card h3 { font-size: 15px; color: #dfe9ff; margin-bottom: 10px; border-left: 3px solid #6affb8; padding-left: 8px; line-height: 1.5; }
.card h3 .hm-sum { float: right; }
/* danger 栏目不再使用红色外边框，统一卡片描边 */
.card.warn { border-color: rgba(255,210,138,.3); }
.card.warn h3 { border-left-color: #ffd28a; }
.card.info { border-color: rgba(77,163,255,.3); }
.card.info h3 { border-left-color: #4da3ff; }
.card.wide { grid-column: 1 / span 6; }
.card.half { grid-column: span 3; }
/* 栏目纵向间隔：顶层栏目卡片（勒索榜/KEV在野利用榜/厂商与CWE分布/CVE榜/开源/资讯）位于文档流，
   统一 18px 底部间距，与顶部 KPI 区、地图行、栏目之间的间距保持一致 */
body > .card { margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(120,255,190,.1); }
th { color: #8aa2c8; font-weight: normal; white-space: nowrap; }
td.desc { color: #8aa2c8; font-size: 12px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td .sub { color: #5f7ba6; font-size: 12px; margin-top: 2px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sev { padding: 1px 8px; border-radius: 9px; font-size: 11px; font-weight: bold; }
.sev-c { background: rgba(255,107,107,.2); color: #ff6b6b; border: 1px solid rgba(255,107,107,.4); }
.sev-h { background: rgba(255,210,138,.14); color: #ffd28a; border: 1px solid rgba(255,210,138,.35); }
.sev-m { background: rgba(77,163,255,.14); color: #4da3ff; border: 1px solid rgba(77,163,255,.3); }
.sev-l { background: rgba(140,160,190,.12); color: #8aa2c8; }
.fire { font-size: 14px; }
.gang { color: #ffb0a6; font-weight: bold; }
.ctyn { color: #ff8a7a; font-weight: bold; }
.pill { display: inline-block; margin: 3px 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: rgba(255,107,107,.1); color: #ffb0a6; border: 1px solid rgba(255,107,107,.3); }
.pill b { color: #ff6b6b; }
.pill.alt { background: rgba(77,163,255,.08); color: #9cc6ff; border-color: rgba(77,163,255,.28); }
.pill.alt b { color: #4da3ff; }
.bar { background: rgba(120,255,190,.1); border-radius: 4px; height: 12px; width: 100px; display: inline-block; vertical-align: middle; }
.bar i { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, #2f9e6e, #6affb8); }
.trend { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding: 6px 4px 0; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; }
.trend .col b { font-size: 11px; color: #ff9b93; }
.trend .col i { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(to top, rgba(255,107,107,.25), #ff6b6b); }
.trend .col s { text-decoration: none; font-size: 10px; color: #5f7ba6; }
/* 全球勒索攻击 · 地区热力图：点位三档分级配色（低=琥珀/中=橙/高=红），图例色块与档位一一对应 */
.heatmap { position: relative; }
.heatmap svg { width: 100%; height: auto; display: block; }
.heatmap text { pointer-events: none; }
.hm-sum { font-size: 12px; font-weight: normal; color: #8aa2c8; }
.hm-leg { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #5f7ba6; margin-top: 6px; }
.hm-leg i { display: inline-block; width: 14px; height: 8px; border-radius: 4px; background: rgba(255,107,107,.6); margin: 0 4px 0 10px; }
.hm-dot { animation: hmbreath 3.2s ease-in-out infinite; }
@keyframes hmbreath { 0%, 100% { opacity: .95; } 50% { opacity: .5; } }
/* 地图卡布局：标题与摘要两端对齐自动换行；
   地图保持2:1比例、宽度满屏铺满卡片（跟随屏宽等比放大），不变形且不裁剪悬停提示框；
   min-height 兜底：底图/数据加载失败时仍保留合理高度，保证右侧TOP20榜不至于被压扁 */
.card.mapcard { display: flex; flex-direction: column; min-height: 380px; }
.card.mapcard h3 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.card.mapcard h3 .hm-sum { float: none; }
.card.mapcard .heatmap { flex: 1; min-height: 0; }
.card.mapcard .heatmap svg { display: block; width: 100%; height: auto; margin: 0 auto; }
/* 地图行布局：地图卡占60% + 国家攻击TOP20榜占40%（3fr:2fr）
   TOP20 榜绝对定位贴合其网格区域（不参与行高计算），行高完全由地图卡决定 → 两卡严格同高
   行底部 18px 间距与下方各栏目统一 */
.duo { grid-column: 1 / span 6; position: relative; display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; margin-bottom: 18px; }
.duo .card { min-width: 0; }
#ctyTop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; grid-column: 2; grid-row: 1; display: flex; flex-direction: column; overflow: hidden; }
/* 表体内部滚动：标题/备注固定，仅表格区域滚动，滚动时表头吸附顶部 */
#ctyTop .ctyscroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#ctyTop thead th { position: sticky; top: 0; z-index: 2; background: #0f1830; box-shadow: 0 1px 0 rgba(120,255,190,.14); }
.ctyscroll::-webkit-scrollbar { width: 6px; }
.ctyscroll::-webkit-scrollbar-thumb { background: rgba(120,255,190,.25); border-radius: 3px; }
.ctyscroll::-webkit-scrollbar-track { background: transparent; }
/* 地图悬停提示框：事件点位/受攻击国家版图通用，鼠标与触屏均可触发 */
.heatmap [data-tip] { cursor: pointer; }
.hm-tip {
  position: absolute; z-index: 30; pointer-events: none;
  max-width: 240px; padding: 7px 12px; border-radius: 8px;
  background: rgba(8,14,28,.96);
  border: 1px solid rgba(255,107,107,.45);
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
  color: #e8eefc; font-size: 12px; line-height: 1.7;
  opacity: 0; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.hm-tip.on { opacity: 1; transform: translateY(0); }
.hm-tip b { color: #ffd7d0; font-size: 13px; margin-right: 6px; }
.hm-tip i { font-style: normal; color: #ff6b6b; font-weight: bold; }
.hm-tip em { display: block; font-style: normal; color: #ffb0a6; font-size: 11px; margin-top: 2px; }
.news { list-style: none; }
.news li { padding: 8px 6px; border-bottom: 1px dashed rgba(120,255,190,.12); font-size: 13px; line-height: 1.6; }
.news li .src { display: block; color: #5f7ba6; font-size: 12px; }
.muted { color: #5f7ba6; font-size: 12px; }
.note { margin-top: 8px; font-size: 12px; color: #8aa2c8; }
.footer { text-align: center; color: #5f7ba6; font-size: 12px; padding: 14px; border-top: 1px solid rgba(120,255,190,.12); }
/* ===== 表格列宽优化（v16）：勒索榜 / CVE榜 / 开源榜 ===== */
/* 勒索榜：日期/国家/严重度窄列定宽，受害组织中等列截断，团伙列窄列截断，事件摘要占满剩余宽度 */
#rans th:nth-child(1), #rans td:nth-child(1) { width: 88px; white-space: nowrap; }
#rans th:nth-child(2), #rans td:nth-child(2) { max-width: 180px; }
#rans td:nth-child(2), #rans td:nth-child(2) a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rans th:nth-child(3), #rans td:nth-child(3) { width: 82px; white-space: nowrap; }
#rans th:nth-child(4), #rans td:nth-child(4) { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rans th:nth-child(5), #rans td:nth-child(5) { width: 64px; white-space: nowrap; }
#rans td.desc { max-width: none; }
#rans th:nth-child(6), #rans td:nth-child(6) { min-width: 360px; }
/* CVE榜：CVE编号列不换行，漏洞描述列放宽（悬停title保留NVD英文原文） */
#cve th:nth-child(2), #cve td:nth-child(2) { white-space: nowrap; }
#cve td.desc { max-width: 560px; }
/* 开源榜：描述行加宽截断 */
#repo .sub { max-width: 300px; }
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .grid > .card { grid-column: auto !important; }
  .duo { grid-template-columns: 1fr; }
  /* 移动端恢复文档流上下排布：TOP20 表格区限高内部滚动，避免整页被拉长 */
  #ctyTop { position: static; grid-column: auto; grid-row: auto; }
  #ctyTop .ctyscroll { max-height: 360px; }
  .header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .t-en { display: none; }
}