/* ============ 全局 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg-deep: #0a1428;
  --bg-panel: #102a43;
  --cyan: #00e5ff;
  --blue: #2d7ff9;
  --purple: #7c5cff;
  --gold: #ffc857;
  --text: #eaf2ff;
  --text-dim: #8fa8c9;
  --green: #21c07a;
  --red: #ff5d6c;
  font-size: 16px;
}
body { font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #1c2b3a; }
.view[hidden] { display: none !important; }
b { font-weight: 700; }

/* ============ 大屏显示页 ============ */
.view-screen {
  min-height: 100vh; color: var(--text);
  background: linear-gradient(160deg, #0a1428 0%, #102a43 100%);
  position: relative; overflow-x: hidden;
}
.screen-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 78% 18%, rgba(0,229,255,.10), transparent 65%),
    radial-gradient(ellipse 50% 40% at 12% 85%, rgba(124,92,255,.10), transparent 65%);
}
.screen-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 80%);
}
.screen-top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 42px; border-bottom: 1px solid rgba(0,229,255,.14);
}
.screen-top-left { display: flex; align-items: center; gap: 12px; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.screen-tag { font-size: 17px; letter-spacing: 2px; color: var(--cyan); font-weight: 500; }
.screen-top-right { font-size: 14px; color: var(--text-dim); letter-spacing: 1px; }
.screen-main {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 40% 60%;
  gap: 26px; padding: 26px 42px 30px;
  min-height: calc(100vh - 62px);
}
.screen-left { display: flex; flex-direction: column; gap: 16px; }
.topic-no { font-size: 16px; color: var(--text-dim); letter-spacing: 3px; }
.topic-no b {
  font-size: 30px; color: var(--cyan); font-weight: 900;
  text-shadow: 0 0 18px rgba(0,229,255,.55); margin: 0 2px;
}
.topic-title {
  font-size: clamp(26px, 2.6vw, 40px); font-weight: 900; line-height: 1.3;
  background: linear-gradient(90deg, #fff, #9fe8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.purpose-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(0,229,255,.22);
  border-radius: 12px; padding: 14px 18px; backdrop-filter: blur(6px);
}
.purpose-label { font-size: 13px; color: var(--gold); letter-spacing: 4px; margin-bottom: 8px; }
.purpose-text { font-size: 15px; line-height: 1.75; color: #cfe0f5; }
.purpose-text b { color: var(--cyan); }
.qr-card {
  display: flex; align-items: center; gap: 18px;
  background: rgba(255,255,255,.96); border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 0 30px rgba(0,229,255,.18);
}
.qr-img { width: 118px; height: 118px; flex: none; }
.qr-img img, .qr-img canvas { width: 100% !important; height: 100% !important; }
.qr-hint { display: flex; flex-direction: column; gap: 6px; color: #16324f; max-width: 300px; }
.qr-hint b { font-size: 20px; color: #0b57a4; }
.qr-hint span { font-size: 12px; color: #6b83a0; word-break: break-all; }
.qr-hint .qr-sub { font-size: 14px; color: #2d7ff9; font-weight: 700; }
.qr-hint .qr-tip { font-size: 12px; color: #c47a00; line-height: 1.5; }
.screen-stats { display: flex; gap: 14px; margin-top: auto; }
.stat {
  flex: 1; text-align: center; padding: 12px 6px;
  background: rgba(0,229,255,.06); border: 1px solid rgba(0,229,255,.18);
  border-radius: 10px;
}
.stat b { display: block; font-size: 30px; color: var(--cyan); font-weight: 900; text-shadow: 0 0 12px rgba(0,229,255,.4); }
.stat span { font-size: 13px; color: var(--text-dim); }

.screen-right {
  background: rgba(255,255,255,.035); border: 1px solid rgba(0,229,255,.16);
  border-radius: 14px; display: flex; flex-direction: column; overflow: hidden;
}
.board-head {
  padding: 14px 20px; font-size: 17px; font-weight: 700; letter-spacing: 2px;
  border-bottom: 1px solid rgba(0,229,255,.16);
  background: linear-gradient(90deg, rgba(0,229,255,.10), transparent);
  display: flex; align-items: center; gap: 10px;
}
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }
.btn-admin {
  margin-left: auto; font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  color: #06131f; background: linear-gradient(135deg, #00e5ff, #6fe3c2); border: 0;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 0 16px rgba(0,229,255,.35); transition: transform .18s ease, box-shadow .18s ease;
}
.btn-admin:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 0 22px rgba(0,229,255,.6); }
@keyframes pulse { 50% { opacity: .35; } }
.board-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.board-list::-webkit-scrollbar { width: 6px; }
.board-list::-webkit-scrollbar-thumb { background: rgba(0,229,255,.25); border-radius: 3px; }
.board-empty { text-align: center; color: var(--text-dim); padding-top: 14vh; }
.board-empty-icon { font-size: 40px; animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feed-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(0,229,255,.14);
  border-left: 3px solid var(--cyan); border-radius: 10px; padding: 12px 16px;
  animation: slidein .5s ease; position: relative;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.feed-card:hover {
  transform: scale(1.04); z-index: 5;
  background: rgba(0,229,255,.09);
  border-color: rgba(0,229,255,.5); border-left-color: var(--cyan);
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(0,229,255,.35);
}
@keyframes slidein { from { opacity: 0; transform: translateY(14px); } }
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.badge {
  font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: rgba(0,229,255,.14); color: var(--cyan); border: 1px solid rgba(0,229,255,.3);
  white-space: nowrap;
}
.badge.gold { background: rgba(255,200,87,.12); color: var(--gold); border-color: rgba(255,200,87,.3); }
.feed-time { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.feed-line { font-size: 14px; line-height: 1.65; color: #d5e4f7; margin: 3px 0; }
.feed-line .k { color: var(--gold); font-weight: 700; margin-right: 6px; white-space: nowrap; }
.feed-line .k.blue { color: #6fb6ff; }

/* ============ 手机提交页 ============ */
.view-submit { max-width: 640px; margin: 0 auto; padding: 0 16px 46px; }
.m-head { padding: 26px 4px 16px; text-align: center; }
.m-head-tag {
  display: inline-block; font-size: 13px; color: #0b57a4; background: #e3f0ff;
  border: 1px solid #bcd9ff; padding: 3px 14px; border-radius: 999px; margin-bottom: 12px;
}
.m-head-title { font-size: 22px; font-weight: 900; color: #12263f; }
.m-head-sub { font-size: 13px; color: #7a8ba0; margin-top: 8px; }
.m-form { background: #fff; border-radius: 16px; padding: 20px 18px; box-shadow: 0 6px 24px rgba(20,50,90,.08); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; color: #33475e; margin-bottom: 6px; }
.field label i { color: var(--red); font-style: normal; }
.field select, .field input, .gate input, .a-filter select {
  width: 100%; padding: 11px 12px; font-size: 15px; border: 1px solid #d5dfeb;
  border-radius: 10px; background: #fbfdff; color: #1c2b3a; outline: none;
  font-family: inherit;
}
.field select:focus, .field input:focus, .gate input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,127,249,.12); }
.block-title { font-size: 15px; font-weight: 900; color: #12263f; margin: 22px 0 10px; }
.block-title span { font-size: 12px; font-weight: 400; color: #8296ac; margin-left: 6px; }
/* 参考句式卡片 */
.tpl-box {
  background: #f3f8ff; border: 1px solid #dbe8f8; border-left: 3px solid #2d7ff9;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.tpl-label { font-size: 12px; font-weight: 900; color: #2d7ff9; letter-spacing: 1px; margin-bottom: 5px; }
.tpl-text { font-size: 13px; color: #1c2b3a; font-weight: 700; line-height: 1.6; }
.tpl-eg { font-size: 12px; color: #6b8299; line-height: 1.6; margin-top: 5px; }
.tpl-eg b { display: inline-block; font-weight: 900; color: #2d7ff9; margin-right: 4px; }
.item-row { margin-bottom: 10px; }
.row-top { display: grid; grid-template-columns: 108px 1fr 34px; gap: 8px; align-items: stretch; }
.item-row select { padding: 9px 6px; font-size: 13px; border: 1px solid #d5dfeb; border-radius: 9px; background: #fbfdff; color: #1c2b3a; }
.item-row input { padding: 9px 10px; font-size: 14px; border: 1px solid #d5dfeb; border-radius: 9px; outline: none; min-width: 0; }
.item-row input:focus, .item-row select:focus { border-color: var(--blue); }
.row-hint {
  font-size: 12px; line-height: 1.55; color: #8fa3b8; margin: 5px 0 0 2px;
  padding-left: 8px; border-left: 2px solid #e2ecf7;
}
.row-hint:empty { display: none; }
.row-hint.short { color: #c47a00; border-left-color: #f0b429; }
.item-del { border: none; background: #fdeef0; color: var(--red); border-radius: 9px; font-size: 17px; cursor: pointer; }
.btn-add {
  width: 100%; padding: 9px; border: 1.5px dashed #b9cbe0; background: #f6faff;
  color: #3d6ea5; border-radius: 10px; font-size: 14px; cursor: pointer; margin-bottom: 6px;
}
.btn-add:active { background: #eaf3ff; }
.m-error { background: #fdeef0; color: #c0392b; font-size: 14px; border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.btn-submit {
  width: 100%; margin-top: 18px; padding: 15px; border: none; border-radius: 12px;
  background: linear-gradient(90deg, #0b57a4, #2d7ff9); color: #fff; font-size: 17px;
  font-weight: 900; letter-spacing: 4px; cursor: pointer; box-shadow: 0 6px 18px rgba(11,87,164,.28);
}
.btn-submit:disabled { opacity: .6; }
.m-foot { text-align: center; font-size: 12px; color: #93a5b8; margin-top: 12px; }
.m-done { text-align: center; background: #fff; border-radius: 16px; padding: 46px 24px; box-shadow: 0 6px 24px rgba(20,50,90,.08); margin-top: 30px; }
.done-icon {
  width: 74px; height: 74px; line-height: 74px; margin: 0 auto 16px; border-radius: 50%;
  background: #e6f9f0; color: var(--green); font-size: 38px; font-weight: 900;
}
.m-done h3 { font-size: 22px; color: #12263f; }
.m-done p { color: #33475e; margin-top: 10px; font-size: 15px; }
.done-sub { color: #8296ac !important; font-size: 13px !important; }
.btn-again { margin-top: 22px; padding: 11px 26px; border: 1px solid #b9cbe0; background: #fff; border-radius: 10px; color: #3d6ea5; font-size: 14px; cursor: pointer; }

/* ============ 后台汇总页 ============ */
.view-admin { max-width: 1240px; margin: 0 auto; padding: 26px 20px 60px; }
.gate { display: flex; justify-content: center; padding-top: 12vh; }
.gate-card { background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(20,50,90,.1); padding: 40px 36px; width: 360px; text-align: center; }
.gate-icon { font-size: 40px; }
.gate-card h3 { margin-top: 10px; font-size: 20px; color: #12263f; }
.gate-card p { color: #8296ac; font-size: 13px; margin: 8px 0 16px; }
.gate input { text-align: center; letter-spacing: 3px; }
.gate-error { color: var(--red); font-size: 13px; margin-top: 10px; }
.btn-primary { width: 100%; margin-top: 16px; padding: 12px; border: none; border-radius: 10px; background: linear-gradient(90deg, #0b57a4, #2d7ff9); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.gate-back { display: block; margin-top: 16px; font-size: 13px; color: #7a8ba0; text-decoration: none; }
.a-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.a-head h2 { font-size: 24px; color: #12263f; }
.a-sub { font-size: 13px; color: #7a8ba0; margin-top: 4px; }
.a-actions { display: flex; gap: 8px; }
.btn-ghost { padding: 8px 16px; border: 1px solid #c8d6e5; background: #fff; border-radius: 9px; color: #33506e; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.a-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.a-card { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 4px 16px rgba(20,50,90,.06); }
.a-card b { display: block; font-size: 34px; color: #0b57a4; }
.a-card.small b { font-size: 19px; line-height: 44px; }
.a-card span { font-size: 13px; color: #7a8ba0; }
.a-charts { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.a-chart { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 4px 16px rgba(20,50,90,.06); }
.a-chart h4 { font-size: 14px; color: #33475e; margin-bottom: 10px; }
.a-chart canvas { max-height: 240px; }

/* ---------- 数据分析与研判 ---------- */
.a-analysis { background: #fff; border-radius: 14px; padding: 18px 20px 20px; box-shadow: 0 4px 16px rgba(20,50,90,.06); margin-bottom: 20px; }
.a-analysis-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.a-analysis-head h4 { font-size: 16px; color: #12263f; }
.a-analysis-note { font-size: 12px; color: #93a4b8; }
.a-analysis-head .btn-ghost { margin-left: auto; }
.a-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.a-metric { background: #f6f9fd; border: 1px solid #e6eefa; border-radius: 10px; padding: 12px 14px; }
.a-metric b { display: block; font-size: 22px; color: #0b57a4; line-height: 1.3; }
.a-metric span { font-size: 12px; color: #7a8ba0; }
.a-insight { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.a-insight-item { border-left: 3px solid #2d7ff9; background: #f7faff; border-radius: 8px; padding: 10px 14px; }
.a-insight-item.warn { border-left-color: #ff9f43; background: #fffaf3; }
.a-insight-item b { display: block; font-size: 14px; color: #12263f; margin-bottom: 4px; }
.a-insight-item p { font-size: 13.5px; line-height: 1.75; color: #3f5670; }
.a-analysis-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.a-sub-box h5 { font-size: 13px; color: #33475e; margin-bottom: 10px; font-weight: 700; }
.a-matrix table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.a-matrix th, .a-matrix td { border-bottom: 1px solid #edf2f9; padding: 7px 6px; text-align: center; color: #3f5670; }
.a-matrix th { font-weight: 600; color: #5b6f88; background: #f8fbff; }
.a-matrix th:first-child, .a-matrix td:first-child { text-align: left; color: #12263f; font-weight: 700; white-space: nowrap; }
.a-matrix td.zero { color: #cfdae7; }
.a-matrix td.hot { background: #eaf3ff; color: #0b57a4; font-weight: 700; }
.a-kw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.a-kw { background: #eef5ff; color: #1a5fb4; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; }
.a-kw i { font-style: normal; color: #7a8ba0; margin-left: 5px; }
.a-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.a-filter label { font-size: 14px; color: #33475e; }
.a-filter select { width: 200px; }
.a-list { display: flex; flex-direction: column; gap: 14px; }
.a-group { background: #fff; border-radius: 14px; box-shadow: 0 4px 16px rgba(20,50,90,.06); overflow: hidden; }
.a-group-head {
  padding: 12px 18px; background: #f2f7fd; font-size: 15px; font-weight: 900; color: #12263f;
  display: flex; align-items: center; gap: 10px;
}
.a-group-head .cnt { font-size: 12px; color: #7a8ba0; font-weight: 400; margin-left: auto; }
.a-rec { border-top: 1px solid #eef3f9; padding: 14px 18px; }
.a-rec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.a-rec-head .badge { background: #e3f0ff; color: #0b57a4; border-color: #bcd9ff; }
.a-rec-head .badge.gold { background: #fff6e3; color: #b8860b; border-color: #f0dca8; }
.a-rec-del { margin-left: auto; font-size: 12px; color: #d35d6a; background: none; border: none; cursor: pointer; }
.a-rec-sec { font-size: 12px; font-weight: 900; color: #b8860b; margin: 8px 0 4px; letter-spacing: 1px; }
.a-rec-sec.blue { color: #0b57a4; }
.a-rec-item { font-size: 14px; line-height: 1.7; color: #33475e; padding-left: 12px; }
.a-rec-item .tag { display: inline-block; font-size: 12px; background: #f2f5f9; color: #5c7288; border-radius: 6px; padding: 0 8px; margin-right: 8px; }
.a-empty { text-align: center; color: #8296ac; padding: 60px 0; font-size: 15px; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .screen-main { grid-template-columns: 1fr; }
  .a-cards { grid-template-columns: repeat(2, 1fr); }
  .a-charts { grid-template-columns: 1fr; }
  .screen-stats { margin-top: 4px; }
}
