/* ============================================================
   前端 V52 升级层：算力市场 / AI大模型市场 / 开放平台首页
   依赖：common.css + frontend.css（或 v33-pages.css）
   命名前缀统一 m52-  ，纯静态、零内联
   ============================================================ */
.m52 { max-width:1280px; margin:0 auto; padding:56px 20px 72px; box-sizing:border-box; }
.m52-head { margin-bottom:22px; }
.m52-head h2 { font-size:26px; font-weight:800; color:#eaf1ff; margin:0 0 8px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.m52-head p { font-size:13.5px; color:#94a3b8; line-height:1.8; margin:0; max-width:900px; }
.m52-badge { font-size:11.5px; padding:3px 10px; border-radius:20px; color:#c7d2fe; background:rgba(99,102,241,.16); border:1px solid rgba(99,102,241,.35); font-weight:600; }
.m52-badge.green { color:#34d399; background:rgba(16,185,129,.14); border-color:rgba(16,185,129,.35); }
.m52-badge.cyan { color:#22d3ee; background:rgba(6,182,212,.14); border-color:rgba(6,182,212,.35); }

/* 统计条 */
.m52-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:18px 0 26px; }
.m52-stat { padding:14px 16px; border-radius:12px; background:linear-gradient(135deg,rgba(99,102,241,.12),rgba(6,182,212,.06)); border:1px solid rgba(99,102,241,.22); }
.m52-stat b { display:block; font-size:22px; font-weight:800; background:linear-gradient(90deg,#60a5fa,#a78bfa,#22d3ee); -webkit-background-clip:text; background-clip:text; color:transparent; }
.m52-stat span { font-size:12px; color:#94a3b8; }

/* Tab */
.m52-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 20px; }
.m52-tab { padding:8px 16px; border-radius:10px; font-size:13px; cursor:pointer; color:#a8b6d4; background:rgba(15,23,42,.6); border:1px solid rgba(99,102,241,.2); }
.m52-tab:hover { color:#e2e8f0; border-color:rgba(99,102,241,.45); }
.m52-tab.on { color:#fff; background:linear-gradient(135deg,rgba(99,102,241,.35),rgba(6,182,212,.25)); border-color:rgba(99,102,241,.6); }

/* 卡片网格 */
.m52-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.m52-card { border-radius:14px; background:rgba(17,24,39,.72); border:1px solid rgba(99,102,241,.2); padding:16px 18px; transition:transform .2s,border-color .2s; }
.m52-card:hover { transform:translateY(-3px); border-color:rgba(99,102,241,.5); }
.m52-card-hd { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.m52-ic { width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:19px; background:linear-gradient(135deg,rgba(99,102,241,.28),rgba(6,182,212,.2)); flex-shrink:0; }
.m52-name { font-size:15px; font-weight:800; color:#eaf1ff; }
.m52-sub { font-size:11.5px; color:#8ba0c4; }
.m52-role { font-size:12.5px; color:#c7d2fe; margin-bottom:10px; }
.m52-specs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:12px; }
.m52-specs i { font-style:normal; font-size:11.5px; padding:6px 9px; border-radius:8px; background:rgba(15,23,42,.75); color:#93a5c4; display:flex; justify-content:space-between; gap:6px; }
.m52-specs i b { color:#c7d2fe; font-weight:600; }
.m52-card-ft { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.m52-price { font-size:17px; font-weight:800; color:#fbbf24; }
.m52-price small { font-size:11px; color:#94a3b8; font-weight:500; }
.m52-btn { padding:8px 15px; border-radius:9px; font-size:12.5px; font-weight:600; cursor:pointer; border:1px solid rgba(99,102,241,.45); background:rgba(15,23,42,.7); color:#c7d2fe; }
.m52-btn:hover { background:rgba(99,102,241,.22); color:#fff; }
.m52-btn.pri { background:linear-gradient(135deg,#6366f1,#06b6d4); border-color:transparent; color:#fff; }
.m52-btn.pri:hover { filter:brightness(1.12); }
.m52-btn.sm { padding:5px 11px; font-size:12px; }
.m52-btn[disabled] { opacity:.5; cursor:not-allowed; }

/* 共振矩阵 */
.m52-mx-wrap { overflow-x:auto; padding:4px 0 8px; }
.m52-mx { display:grid; gap:3px; min-width:760px; grid-template-columns:repeat(16,minmax(38px,1fr)); }
.m52-mx-c { font-style:normal; font-size:10.5px; color:#8ba0c4; display:flex; align-items:center; justify-content:center; text-align:center; padding:4px 2px; border-radius:6px; background:rgba(15,23,42,.6); }
.m52-mx-c.hd { color:#c7d2fe; font-weight:700; }
.m52-mx-c.diag { background:rgba(99,102,241,.28); color:#eaf1ff; font-weight:700; }
.m52-mx-cell { border:none; height:30px; border-radius:6px; cursor:pointer; font-size:10.5px; color:#0b1220; font-weight:700; }
.m52-mx-cell.diag { background:rgba(148,163,184,.2); color:#94a3b8; cursor:default; }
.h5 { background:#4ade80; } .h4 { background:#34d399; } .h3 { background:#22d3ee; } .h2 { background:#818cf8; } .h1 { background:#a78bfa; }

/* 模型清单 */
.m52-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:4px 0 16px; }
.m52-input { flex:1; min-width:180px; padding:9px 13px; border-radius:10px; background:rgba(15,23,42,.75); border:1px solid rgba(99,102,241,.28); color:#e2e8f0; font-size:13px; outline:none; }
.m52-input:focus { border-color:rgba(99,102,241,.6); }
.m52-select { padding:9px 12px; border-radius:10px; background:rgba(15,23,42,.75); border:1px solid rgba(99,102,241,.28); color:#e2e8f0; font-size:13px; outline:none; }
.m52-list { border-radius:14px; border:1px solid rgba(99,102,241,.18); overflow:hidden; }
.m52-row { display:grid; grid-template-columns:2.1fr 1fr .8fr .8fr .8fr .9fr 1fr; gap:10px; align-items:center; padding:12px 16px; border-bottom:1px solid rgba(99,102,241,.1); font-size:12.5px; color:#b9c7de; }
.m52-row:last-child { border-bottom:none; }
.m52-row.hd { background:rgba(15,23,42,.8); color:#8ba0c4; font-size:11.5px; font-weight:700; }
.m52-row .nm { color:#eaf1ff; font-weight:700; }
.m52-row .nm small { display:block; color:#8ba0c4; font-weight:400; margin-top:2px; }
.m52-pill { font-size:11px; padding:2px 8px; border-radius:8px; background:rgba(99,102,241,.16); color:#c7d2fe; }
.m52-pill.g { background:rgba(16,185,129,.15); color:#34d399; }
.m52-pill.c { background:rgba(6,182,212,.15); color:#22d3ee; }
.m52-pager { display:flex; gap:6px; align-items:center; justify-content:center; padding:16px 0 0; flex-wrap:wrap; }
.m52-pg { min-width:32px; padding:6px 10px; border-radius:8px; font-size:12.5px; cursor:pointer; color:#a8b6d4; background:rgba(15,23,42,.6); border:1px solid rgba(99,102,241,.2); }
.m52-pg.on { color:#fff; background:linear-gradient(135deg,#6366f1,#06b6d4); border-color:transparent; }
.m52-pg[disabled] { opacity:.4; cursor:not-allowed; }

/* 详情/弹窗 */
.m52-mask { position:fixed; inset:0; background:rgba(2,6,23,.8); display:none; align-items:center; justify-content:center; z-index:9000; padding:20px; }
.m52-mask.on { display:flex; }
.m52-modal { width:min(600px,100%); max-height:86vh; overflow:auto; background:#0f172a; border:1px solid rgba(99,102,241,.35); border-radius:16px; padding:22px; }
.m52-modal-hd { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.m52-modal-hd h3 { font-size:17px; color:#fff; margin:0; }
.m52-x { background:none; border:none; color:#94a3b8; font-size:20px; cursor:pointer; line-height:1; }
.m52-x:hover { color:#fff; }
.m52-kv { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:12px; }
.m52-kv i { font-style:normal; font-size:12.5px; padding:9px 12px; border-radius:9px; background:rgba(15,23,42,.75); color:#93a5c4; display:flex; justify-content:space-between; gap:8px; }
.m52-kv i b { color:#c7d2fe; }
.m52-note { font-size:12.5px; color:#b9c7de; line-height:1.8; margin-bottom:12px; }
.m52-pre { background:#0b1220; border:1px solid rgba(99,102,241,.25); border-radius:10px; padding:12px 14px; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12px; color:#9fe6c8; overflow:auto; max-height:220px; margin:0; white-space:pre; }

/* 三步接入 */
.m52-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-bottom:22px; }
.m52-step { border-radius:12px; padding:16px; background:rgba(17,24,39,.7); border:1px solid rgba(99,102,241,.2); }
.m52-step em { display:block; font-style:normal; font-size:11px; letter-spacing:1.4px; color:#818cf8; margin-bottom:6px; }
.m52-step b { display:block; font-size:14px; color:#eaf1ff; margin-bottom:6px; }
.m52-step p { font-size:12px; color:#8ba0c4; line-height:1.7; margin:0; }

/* 轻提示 */
.m52-toast { position:fixed; right:22px; bottom:26px; z-index:9600; display:flex; flex-direction:column; gap:8px; }
.m52-toast div { padding:11px 18px; border-radius:10px; background:rgba(15,23,42,.96); border:1px solid rgba(99,102,241,.45); color:#e2e8f0; font-size:13px; box-shadow:0 12px 30px rgba(0,0,0,.4); }

/* 通用工具类（替代原有内联样式） */
.u-flr { float:right; }
.u-w100 { width:100%; }
.u-muted-sm { float:right; font-size:12px; color:#888; }
.m52-chart { width:100%; background:rgba(255,255,255,.03); border-radius:12px; margin-top:16px; }

@media(max-width:900px){
  .m52 { padding:36px 14px 52px; }
  .m52-head h2 { font-size:22px; }
  .m52-grid { grid-template-columns:1fr; }
  .m52-row { grid-template-columns:1.6fr 1fr .8fr; }
  .m52-row .hide-sm { display:none; }
  .m52-kv { grid-template-columns:1fr; }
}
