/* ============================================================
   国安社区 · 前端展示页（横板列表）+ 管理员可视化编辑
   面板风格底子（深空蓝 + 霓虹青），与 devintro / 后台一致。
   ============================================================ */

/* ---------------- 版心（与 app.php 一致，宽屏不再拉伸） ---------------- */
/* 导航内层必须 display:flex：否则 style.css 的 .brand{display:flex} 会把
   「国安盾 · 国安社区」撑成整行，把 GUOAN COMMUNITY / 返回按钮挤到第二行（左上角错位）。 */
.pg-nav-in { width: 100%; max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; min-width: 0; }
.pg-nav .brand { display: inline; }               /* 抵消 .brand{display:flex;gap:14px} 的泄漏 */
.pg-nav .brand, .pg-nav .cur { white-space: nowrap; }
.pg-head, .pg-sub, .mkt-toolbar, .mkt-list { max-width: 1240px; margin-left: auto; margin-right: auto; }

/* ---------------- 工具栏（搜索 + 分类） ---------------- */
.mkt-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 0 28px 16px;
}
.mkt-search {
  position: relative; flex: 1 1 280px; max-width: 420px;
  display: flex; align-items: center;
}
.mkt-search > .ic {
  position: absolute; left: 12px; width: 16px; height: 16px; color: #6fa8c9; pointer-events: none;
}
.mkt-search input {
  width: 100%; box-sizing: border-box;
  background: rgba(4,12,24,.7); border: 1px solid rgba(80,180,255,.25); border-radius: 10px;
  color: #eaf6ff; padding: 9px 12px 9px 36px; font-size: 13px; font-family: inherit;
}
.mkt-search input::placeholder { color: #6f87a8; }
.mkt-search input:focus { outline: none; border-color: #7df9ff; box-shadow: 0 0 0 3px rgba(0,229,255,.12); }
.mkt-cat {
  background: rgba(4,12,24,.7); border: 1px solid rgba(80,180,255,.25); border-radius: 10px;
  color: #eaf6ff; padding: 9px 12px; font-size: 13px; font-family: inherit; min-width: 150px;
}
.mkt-cat:focus { outline: none; border-color: #7df9ff; }

/* ---------------- 横板列表 ---------------- */
.mkt-list { padding: 4px 28px 52px; }
.mkt-rows { display: flex; flex-direction: column; gap: 10px; }
.mkt-row {
  display: grid;
  grid-template-columns: 64px minmax(200px,1.7fr) 112px 120px 96px 132px 140px 156px;
  gap: 14px; align-items: center;
  background: linear-gradient(180deg, rgba(20,40,66,.72), rgba(10,22,40,.72));
  border: 1px solid rgba(80,180,255,.18); border-radius: 14px; padding: 14px 16px;
  transition: border-color .2s, transform .15s;
}
.mkt-row:not(.mkt-row-head):hover { border-color: rgba(80,200,255,.5); transform: translateY(-1px); }
.mkt-cell { min-width: 0; }

.mkt-row-head {
  background: rgba(8,16,30,.5); border-color: rgba(80,180,255,.12);
  color: #7f97bd; font-size: 12px; letter-spacing: 1px; padding: 10px 16px; border-radius: 10px;
}
.mkt-row-head:hover { transform: none; border-color: rgba(80,180,255,.12); }

.mkt-c-icon .mkt-ico, .mkt-c-icon .mkt-ico-ph {
  width: 48px; height: 48px; border-radius: 11px; object-fit: contain;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
}
.mkt-c-icon .mkt-ico-ph {
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
  color: #04091a; background: linear-gradient(135deg, #7df9ff, #2f7bff);
}

/* 图标 / 名称 = 进入应用介绍页（app.php） */
.mkt-ic-link { display:inline-block; line-height:0; border-radius:11px; }
.mkt-ic-link:hover .mkt-ico, .mkt-ic-link:hover .mkt-ico-ph { border-color:rgba(125,249,255,.65); }
.mkt-info-link { display:block; text-decoration:none; color:inherit; }
.mkt-info-link:hover .mkt-name { color:#7df9ff; }
.mkt-name { font-size: 16px; font-weight: 700; color: #eaf6ff; display: flex; align-items: center; gap: 8px;
  transition: color .15s; }
.mkt-ver { font-size: 11px; color: #9fc6dd; font-weight: 500; }
.mkt-cat {
  font-size: 11px; color: #6fa8c9; background: rgba(80,180,255,.12);
  border: 1px solid rgba(80,180,255,.22); border-radius: 999px; padding: 1px 9px;
  display: inline-block; margin-top: 4px;
}
.mkt-desc {
  font-size: 12.5px; color: #b7d2e4; line-height: 1.5; margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.mkt-lbl { display: none; color: #6fa8c9; font-size: 11px; margin-right: 6px; }
.mkt-c-plat, .mkt-c-author, .mkt-c-size { font-size: 13px; color: #cfe2f2; }
.mkt-c-author { color: #bfe0f2; }
.mkt-c-stats { display: flex; flex-direction: column; gap: 4px; }
.stat { display: flex; align-items: center; gap: 6px; color: #9fc6dd; font-size: 12.5px; }
.stat .ic { width: 15px; height: 15px; color: #7df9ff; flex: none; }
.mkt-c-fb .btn, .mkt-c-install .btn { width: 100%; justify-content: center; }

/* ---------------- 弹层（详情 / 反馈） ---------------- */
.mkt-modal { position: fixed; inset: 0; z-index: 60; display: none; }
.mkt-modal.show { display: block; }
.mkt-modal-mask { position: absolute; inset: 0; background: rgba(3,8,18,.66); backdrop-filter: blur(3px); }
.mkt-modal-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, 92vw); max-height: 86vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(16,30,52,.98), rgba(9,18,34,.98));
  border: 1px solid rgba(80,200,255,.35); border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.mkt-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(80,180,255,.18);
  font-size: 17px; font-weight: 700; color: #eaf6ff;
}
.mkt-x {
  background: transparent; border: 1px solid rgba(120,160,220,.3); color: #9fb4d6;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.mkt-x:hover { color: #fff; border-color: #00e5ff; }
.mkt-x .ic { width: 16px; height: 16px; }
.mkt-modal-body { padding: 18px; overflow: auto; }

/* 反馈列表（弹层用；留言板页面的完整样式在 apppage.css）
   注意：不要给 .fb-list 设 max-height，否则建议一多底部的就看不到了；
   由 .mkt-modal-body 统一滚动即可。 */
.fb-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.fb-item { background: rgba(12,26,46,.6); border: 1px solid rgba(80,180,255,.18); border-radius: 10px; padding: 10px 12px; }
.fb-item.is-ask { border-left: 3px solid rgba(255,176,32,.6); }
.fb-item-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fb-item-h b { color: #bfe0f2; font-size: 13px; }
.fb-item-h .fb-time { margin-left: auto; }
.fb-badge { font-size: 10.5px; border-radius: 5px; padding: 1px 7px; font-weight: 700; }
.fb-badge.sug { color: #0a2a22; background: #6dffb0; }
.fb-badge.ask { color: #3a2600; background: #ffb020; }
.fb-time { color: #6f87a8; font-size: 11px; }
.fb-item-t { color: #cfe2f2; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.fb-replies { margin-top: 8px; padding-left: 10px; border-left: 2px solid rgba(0,229,255,.35); }
.fb-reply { margin-top: 6px; }
.fb-reply-h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.fb-reply-h b { color: #9fe8ff; }
.fb-reply-h .fb-time { margin-left: auto; }
.fb-reply-t { color: #cfe2f2; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap;
  word-break: break-word; margin-top: 2px; }
.fb-form { border-top: 1px solid rgba(80,180,255,.18); padding-top: 14px; }
.fb-kinds { display: flex; gap: 8px; margin-bottom: 10px; }
.fb-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #bfe0f2;
  border: 1px solid rgba(80,180,255,.24); border-radius: 999px; padding: 4px 12px; cursor: pointer;
  background: rgba(80,180,255,.06); }
.fb-kind input { accent-color: #00e5ff; margin: 0; }
.fb-kind:has(input:checked) { color: #04091a; background: linear-gradient(135deg,#7df9ff,#31a8ff);
  border-color: transparent; font-weight: 700; }
.fb-input {
  width: 100%; box-sizing: border-box; background: rgba(4,12,24,.7);
  border: 1px solid rgba(80,180,255,.25); border-radius: 10px; color: #eaf6ff;
  padding: 9px 12px; font-size: 13px; font-family: inherit; margin-bottom: 10px;
}
.fb-input::placeholder { color: #6f87a8; }
.fb-input:focus { outline: none; border-color: #7df9ff; }
textarea.fb-input { resize: vertical; min-height: 76px; }
.fb-actions { display: flex; align-items: center; gap: 12px; }
.fb-msg { font-size: 12.5px; }
.fb-msg.ok { color: #6dffb0; }
.fb-msg.err { color: #ff8aa0; }

/* ---------------- 响应式 ---------------- */
/* 版心为 1240：宽屏（>=1241）才显示「适用平台 / 分享者」整 8 列；
   窄于 1240 收起这两列，避免横向溢出。 */
@media (max-width: 1240px) {
  .mkt-row { grid-template-columns: 64px minmax(170px,1.8fr) 96px 132px 140px 156px; }
  .mkt-h-plat, .mkt-h-author, .mkt-c-plat, .mkt-c-author { display: none; }
  .mkt-lbl { display: inline; }
}
@media (max-width: 760px) {
  .pg-head, .pg-sub, .mkt-toolbar, .mkt-list { padding-left: 16px; padding-right: 16px; }
  .mkt-row-head { display: none; }
  .mkt-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  }
  .mkt-c-icon { flex: 0 0 52px; }
  .mkt-c-info { flex: 1 1 100%; order: -1; }
  .mkt-c-plat, .mkt-c-author, .mkt-c-size, .mkt-c-stats { flex: 0 1 auto; }
  .mkt-c-stats { flex-direction: row; gap: 14px; }
  .mkt-c-fb { flex: 1 1 100%; }
  .mkt-c-install { flex: 1 1 100%; }
  .mkt-c-fb .btn, .mkt-c-install .btn { width: 100%; }
}

/* ---------------- 管理员可视化编辑器 ---------------- */
.mkt-tip { margin: 10px 0 14px; padding: 10px 14px; font-size: 12.5px; color: #bfe0f2;
  background: rgba(80,180,255,.08); border: 1px solid rgba(80,180,255,.2); border-radius: 10px; }
.mkt-tip b { color: #7df9ff; }
.mkt-editor { display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow: auto; padding-right: 6px; }
.mkt-app {
  border: 1px solid rgba(80,180,255,.2); border-radius: 12px; padding: 14px 16px;
  background: rgba(12,26,46,.6); position: relative;
}
.mkt-app .mkt-app-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mkt-app .mkt-app-h .mkt-idx { font-size: 13px; color: #6fa8c9; font-weight: 700; letter-spacing: 1px; }
.mkt-app .mkt-del { font-size: 12px; color: #ff7a90; border: 1px solid rgba(255,122,144,.4);
  background: transparent; border-radius: 8px; padding: 3px 10px; cursor: pointer; }
.mkt-app .mkt-del:hover { background: rgba(255,122,144,.14); }
.mkt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.mkt-grid .mkt-full { grid-column: 1 / -1; }
.mkt-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9fc6dd; }
.mkt-grid label.mkt-chk { flex-direction: row; align-items: center; gap: 8px; }
.mkt-grid input[type=text], .mkt-grid input[type=number], .mkt-grid select, .mkt-grid textarea {
  background: rgba(4,12,24,.7); border: 1px solid rgba(80,180,255,.25); border-radius: 8px;
  color: #eaf6ff; padding: 7px 9px; font-size: 13px; font-family: inherit; width: 100%; box-sizing: border-box;
}
.mkt-grid textarea { resize: vertical; min-height: 64px; }
.mkt-grid .mkt-tall textarea { min-height: 92px; line-height: 1.6; }
.mkt-grid select:focus, .mkt-grid input:focus, .mkt-grid textarea:focus { outline: none; border-color: #7df9ff; }
.mkt-up { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border-top: 1px dashed rgba(80,180,255,.2); padding-top: 10px; }
.mkt-up .mkt-up-name { font-size: 12px; color: #bfe0f2; max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.mkt-up img.mkt-up-prev { width: 34px; height: 34px; border-radius: 7px; object-fit: contain;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.mkt-up input[type=file] { font-size: 12px; color: #9fc6dd; max-width: 200px; }

/* ---------- v1.13.67 需求②：字段「?」说明 + 上传落盘路径回显 ---------- */
/*  标签行：标签文字 + 紧跟其后的「?」图标（用户要的就是「每个字段后面加个问号」）。 */
.mkt-lb-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mkt-lb-row > .lb { min-width: 0; }
.mkt-help { position: relative; display: inline-flex; flex: 0 0 auto; }
.mkt-help-q { display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; cursor: help; user-select: none;
  font-size: 11px; font-weight: 700; line-height: 1; color: #9fc6dd;
  background: rgba(80,180,255,.1); border: 1px solid rgba(80,180,255,.4);
  transition: color .15s, border-color .15s, background .15s; }
.mkt-help:hover .mkt-help-q, .mkt-help:focus .mkt-help-q {
  color: #0a1420; background: #7df9ff; border-color: #7df9ff; }
.mkt-help:focus { outline: none; }
/*  弹出层纯 CSS（hover / focus / focus-within）触发，不依赖 JS。
    不用 :focus-within 兜键盘 Tab —— 那个在嵌了 input 的场景容易连着一起亮。 */
.mkt-help-pop {
  position: absolute; z-index: 40; left: 20px; top: 18px; width: 300px;
  padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.65;
  color: #d8ecf8; background: #0d1c2c; border: 1px solid rgba(125,249,255,.45);
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transform: translateY(-3px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.mkt-help:hover .mkt-help-pop, .mkt-help:focus .mkt-help-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.mkt-help-pop b { color: #7df9ff; font-weight: 600; }
/*  上传槽那三行的标签文字短（「程序包：」），弹层默认往下开 6px 就够，
    贴行对齐免得压到下面的输入框。 */
.mkt-up .mkt-help-pop { top: 20px; }

/*  上传路径：文件名（等宽字体，可复制）+ 一句「传到哪了」。
    原来只有文件名，小白看不出东西传到哪去了（需求②）。 */
.mkt-up .mkt-up-name { display: inline-flex; flex-direction: column; gap: 1px;
  max-width: 300px; white-space: normal; overflow: visible; text-overflow: clip; }
.mkt-up .mkt-up-path { color: #7df9ff; font-size: 12px; word-break: break-all;
  font-family: Consolas, "Courier New", monospace; }
.mkt-up .mkt-up-where { color: #7f9cb0; font-size: 11px; }
.mkt-up .mkt-up-empty { color: #6f8b9e; font-style: italic; }
