:root {
  --bg: #07080f;
  --bg2: #0d1020;
  --panel: rgba(255, 255, 255, 0.05);
  --panel2: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.1);
  --fg: #eef1ff;
  --dim: #98a0c0;
  --acc: #5b8cff;
  --acc2: #b06bff;
  --ok: #2fd6a0;
  --radius: 16px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;   /* iOS 横屏不要自动放大字号 */
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { min-height: 100vh; padding-bottom: 60px; overflow-x: hidden; position: relative; }

/* 背景里淡淡的 dfy 水印，不影响阅读 */
body::after {
  content: 'dfy'; position: fixed; z-index: -1; right: -2vw; bottom: 4vh;
  font-size: clamp(180px, 30vw, 420px); font-weight: 900; font-style: italic;
  letter-spacing: 0.02em; line-height: 0.8; pointer-events: none; user-select: none;
  color: rgba(124, 199, 255, 0.045);
  -webkit-text-stroke: 1px rgba(47, 214, 160, 0.05);
}

::selection { background: rgba(91, 140, 255, 0.38); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0a0c15; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(91,140,255,.55), rgba(47,214,160,.45));
  border-radius: 8px; border: 2px solid #0a0c15;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(91,140,255,.85), rgba(47,214,160,.7)); }

/* 手机上触屏要跟手：去掉双击缩放和点击高亮 */
button, a, .card, .chip, .src-pill, .playsrc .item, .eps button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.aurora {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: -1;
  background:
    radial-gradient(45% 60% at 15% 20%, rgba(91, 140, 255, 0.28), transparent 70%),
    radial-gradient(40% 55% at 80% 10%, rgba(255, 110, 180, 0.2), transparent 70%),
    radial-gradient(35% 45% at 55% 45%, rgba(47, 214, 160, 0.12), transparent 70%);
  filter: blur(20px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(-10px) scale(1); } to { transform: translateY(20px) scale(1.06); } }

/* ---------- 顶栏 ---------- */
.top-wrap {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(7,8,15,0.94) 60%, rgba(7,8,15,0.62) 100%);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.055);
}
.top-wrap::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,199,255,0.45), rgba(47,214,160,0.35), transparent);
}
.top {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 15px clamp(16px, 4vw, 48px) 12px;
  max-width: 1480px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 13px; }
.logo {
  width: 46px; height: 46px; flex: 0 0 auto; display: block;
  filter: drop-shadow(0 6px 16px rgba(91, 140, 255, 0.5));
  transition: transform 0.4s cubic-bezier(.2,.8,.3,1.2);
}
.logo svg { width: 100%; height: 100%; display: block; }
.brand:hover .logo { transform: translateY(-2px) rotate(-4deg); }
.brand h1 {
  margin: 0; font-size: 25px; letter-spacing: 0.3px; font-weight: 800;
  display: flex; align-items: baseline; gap: 9px;
}
/* dfy 英文标识 */
.brand h1 .en {
  font-size: 12.5px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase;
  padding: 3px 9px 3px 11px; border-radius: 7px; color: #dff0ff;
  background: linear-gradient(135deg, rgba(91,140,255,.5), rgba(47,214,160,.42));
  border: 1px solid rgba(124,199,255,.4);
  box-shadow: 0 3px 12px rgba(91,140,255,.25) inset;
}
.brand p { margin: 2px 0 0; font-size: 12.5px; color: var(--dim); }
.brand b { color: var(--ok); font-weight: 700; }

.searchbar {
  flex: 1 1 380px; display: flex; gap: 10px; min-width: 280px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 6px 6px 20px; backdrop-filter: blur(14px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.searchbar:focus-within { border-color: rgba(91, 140, 255, 0.65); box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.13); }
.searchbar input {
  flex: 1; background: none; border: 0; outline: none; color: var(--fg);
  font-size: 15.5px; font-family: inherit;
}
.searchbar input::placeholder { color: #6d7595; }
.searchbar button {
  border: 0; cursor: pointer; padding: 11px 26px; border-radius: 999px;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff;
  font-size: 15px; font-weight: 700; font-family: inherit;
  transition: transform 0.15s, filter 0.2s;
}
.searchbar button:hover { transform: translateY(-1px); filter: brightness(1.1); }
.searchbar button:active { transform: translateY(0); }

/* 筛选栏跟着顶栏一起固定 */
.filters-wrap {
  position: sticky; top: 74px; z-index: 29;
  background: linear-gradient(180deg, rgba(7,8,15,0.9) 70%, rgba(7,8,15,0.5) 100%);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}
.filters {
  display: flex; gap: 22px; flex-wrap: wrap;
  padding: 6px clamp(16px, 4vw, 48px) 12px;
  max-width: 1480px; margin: 0 auto;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; cursor: pointer;
  font-family: inherit; transition: all 0.18s;
}
.chip:hover { color: var(--fg); border-color: rgba(255,255,255,0.22); }
.chip.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, rgba(91,140,255,0.95), rgba(176,107,255,0.9));
  box-shadow: 0 6px 18px rgba(91, 140, 255, 0.28);
}

/* ---------- 状态 / 热搜 ---------- */
.status {
  max-width: 1480px; margin: 8px auto 0; padding: 0 clamp(16px, 4vw, 48px);
  color: var(--dim); font-size: 13.5px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.status .tag {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 9px; font-size: 12px;
}
.status .tag.err { color: #ff9a9a; border-color: rgba(255, 100, 100, 0.35); }

.note {
  max-width: 1480px; margin: 18px auto 0; padding: 13px 18px;
  margin-left: clamp(16px, 4vw, 48px); margin-right: clamp(16px, 4vw, 48px);
  background: rgba(91, 140, 255, 0.07); border: 1px solid rgba(91, 140, 255, 0.22);
  border-radius: 12px; color: #a8b2d8; font-size: 12.8px; line-height: 1.75;
}
.note b { color: #cfd8ff; font-weight: 650; }
.note[hidden] { display: none; }

.hot { max-width: 1480px; margin: 26px auto 0; padding: 0 clamp(16px, 4vw, 48px); }.hot h2 { font-size: 15px; color: var(--dim); font-weight: 600; margin: 0 0 14px; letter-spacing: 0.4px; }
.hot .row { display: flex; gap: 10px; flex-wrap: wrap; }
.hot .row button {
  background: var(--panel); border: 1px solid var(--line); color: var(--fg);
  padding: 9px 18px; border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 14px;
  transition: all 0.18s;
}
.hot .row button:hover { background: var(--panel2); transform: translateY(-2px); border-color: rgba(91,140,255,0.5); }

/* ---------- 结果网格 ---------- */
.grid {
  max-width: 1480px; margin: 30px auto 0; padding: 0 clamp(16px, 4vw, 48px);
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, #141828, #0b0d16);
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.22s cubic-bezier(.2,.7,.3,1), box-shadow 0.22s, border-color 0.22s;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(91, 140, 255, 0.5);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(91,140,255,0.2);
}
.card .thumb { position: relative; aspect-ratio: 2/3; background: #0b0d16 center/cover no-repeat; }
.card .thumb.noimg::after {
  content: '🐟'; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; opacity: 0.28;
}
.card .thumb .noposter {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 42px; opacity: 0.3;
}
/* 手机端顶部栏：搜索框换行，滚动时也固定住 */
@media (max-width: 620px) {
  .top { padding: 11px 14px 9px; gap: 10px; }
  .searchbar { flex-basis: 100%; }
  .filters-wrap { top: 118px; }
  .filters { padding: 4px 14px 10px; gap: 9px; }
}

.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.45s cubic-bezier(.2,.7,.3,1); }
.card:hover .thumb img { transform: scale(1.05); }

/* 卡片入场 */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.card { animation: cardIn 0.42s cubic-bezier(.2,.75,.3,1) both; }
.card .score {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  background: rgba(6, 9, 18, 0.82); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 9px;
  padding: 4px 9px; font-size: 12.5px; font-weight: 700; color: #ffd76b;
}
.card .res {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  border-radius: 9px; padding: 4px 9px; font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.5px; color: #06110c;
  background: linear-gradient(135deg, #7cf0c0, #2fd6a0);
  box-shadow: 0 4px 14px rgba(47, 214, 160, 0.35);
}
.card .res.r4k { background: linear-gradient(135deg, #ffd76b, #ff9f43); color: #201400; }
.card .res.r720 { background: linear-gradient(135deg, #a9b6d8, #6d7a9e); color: #0a0d18; }
.card .playable {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  background: rgba(6, 20, 14, 0.88); backdrop-filter: blur(6px);
  border: 1px solid rgba(47, 214, 160, 0.5); border-radius: 9px;
  padding: 4px 9px; font-size: 11.5px; font-weight: 800; color: var(--ok);
}
.card .meta .lines { color: var(--ok); }
.card .badge-resnote {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: linear-gradient(0deg, rgba(6,9,18,0.9), transparent);
  color: #a8b2d8; font-size: 10.5px; padding: 16px 9px 6px; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .info { padding: 11px 12px 13px; }
.card h3 {
  margin: 0 0 5px; font-size: 14.5px; line-height: 1.35; font-weight: 650;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.card .meta { font-size: 12px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; }
.card .src { color: #7f8ab0; }

.skeleton {
  border-radius: var(--radius); aspect-ratio: 2/3;
  background: linear-gradient(100deg, #10132180 30%, #1b203880 50%, #10132180 70%);
  background-size: 220% 100%; animation: sk 1.35s linear infinite;
  border: 1px solid rgba(255,255,255,0.05);
}
@keyframes sk { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.empty { grid-column: 1/-1; text-align: center; color: var(--dim); padding: 70px 20px; font-size: 15px; }

/* ---------- 加载更多 ---------- */
.loadmore-wrap { max-width: 1480px; margin: 34px auto 0; padding: 0 clamp(16px, 4vw, 48px); text-align: center; }
.loadmore {
  background: linear-gradient(135deg, rgba(91,140,255,0.18), rgba(47,214,160,0.14));
  border: 1px solid rgba(124,199,255,0.35); color: #dbe6ff;
  padding: 12px 40px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 14.5px; font-weight: 650; letter-spacing: 0.3px;
  transition: all 0.22s;
}
.loadmore:hover {
  background: linear-gradient(135deg, rgba(91,140,255,0.34), rgba(47,214,160,0.26));
  border-color: rgba(124,199,255,0.7);
  box-shadow: 0 8px 26px rgba(91,140,255,0.28);
  transform: translateY(-2px);
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1480px; margin: 50px auto 0; padding: 22px clamp(16px, 4vw, 48px);
  color: #6d7595; font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; border-top: 1px solid rgba(255,255,255,0.06);
}
.foot a { color: #8fa4ff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .footbrand {
  margin-left: auto; font-weight: 800; letter-spacing: 0.4px;
  background: linear-gradient(135deg, #7cc7ff, #2fd6a0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.85;
}

/* ---------- 当前登录用户 ---------- */
.who {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: 5px 6px 5px 5px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
}
.who[hidden] { display: none; }
.who .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #06110c;
  background: linear-gradient(135deg, #7cc7ff, #2fd6a0);
  text-transform: uppercase;
}
.who .who-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who .who-meta b { font-size: 13px; font-weight: 650; }
.who .who-meta i {
  font-style: normal; font-size: 10.5px; color: var(--ok);
  letter-spacing: .4px;
}
.who .who-meta i.owner { color: #ffd76b; }
.who .who-meta i.admin { color: #7cc7ff; }
.who .mini {
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-family: inherit;
  cursor: pointer; border: 1px solid rgba(124,199,255,0.45); color: #dbe6ff;
  background: linear-gradient(135deg, rgba(91,140,255,0.28), rgba(47,214,160,0.2));
  transition: all .18s; touch-action: manipulation; white-space: nowrap;
}
.who .mini:hover { border-color: rgba(124,199,255,.85); transform: translateY(-1px); }
.who .mini.ghost {
  background: none; border-color: rgba(255,255,255,0.14); color: #9aa5cc;
}
.who .mini.ghost:hover { color: #ff9a9a; border-color: rgba(255,120,120,.5); }

/* ---------- 账号管理 ---------- */
.admin-body { width: min(760px, 95vw); height: auto; max-height: 88vh; }
.admin-head { flex: 0 0 auto; padding: 22px 26px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.admin-head h2 { margin: 0 0 5px; font-size: 19px; }
.admin-head p { margin: 0; font-size: 12.5px; color: var(--dim); }
.admin-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 26px 26px; }

.admin-users { display: flex; flex-direction: column; gap: 11px; }
.auser {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 13px; padding: 13px 15px;
}
.auser.me { border-color: rgba(47,214,160,0.45); background: rgba(47,214,160,0.06); }
.auser .a-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #06110c;
  background: linear-gradient(135deg, #7cc7ff, #2fd6a0); text-transform: uppercase;
}
.auser .a-info { flex: 1 1 150px; min-width: 0; }
.auser .a-info b { display: block; font-size: 14.5px; }
.auser .a-info span { font-size: 11.5px; color: var(--dim); }
.auser .a-role {
  font-size: 11.5px; padding: 3px 9px; border-radius: 7px; white-space: nowrap;
  border: 1px solid currentColor; opacity: .95;
}
.auser .a-role.owner { color: #ffd76b; }
.auser .a-role.admin { color: #7cc7ff; }
.auser .a-role.user { color: #9aa5cc; }
.auser .a-ops { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.auser .a-ops button {
  padding: 7px 12px; border-radius: 9px; font-size: 12px; font-family: inherit; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: #cdd5f5;
  transition: all .16s; touch-action: manipulation;
}
.auser .a-ops button:hover { background: rgba(255,255,255,0.12); }
.auser .a-ops button.danger:hover { color: #ff9a9a; border-color: rgba(255,120,120,.5); }
.auser .a-ops button.ok { color: #7cf0c0; border-color: rgba(47,214,160,.45); }

.admin-add { margin-top: 22px; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 18px; }
.admin-add h3 { margin: 0 0 12px; font-size: 14.5px; color: #d8def7; font-weight: 650; }
.admin-form { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.admin-form input, .admin-form select {
  padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--fg);
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.11);
  border-radius: 10px; outline: none; width: 100%;
}
.admin-form input:focus, .admin-form select:focus { border-color: rgba(124,199,255,.7); }
.admin-form button {
  grid-column: 1 / -1; padding: 12px; border: 0; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  transition: filter .18s, transform .16s;
}
.admin-form button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.admin-tip { margin: 10px 0 0; font-size: 12.5px; min-height: 18px; color: var(--dim); }
.admin-tip.err { color: #ff9a9a; }
.admin-tip.ok { color: var(--ok); }

@media (max-width: 620px) {
  .who { width: 100%; justify-content: space-between; }
  .who .mini { padding: 7px 11px; font-size: 12px; }
  .admin-body { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .admin-head { padding: 18px 16px 12px; }
  .admin-content { padding: 14px 16px 26px; }
  .admin-form { grid-template-columns: 1fr; }
  .auser .a-ops { margin-left: 0; width: 100%; }
  .auser .a-ops button { flex: 1 1 auto; }
}

/* ---------- 详情弹层 ---------- */
/* 注意: [hidden] 必须显式 display:none —— .modal 自带的 display:grid 会盖掉 hidden 属性 */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal * { box-sizing: border-box; }
.modal-mask { position: absolute; inset: 0; background: rgba(3, 5, 12, 0.78); backdrop-filter: blur(7px); }
.modal-body {
  position: relative; display: flex; flex-direction: column;
  width: min(1060px, 95vw); height: 92vh; max-height: 92vh;
  background: linear-gradient(180deg, #10142a, #080a13);
  border: 1px solid rgba(255,255,255,0.11); border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.75); overflow: hidden;
  animation: pop 0.26s cubic-bezier(.18,.9,.3,1.05);
}
@keyframes pop { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 20;
  background: rgba(6,9,18,0.82); border: 1px solid rgba(255,255,255,0.2); color: #eef1ff;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 15px;
  font-family: inherit; line-height: 1; backdrop-filter: blur(6px);
}
.modal-close:hover { background: rgba(255,255,255,0.18); }

/* hero 固定不滚，内容区单独滚 —— 这样顶部大图不会被切 */
.modal-hero {
  position: relative; flex: 0 0 auto; height: 200px;
  background: #0b0d16 center/cover no-repeat;
}
.hero-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,19,0.3) 0%, rgba(8,10,19,0.85) 60%, #080a13 100%); }

.modal-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(16px, 3vw, 32px) 36px; }
.modal-content::-webkit-scrollbar { width: 9px; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 9px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }

.modal-head { display: flex; gap: 22px; flex-wrap: wrap; margin-top: -64px; position: relative; }
.modal-head > img {
  width: 168px; border-radius: 14px; object-fit: cover; flex: 0 0 auto;
  aspect-ratio: 2/3; background: #0b0d16;
  box-shadow: 0 18px 40px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.12);
}
.modal-meta { flex: 1 1 380px; min-width: 240px; padding-top: 66px; }
.modal-meta h2 { margin: 0 0 5px; font-size: 26px; line-height: 1.25; }
.sub { color: var(--dim); font-size: 13.5px; margin: 0 0 12px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badges span {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 10px; font-size: 12.5px; color: #cdd5f5;
}
.badges span.ok { color: var(--ok); border-color: rgba(47,214,160,0.4); }
.overview { color: #b9c1e0; font-size: 14px; line-height: 1.72; margin: 0 0 16px; max-height: 160px; overflow-y: auto; }
/* 简介默认折叠到 3 行，手机上别把播放器挤下去 */
.overview.clamped {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; max-height: none; margin-bottom: 6px;
}
.more-btn {
  background: none; border: 0; color: #8fa4ff; cursor: pointer; font-family: inherit;
  font-size: 13px; padding: 0 0 12px; text-align: left;
}
.more-btn:hover { text-decoration: underline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 10px 20px; border-radius: 11px; font-size: 14px; font-weight: 650;
  background: var(--panel2); border: 1px solid var(--line); color: var(--fg); cursor: pointer;
  font-family: inherit; transition: all 0.18s;
}
.btn.primary { background: linear-gradient(135deg, var(--acc), var(--acc2)); border-color: transparent; color: #fff; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---------- 播放区 ---------- */
.play-sec { margin-top: 26px; }
.srcline { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.src-pill {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--fg);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-family: inherit;
  transition: all 0.18s;
}
.src-pill:hover { border-color: rgba(91,140,255,0.55); }
.src-pill.active { background: linear-gradient(135deg, rgba(91,140,255,0.95), rgba(176,107,255,0.9)); border-color: transparent; color: #fff; }
.src-pill .n { font-weight: 700; color: var(--ok); font-size: 11.5px; }
.src-pill.active .n { color: #fff; }
.src-pill.dead { opacity: 0.45; cursor: not-allowed; }
.loading-line { color: var(--dim); font-size: 13px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

.player-wrap { margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #05060c; }
.player-wrap[hidden] { display: none; }
.player-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; font-size: 13px; color: var(--dim); border-bottom: 1px solid var(--line);
}
.player-head > div { display: flex; gap: 12px; align-items: center; }
.player-head button {
  background: none; border: 0; color: #8fa4ff; cursor: pointer; font-size: 13px;
  font-family: inherit; padding: 2px 4px;
}
.player-head #mQuality { color: var(--ok); font-weight: 700; font-size: 11.5px; cursor: default; }
.player-box { position: relative; aspect-ratio: 16/9; background: #000; }
.player-box video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

.eps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.eps button {
  background: var(--panel); border: 1px solid var(--line); color: var(--fg);
  border-radius: 9px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: all 0.16s; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eps button:hover { background: var(--panel2); border-color: rgba(91,140,255,0.55); }
.eps button.active { background: linear-gradient(135deg, var(--acc), var(--acc2)); border-color: transparent; color: #fff; }
.eps .tip { color: var(--dim); font-size: 12.5px; }

.playsrc { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.playsrc .item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.18s; min-width: 0;
}
.playsrc .item:hover { border-color: rgba(91,140,255,0.5); background: var(--panel2); }
.playsrc .item.active { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(47,214,160,0.35) inset; }
.playsrc .item .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.playsrc .item .m { flex: 0 0 auto; font-size: 11px; color: var(--dim); }
.playsrc .item .b { flex: 0 0 auto; font-size: 11px; color: var(--ok); }

.sec { font-size: 15px; margin: 26px 0 12px; color: #d8def7; letter-spacing: 0.3px; }
.sec-note { margin: -4px 0 12px; color: #8f9ac0; font-size: 12.5px; line-height: 1.7; }
.watch { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); }
.watch a {
  display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 13.5px; transition: all 0.18s; min-width: 0;
}
.watch a:hover { background: var(--panel2); border-color: rgba(91,140,255,0.55); transform: translateX(3px); }
.watch a img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.watch a > span:not(.q):not(.tagx):not(.tg) {
  flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.watch a .q { margin-left: auto; flex: 0 0 auto; font-size: 11px; color: var(--ok); white-space: nowrap; }
.watch a .tagx {
  flex: 0 0 auto; font-size: 10.5px; color: #9aa5cc; border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; white-space: nowrap;
}
.watch a .tg { font-size: 14px; flex: 0 0 auto; }

.stills { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stills figure { margin: 0; position: relative; }
.stills img { width: 100%; border-radius: 11px; display: block; border: 1px solid var(--line); }
.stills figcaption {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(6,9,18,0.85); border-radius: 7px; padding: 3px 8px; font-size: 11.5px; font-weight: 700;
  color: var(--ok);
}
.stills figcaption.k { color: #ffd76b; }

@media (max-width: 620px) {
  /* 手机端：字号别小于 16px，否则 iOS 聚焦输入框会自动放大页面 */
  .brand h1 { font-size: 22px; }
  .brand p { font-size: 12px; }
  .searchbar { flex-basis: 100%; padding: 5px 5px 5px 16px; }
  .searchbar input { font-size: 16px; }
  .searchbar button { padding: 10px 20px; font-size: 15px; }
  .filters { gap: 12px; padding-top: 10px; }
  .chip { padding: 8px 14px; font-size: 13px; }
  .note { font-size: 12.5px; padding: 11px 14px; }

  /* 详情页做成整屏，用动态视口高度避开手机地址栏 */
  .modal-body {
    width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh;
    border-radius: 0; border: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-hero { height: 120px; }
  .modal-content {
    padding: 0 14px calc(30px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }
  .modal-close { top: calc(10px + env(safe-area-inset-top)); width: 40px; height: 40px; }
  /* 手机上信息块做紧凑：小海报 + 标题 + 只留关键标签，把播放区尽早顶上来 */
  .modal-head { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; margin-top: -36px; }
  .modal-head > img { width: 88px; border-radius: 10px; }
  .modal-meta { flex: 1 1 auto; min-width: 0; padding-top: 22px; }
  .modal-meta h2 { font-size: 19px; margin: 0 0 3px; }
  .sub { font-size: 12px; margin: 0 0 8px; }
  .badges { gap: 6px; margin-bottom: 8px; }
  .badges span { padding: 3px 8px; font-size: 11.5px; }
  .overview { font-size: 13px; max-height: 120px; }
  .overview.clamped { -webkit-line-clamp: 2; }
  .play-sec { margin-top: 14px; }
  .sec { font-size: 14px; margin: 18px 0 10px; }
  .sec-note { font-size: 12px; }

  /* 播放器：手机竖屏别占满整屏，40vh 左右刚好能同时看到控制条和下面的集数 */
  .player-head { flex-wrap: wrap; gap: 8px; padding: 9px 11px; font-size: 12.5px; }
  .player-head > span:first-child { flex: 1 1 100%; }
  .player-head > div { width: 100%; justify-content: space-between; gap: 6px; }
  .player-head button { padding: 6px 9px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; }
  .player-box { aspect-ratio: auto; height: 38vh; min-height: 170px; max-height: 52vh; }

  .watch { grid-template-columns: 1fr; }
  .watch a { padding: 13px 14px; }
  .watch a .q { font-size: 11px; }
  .playsrc { grid-template-columns: 1fr; }
  .playsrc .item { padding: 12px; }
  .eps { gap: 7px; }
  .eps button { padding: 8px 12px; font-size: 12.5px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
  .loadmore { padding: 13px 40px; width: 100%; }
}
