/* ============================================================
   校园影视厅 · 样式
   目标设备：教室班班通（Windows 一体机 1920×1080，触摸）
   兼容：手机 / iPad，深色底降低反光
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* hidden 属性必须绝对生效：.player / .drawer / .keybox 自己写了 display，会盖掉 hidden 的默认行为 */
[hidden] { display: none !important; }

:root {
  --bg: #0b0f14;
  --bg2: #121821;
  --card: #171e28;
  --card-h: #1e2733;
  --line: #232d3b;
  --txt: #e8eef6;
  --txt2: #93a1b3;
  --txt3: #63718a;
  --accent: #ff7a29;
  --accent2: #ffb020;
  --blue: #3b82f6;
  --radius: 14px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1b2a3d 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #2a1a12 0%, transparent 55%),
    var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  padding-bottom: 40px;
  overflow-x: hidden;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 26px;
  background: rgba(11, 15, 20, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { font-size: 30px; line-height: 1; filter: drop-shadow(0 3px 8px rgba(255,122,41,.4)); }
.brand-txt { min-width: 0; }
.brand-txt h1 { font-size: 20px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.brand-txt p { font-size: 12px; color: var(--txt3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; height: 40px; color: var(--txt3);
  transition: border-color .15s, box-shadow .15s;
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,41,.13); }
.searchbox input {
  width: 230px; height: 100%; border: none; outline: none; background: transparent;
  color: var(--txt); font-size: 14px; font-family: inherit;
}
.searchbox input::placeholder { color: var(--txt3); }

.btn-add {
  display: inline-flex; align-items: center; gap: 5px;
  height: 40px; padding: 0 18px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #e85d04);
  color: #fff; font-size: 14.5px; font-weight: 700; font-family: inherit;
  box-shadow: 0 6px 18px rgba(255,122,41,.3);
  transition: transform .12s, box-shadow .12s;
}
.btn-add:active { transform: translateY(1px) scale(.985); }
.btn-add .plus { font-size: 17px; line-height: 1; }

/* ---------------- 全网搜索 hero ---------------- */
.hero { padding: 26px 26px 4px; text-align: center; }
.hero-t {
  font-size: 21px; font-weight: 800; letter-spacing: .2px; margin-bottom: 16px;
  background: linear-gradient(92deg, #fff, #a9c4e8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-search {
  display: flex; align-items: center; gap: 12px;
  max-width: 720px; margin: 0 auto;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--card); border: 1px solid rgba(120,160,215,.3);
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
}
.hero-search svg { color: var(--txt3); flex: 0 0 auto; }
.hero-search input {
  flex: 1; min-width: 0; height: 44px; border: 0; background: transparent;
  color: var(--txt); font-size: 16.5px; font-family: inherit; outline: none;
}
.hero-search input::placeholder { color: var(--txt3); }
.hero-search button {
  flex: 0 0 auto; height: 44px; padding: 0 26px; border-radius: 999px; border: 0;
  cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff7a29, #ffb020);
  box-shadow: 0 6px 18px rgba(255,122,41,.35); transition: transform .14s, filter .14s;
}
.hero-search button:hover { filter: brightness(1.08); }
.hero-search button:active { transform: scale(.97); }
.hero-tip { margin-top: 12px; font-size: 12.5px; color: var(--txt3); }

/* 搜索结果 */
.netres { padding: 20px 26px 0; }
.ns-head { font-size: 13.5px; color: var(--txt3); margin-bottom: 11px; }
.ns-head b { color: var(--txt); }
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 11px; }
.ns-card {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 13px 15px; border-radius: 12px; font-family: inherit; color: var(--txt);
  background: linear-gradient(120deg, rgba(59,130,246,.15), rgba(16,185,129,.07));
  border: 1px solid rgba(90,140,200,.28); transition: all .16s;
}
.ns-card:hover {
  border-color: rgba(120,170,235,.55); transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
  background: linear-gradient(120deg, rgba(59,130,246,.26), rgba(16,185,129,.12));
}
.ns-card.ext {
  background: linear-gradient(120deg, rgba(148,120,255,.15), rgba(120,120,140,.06));
  border-color: rgba(140,120,200,.3);
}
.ns-card.ext:hover {
  background: linear-gradient(120deg, rgba(148,120,255,.26), rgba(120,120,140,.12));
  border-color: rgba(165,145,235,.55);
}
.ns-ico { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.ns-txt { min-width: 0; flex: 1; }
.ns-txt b { display: block; font-size: 15px; font-weight: 700; }
.ns-txt small { display: block; font-size: 11.5px; color: var(--txt3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-go { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: #ffcf9a;
  border: 1px solid rgba(255,176,32,.4); border-radius: 6px; padding: 4px 8px; }

.ns-local { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ns-litem {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 8px; border-radius: 10px; font-family: inherit; color: var(--txt);
  background: var(--card); border: 1px solid var(--line); transition: all .15s;
}
.ns-litem:hover { border-color: rgba(255,122,41,.5); }
.ns-lcover {
  width: 62px; height: 36px; flex: 0 0 auto; border-radius: 6px;
  background: #1c2637 center/cover no-repeat;
}
.ns-ltxt { min-width: 0; }
.ns-ltxt b { display: block; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-ltxt small { display: block; font-size: 11px; color: var(--txt3); margin-top: 2px; }
.ns-empty { font-size: 13px; color: var(--txt3); padding: 10px 0; }

/* ---------------- 首页推荐（自动跟随源站更新） ---------------- */
.recs { padding: 14px 0 6px; }
.rec-loading {
  margin: 6px 26px; padding: 20px;
  border: 1px dashed var(--line); border-radius: 12px;
  color: var(--txt3); font-size: 13.5px; text-align: center;
}
.rec-row { margin-bottom: 22px; }
.rec-head { display: flex; align-items: center; gap: 10px; padding: 0 26px 10px; }
.rec-head h3 { font-size: 17px; font-weight: 800; letter-spacing: .3px; flex: 0 0 auto; }
.rec-tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  color: #4ade80; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .3);
}
.rec-tag.ext { color: #c084fc; background: rgba(168, 85, 247, .12); border-color: rgba(168, 85, 247, .32); }
.rec-head i {
  font-style: normal; font-size: 12px; color: var(--txt3);
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-more {
  flex: 0 0 auto; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--txt2); background: transparent; border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 10px; transition: all .15s;
}
.rec-more:hover { color: var(--accent); border-color: rgba(255, 122, 41, .5); }

.rec-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 26px 10px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.rec-strip::-webkit-scrollbar { height: 0; }
.rec-card {
  flex: 0 0 auto; width: 186px; text-align: left; cursor: pointer; font-family: inherit;
  background: transparent; border: 0; padding: 0; color: var(--txt); scroll-snap-align: start;
}
.rc-pic {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 10px; overflow: hidden;
  background: var(--card) center/cover no-repeat;
  border: 1px solid var(--line);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.rec-card:hover .rc-pic {
  transform: translateY(-2px); border-color: rgba(255, 122, 41, .45);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
}
.rc-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 26px; font-weight: 800; color: var(--txt3);
  background: linear-gradient(135deg, var(--card), var(--bg2));
}
.rc-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.rc-dur {
  position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 5px; color: #fff; background: rgba(0, 0, 0, .68);
}
.rc-ext {
  position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 5px; color: #f3e8ff; background: rgba(88, 28, 135, .84);
}
.rc-title {
  margin-top: 7px; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-sub {
  display: block; margin-top: 3px; font-size: 11.5px; color: var(--txt3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 本机精选片单（折叠） */
.mine { margin-top: 10px; border-top: 1px solid var(--line); }
.mine > summary {
  display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none;
  padding: 16px 26px; font-size: 14px; font-weight: 700; color: var(--txt2);
}
.mine > summary::-webkit-details-marker { display: none; }
.mine > summary::before { content: "▸"; font-size: 12px; color: var(--txt3); transition: transform .16s; }
.mine[open] > summary::before { transform: rotate(90deg); }
.mine > summary b {
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: rgba(255, 122, 41, .12); border: 1px solid rgba(255, 122, 41, .3);
  border-radius: 5px; padding: 1px 7px;
}
.mine > summary i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--txt3); }

/* 片源站排序徽标（后台） */
.srank {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  color: var(--txt3); background: var(--bg2); border: 1px solid var(--line);
}
.srank.top { color: #0b0f14; background: var(--accent); border-color: var(--accent); }
.btn-mini.sq { padding: 5px 9px; font-size: 13px; line-height: 1; }
.btn-mini[disabled] { opacity: .3; cursor: default; }
.btn-mini.danger { color: #fca5a5; }

/* 片源站排序卡（后台两行布局，窄抽屉也能排开） */
.site-row {
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
}
.sr-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sico { flex: 0 0 auto; font-size: 18px; line-height: 1; }
.sr-txt { flex: 1 1 auto; min-width: 0; }
.sr-txt b { display: block; font-size: 13.5px; }
.sr-txt small {
  display: block; font-size: 11px; color: var(--txt3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-acts { display: flex; gap: 6px; margin-top: 9px; }
.sr-acts .btn-mini { flex: 1 1 0; min-width: 0; padding: 6px 0; text-align: center; white-space: nowrap; }

.portals-head {
  display: flex; align-items: baseline; gap: 10px; padding: 26px 26px 0;
  font-size: 14.5px; font-weight: 700; color: var(--txt);
}
.portals-head i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--txt3); }

/* 央视搜索结果列表 */
.ns-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 11px; }
.ns-item {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 9px; border-radius: 11px; font-family: inherit; color: var(--txt);
  background: var(--card); border: 1px solid var(--line); transition: all .15s;
}
.ns-item:hover {
  border-color: rgba(255,122,41,.55); transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.ns-cover {
  position: relative; flex: 0 0 auto; width: 116px; height: 66px; border-radius: 8px;
  background: #1c2637 center/cover no-repeat; overflow: hidden;
}
.ns-cimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ns-dur {
  position: absolute; right: 4px; bottom: 4px; font-style: normal;
  font-size: 10.5px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.68); border-radius: 4px; padding: 1px 5px;
}
.ns-info { min-width: 0; flex: 1; }
.ns-info b {
  display: block; font-size: 13.5px; font-weight: 600; line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ns-info small { display: block; margin-top: 4px; font-size: 11px; color: var(--txt3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-play {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; background: rgba(255,122,41,.85);
}
.ns-more { margin: 12px 0 2px; text-align: center; }
.ns-morebtn {
  padding: 9px 22px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--txt2);
  background: var(--bg2); border: 1px solid var(--line); transition: all .15s;
}
.ns-morebtn:hover { color: var(--txt); border-color: rgba(255,122,41,.5); }
.ns-morebtn:disabled { opacity: .55; cursor: default; }

/* ---------------- 片库入口 ---------------- */
.portals {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px;
  padding: 16px 26px 0;
}
.portal {
  display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 13px 18px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(120deg, rgba(59,130,246,.14), rgba(16,185,129,.08));
  border: 1px solid rgba(90,140,200,.28); color: var(--txt);
  font-family: inherit; transition: all .16s;
}
.portal:hover {
  background: linear-gradient(120deg, rgba(59,130,246,.24), rgba(16,185,129,.14));
  border-color: rgba(120,170,235,.5); transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.portal:active { transform: translateY(0) scale(.995); }
.portal .pico { font-size: 27px; line-height: 1; flex: 0 0 auto; }
.portal .ptxt { min-width: 0; }
.portal .ptxt b { display: block; font-size: 15px; font-weight: 700; }
.portal .ptxt small { display: block; font-size: 11.5px; color: var(--txt3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal::after {
  content: "进入 ↗"; margin-left: auto; flex: 0 0 auto;
  font-size: 11.5px; font-weight: 600; color: var(--txt3);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
}
/* 外部第三方站点：换了色调，卡片上带"外部"角标，老师一眼能区分 */
.portal.ext {
  background: linear-gradient(120deg, rgba(148,120,255,.14), rgba(120,120,140,.06));
  border-color: rgba(140,120,200,.3);
}
.portal.ext:hover {
  background: linear-gradient(120deg, rgba(148,120,255,.24), rgba(120,120,140,.12));
  border-color: rgba(165,145,235,.55);
}
.pbadge {
  display: inline-block; margin-left: 6px; vertical-align: 2px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .2px;
  padding: 1px 5px; border-radius: 4px;
  color: #d9ccff; background: rgba(140,110,240,.28);
  border: 1px solid rgba(160,135,245,.45);
}

/* ---------------- 分类 ---------------- */
.cats {
  display: flex; gap: 10px; padding: 18px 26px 4px;
  overflow-x: auto; scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); color: var(--txt2);
  font-size: 14.5px; font-weight: 600; font-family: inherit;
  transition: all .15s;
}
.cat:hover { color: var(--txt); border-color: #33455c; background: var(--card); }
.cat.on {
  background: linear-gradient(135deg, rgba(255,122,41,.18), rgba(255,176,32,.12));
  border-color: rgba(255,122,41,.55); color: #fff;
  box-shadow: 0 4px 14px rgba(255,122,41,.15);
}
.cat .n { font-size: 11.5px; color: var(--txt3); font-weight: 500; }
.cat.on .n { color: rgba(255,255,255,.6); }

/* ---------------- 卡片网格 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 18px 16px;
  padding: 18px 26px 10px;
}
.tile {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .16s ease-out, box-shadow .16s, border-color .16s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.5); border-color: #33455c; }
.tile:active { transform: translateY(0) scale(.99); }

.thumb {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(135deg, #1b2530, #131a23);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tile:hover .thumb img { transform: scale(1.05); }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
  opacity: 0; transition: opacity .18s;
}
.tile:hover .thumb .play { opacity: 1; }
.thumb .play i {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #111; display: grid; place-items: center;
  font-size: 18px; font-style: normal; padding-left: 3px;
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
}
.dur {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.78); color: #fff; font-size: 11.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 5px; letter-spacing: .3px;
  backdrop-filter: blur(4px);
}
.src {
  position: absolute; left: 8px; top: 8px;
  background: rgba(251,114,153,.95); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; letter-spacing: .5px;
}
.pin-flag {
  position: absolute; right: 8px; top: 8px;
  background: rgba(255,176,32,.95); color: #241800; font-size: 10.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 5px;
}

.meta { padding: 10px 12px 13px; }
.meta h3 {
  font-size: 14.5px; font-weight: 650; line-height: 1.38;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
}
.meta .sub {
  display: flex; align-items: center; gap: 6px; margin-top: 7px;
  font-size: 11.5px; color: var(--txt3);
}
.meta .sub .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .note {
  margin-top: 6px; font-size: 11.5px; color: #b6c2d2;
  background: rgba(59,130,246,.1); border-left: 2px solid var(--blue);
  padding: 4px 7px; border-radius: 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 70px 20px; color: var(--txt3); }
.empty-ico { font-size: 54px; opacity: .5; margin-bottom: 14px; }
.empty p { font-size: 14.5px; }

/* ---------------- 底部 ---------------- */
.foot {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 26px 20px 0; color: var(--txt3); font-size: 12px;
}
.foot-btn {
  background: none; border: 1px solid var(--line); border-radius: 7px;
  color: var(--txt3); font-size: 12px; padding: 4px 10px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.foot-btn:hover { color: var(--accent); border-color: rgba(255,122,41,.5); }

/* ---------------- 播放层 ---------------- */
.player {
  position: fixed; inset: 0; z-index: 900; background: #000;
  display: flex; flex-direction: column;
  animation: fadeUp .22s ease-out;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.pbar {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
  padding: 8px 14px; background: rgba(12,16,22,.94);
  border-bottom: 1px solid #1c2530;
}
.pbtn {
  width: 38px; height: 38px; flex: 0 0 auto; border: none; border-radius: 9px; cursor: pointer;
  background: #1b2530; color: var(--txt); font-size: 16px; font-family: inherit;
  display: grid; place-items: center; transition: background .15s;
}
.pbtn:hover { background: #26333f; }
.pbtn.ghost { background: #141c25; color: var(--txt2); }
.pbtn.ghost:hover { background: #1f2a36; color: var(--txt); }
.ptitle { flex: 1; min-width: 0; }
.ptitle b { display: block; font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptitle span { display: block; font-size: 11.5px; color: var(--txt3); margin-top: 2px; }
.pnav { display: flex; gap: 7px; }

.pframe { flex: 1 1 auto; position: relative; background: #000; overflow: hidden; }
.pframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.ptip {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  font-size: 11.5px; color: #56637a; background: rgba(0,0,0,.5);
  padding: 5px 12px; border-radius: 20px; pointer-events: none;
  opacity: .9;
}

/* ---------------- 遮罩 + 抽屉 ---------------- */
.mask { position: fixed; inset: 0; z-index: 700; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 800;
  width: min(620px, 100vw);
  background: #10161e; border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  animation: slideIn .22s ease-out;
  box-shadow: -20px 0 60px rgba(0,0,0,.6);
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }

.dhead {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.dtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.dtabs::-webkit-scrollbar { display: none; }
.dtab {
  padding: 8px 14px; border: none; border-radius: 8px; background: transparent;
  color: var(--txt2); font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: all .15s;
}
.dtab:hover { background: #1a2330; color: var(--txt); }
.dtab.on { background: rgba(255,122,41,.16); color: var(--accent); }

.dbody { flex: 1 1 auto; overflow-y: auto; padding: 16px; }
.dbody[hidden] { display: none; }

.srow { display: flex; gap: 9px; }
.srow input {
  flex: 1; height: 42px; padding: 0 13px; border-radius: 9px;
  background: #0c1219; border: 1px solid var(--line); color: var(--txt);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s;
}
.srow input:focus { border-color: var(--accent); }
.btn-go {
  height: 42px; padding: 0 20px; border: none; border-radius: 9px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #e85d04); color: #fff;
  font-size: 14px; font-weight: 700; font-family: inherit; white-space: nowrap;
  transition: filter .15s;
}
.btn-go:hover { filter: brightness(1.08); }
.btn-go.wide { width: 100%; margin-top: 6px; }
.btn-go:disabled { opacity: .5; cursor: default; filter: none; }

.hint { font-size: 11.5px; color: var(--txt3); line-height: 1.6; margin: 9px 0 14px; }

/* 搜索结果 */
.slist { display: flex; flex-direction: column; gap: 9px; }
.sres {
  display: grid; grid-template-columns: 116px 1fr auto; gap: 11px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  transition: border-color .15s;
}
.sres:hover { border-color: #33455c; }
.sres .cv { width: 116px; aspect-ratio: 16/9; border-radius: 6px; object-fit: cover; background: #0a0e13; }
.sres .info { min-width: 0; }
.sres .info b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; font-weight: 600; line-height: 1.35;
}
.sres .info span { display: block; font-size: 11px; color: var(--txt3); margin-top: 5px; }
.sres .act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.btn-mini {
  padding: 6px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  background: #1e2937; border: 1px solid var(--line); color: var(--txt2);
  font-size: 12px; font-weight: 600; font-family: inherit; transition: all .15s;
}
.btn-mini:hover { background: #26333f; color: var(--txt); }
.btn-mini.go { background: linear-gradient(135deg, var(--accent), #e85d04); border: none; color: #fff; }
.btn-mini.on { background: rgba(16,185,129,.18); border-color: rgba(16,185,129,.5); color: #34d399; }

.catsel {
  background: #0c1219; border: 1px solid var(--line); color: var(--txt2);
  border-radius: 7px; padding: 5px 6px; font-size: 12px; font-family: inherit; outline: none;
}

/* 管理列表 */
.mrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 12.5px; color: var(--txt3); }
.mlist { display: flex; flex-direction: column; gap: 8px; }
.mitem {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 7px;
}
.mitem img { width: 76px; aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; background: #0a0e13; }
.mitem .md { min-width: 0; }
.mitem .md input {
  width: 100%; background: transparent; border: none; border-bottom: 1px dashed transparent;
  color: var(--txt); font-size: 12.5px; font-family: inherit; padding: 2px 0; outline: none;
}
.mitem .md input:hover { border-bottom-color: #33455c; }
.mitem .md input:focus { border-bottom-color: var(--accent); }
.mitem .md .mcat { display: flex; gap: 6px; margin-top: 5px; }
.mitem .ops { display: flex; flex-direction: column; gap: 4px; }
.mitem .ops .btn-mini { padding: 4px 9px; font-size: 11px; }

/* 设置表单 */
.fld { display: block; margin-bottom: 14px; }
.fld span { display: block; font-size: 12px; color: var(--txt2); margin-bottom: 6px; }
.fld input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 8px;
  background: #0c1219; border: 1px solid var(--line); color: var(--txt);
  font-size: 14px; font-family: inherit; outline: none;
}
.fld input:focus { border-color: var(--accent); }
.chk { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt2); margin-bottom: 16px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }

/* 口令弹窗 */
.keybox { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; background: rgba(0,0,0,.72); }
.kcard {
  width: min(330px, 88vw); background: #141c25; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.7);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.kcard h3 { font-size: 16px; margin-bottom: 5px; }
.kcard p { font-size: 12px; color: var(--txt3); margin-bottom: 16px; }
.kcard input {
  width: 100%; height: 44px; text-align: center; letter-spacing: 4px; font-size: 18px;
  background: #0c1219; border: 1px solid var(--line); border-radius: 9px;
  color: var(--txt); font-family: inherit; outline: none;
}
.kcard input:focus { border-color: var(--accent); }
.krow { display: flex; gap: 9px; margin-top: 14px; }
.krow .btn-mini { flex: 1; height: 40px; }
.krow .btn-go { flex: 1.4; }
.kerr { font-size: 12px; color: #f87171; text-align: center; margin-top: 9px; min-height: 16px; }

/* ---------------- 手机 ---------------- */
@media (max-width: 860px) {
  .hero { padding: 16px 14px 2px; }
  .hero-t { font-size: 15.5px; margin-bottom: 12px; }
  .hero-search { padding: 6px 6px 6px 14px; gap: 8px; }
  .hero-search input { height: 40px; font-size: 15px; }
  .hero-search button { height: 40px; padding: 0 18px; font-size: 14px; }
  .hero-tip { font-size: 11.5px; line-height: 1.5; }
  .netres { padding: 16px 14px 0; }
  .ns-grid { grid-template-columns: 1fr; gap: 9px; }
  .ns-local { grid-template-columns: 1fr; }
  .portals-head { padding: 20px 14px 0; font-size: 13.5px; }
  .rec-head { padding: 0 14px 8px; gap: 8px; }
  .rec-head h3 { font-size: 15px; }
  .rec-head i { display: none; }
  .rec-strip { padding: 2px 14px 8px; gap: 10px; }
  .rec-card { width: 150px; }
  .rc-title { font-size: 12.5px; }
  .rec-loading { margin: 6px 14px; }
  .mine > summary { padding: 14px; }
  .portals-head i { font-size: 11px; }
  .portals { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 0; }
  .portal { padding: 10px 11px; gap: 8px; }
  .portal .pico { font-size: 21px; }
  .portal .ptxt { flex: 1; min-width: 0; }
  .portal .ptxt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .portal .ptxt small { display: none; }
  .portal::after { display: none; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 11px 14px; }
  .brand-txt h1 { font-size: 18px; }
  .brand-txt p { font-size: 11px; }
  .top-actions { width: 100%; }
  .searchbox { flex: 1; height: 42px; }
  .searchbox input { width: 100%; font-size: 15px; }
  .btn-add { height: 42px; padding: 0 14px; font-size: 13.5px; }
  .cats { padding: 12px 14px 2px; gap: 8px; }
  .cat { height: 38px; padding: 0 15px; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px 10px; padding: 14px 14px 8px; }
  .meta { padding: 8px 9px 11px; }
  .meta h3 { font-size: 13px; min-height: 36px; -webkit-line-clamp: 2; }
  .meta .sub { font-size: 10.5px; }
  .drawer { width: 100vw; }
  .sres { grid-template-columns: 96px 1fr; }
  .sres .cv { width: 96px; }
  .sres .act { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .pbar { padding: 6px 10px; gap: 8px; }
  .pbtn { width: 34px; height: 34px; font-size: 14px; }
  .ptitle b { font-size: 13px; }
  .ptitle span { display: none; }
}

/* 一体机大屏：卡片再大一点 */
@media (min-width: 1600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 22px 18px; }
  .meta h3 { font-size: 15px; }
}
