/* 115资源站 — 深色海报墙风格，移动端友好 */
:root {
  --bg: #0e1013; --card: #161920; --card2: #1e232e; --line: #282e3b;
  --text: #e9ebf1; --muted: #98a0b3; --accent: #4da3ff; --accent2: #ffb84d;
  --green: #3ecf8e; --red: #ff6b6b; --radius: 12px;
  --shadow: 0 8px 28px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body { margin: 0; color: var(--text);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(77,163,255,.07), transparent 60%),
    var(--bg);
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.55; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
::selection { background: rgba(77,163,255,.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c3342; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; background: rgba(14,16,19,.88); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.logo { font-size: 18px; font-weight: 800; color: var(--text); white-space: nowrap; letter-spacing: .5px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); padding: 10px 18px; border-radius: 9px; font-size: 17px; min-height: 48px;
  display: inline-flex; align-items: center; white-space: nowrap; transition: background .15s, color .15s; }
.nav a.active, .nav a:hover { color: var(--text); background: var(--card2); }
.nav a.active { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 9px 9px 0 0; }
.userbox { font-size: 13px; color: var(--muted); white-space: nowrap; }
.userbox b { color: var(--accent2); }

#view { max-width: 1080px; margin: 0 auto; padding: 18px 16px 32px; min-height: 70vh;
  animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 16px;
  border-top: 1px solid var(--line); }

/* 搜索区 */
.searchbox { display: flex; gap: 8px; margin: 10px 0 16px; }
.searchbox input { flex: 1; font-size: 16px; padding: 13px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  transition: border-color .15s, box-shadow .15s; }
.searchbox input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77,163,255,.18); }
.btn { font-size: 15px; padding: 12px 20px; border: none; border-radius: var(--radius); cursor: pointer;
  min-height: 44px; font-weight: 700; color: #06121f;
  background: linear-gradient(180deg, #6db4ff, var(--accent));
  box-shadow: 0 4px 14px rgba(77,163,255,.25);
  transition: transform .12s, box-shadow .15s, filter .15s; }
.btn:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(77,163,255,.35); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn.small { padding: 8px 14px; font-size: 13px; min-height: 36px; border-radius: 9px; }
.btn.danger { background: linear-gradient(180deg, #ff8585, var(--red)); color: #fff;
  box-shadow: 0 4px 14px rgba(255,107,107,.25); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; padding: 3px; gap: 2px; }
.seg button { background: none; border: none; color: var(--muted); padding: 9px 18px; font-size: 14px;
  cursor: pointer; border-radius: 7px; transition: all .15s; }
.seg button.on { background: var(--card2); color: var(--text); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line); }

h2.sec { font-size: 17px; margin: 24px 0 12px; padding-left: 10px; position: relative; letter-spacing: .5px; }
h2.sec::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px;
  border-radius: 2px; background: linear-gradient(180deg, var(--accent), var(--accent2)); }
.muted { color: var(--muted); } .small { font-size: 13px; }

/* 海报墙 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card:hover { border-color: rgba(77,163,255,.6); transform: translateY(-4px); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--card2);
  transition: transform .25s ease; }
.card:hover img { transform: scale(1.05); }
.card .t { padding: 9px 10px; font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 55px; }
.card .t .y { color: var(--muted); font-size: 12px; }
.card .t .r { color: var(--accent2); font-size: 12px; }
/* 搜索结果卡片中的影片标题（可点击跳转） */
.restitle { font-weight: 700; font-size: 16px; margin: 8px 0 3px; line-height: 1.4; }
.restitle[data-go] { cursor: pointer; color: var(--accent); }
/* 资源卡片：海报 + 信息左右布局（搜索结果用） */
.res-main { display: flex; gap: 12px; }
.res-poster { width: 112px; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px;
  background: var(--card2); flex-shrink: 0; align-self: flex-start; }
.res-poster[data-go] { cursor: pointer; }
.res-info { flex: 1; min-width: 0; }
/* 骨架屏：内容加载前的占位 shimmer，避免"加载中…"文字闪烁 */
.skel { aspect-ratio: 2/3; border-radius: var(--radius); background: linear-gradient(100deg, var(--card2) 40%, #252d42 50%, var(--card2) 60%);
  background-size: 200% 100%; animation: skshimmer 1.3s linear infinite; }
@keyframes skshimmer { to { background-position: -200% 0; } }

/* 影片详情 */
.media-head { display: flex; gap: 18px; margin-bottom: 18px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.media-head img { width: 150px; border-radius: 10px; aspect-ratio: 2/3; object-fit: cover;
  background: var(--card2); box-shadow: var(--shadow); flex-shrink: 0; }
.media-head .info h1 { margin: 0 0 8px; font-size: 22px; letter-spacing: .5px; }
.media-head .info p { color: var(--muted); font-size: 14px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* 网盘筛选 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { padding: 8px 15px; border-radius: 20px; background: var(--card2); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on { background: linear-gradient(180deg, #6db4ff, var(--accent)); color: #06121f;
  border-color: var(--accent); font-weight: 700; }

/* 资源行 */
.res { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s; }
.res:hover { border-color: #3a4356; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.res .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tag { font-size: 12px; padding: 3px 11px; border-radius: 12px; background: var(--card2);
  border: 1px solid var(--line); color: var(--accent2); }
.tag.disk { color: var(--accent); border-color: rgba(77,163,255,.4); }
.tag.vip { color: #7dd3fc; border-color: rgba(125,211,252,.5); background: rgba(125,211,252,.08); }
.res .meta { color: var(--muted); font-size: 12.5px; margin: 4px 0; line-height: 1.7; }
.res .note { font-size: 12.5px; color: var(--muted); margin: 6px 0; line-height: 1.6; }
.res .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.linkbox { background: #0a0d12; border: 1px dashed var(--accent); border-radius: 10px; padding: 12px;
  margin-top: 10px; word-break: break-all; font-size: 13px; }
.linkbox code { color: var(--green); }
.cost { color: var(--accent2); font-weight: 700; }

/* 表单 */
.form { max-width: 560px; }
.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; font-size: 16px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--text);
  transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77,163,255,.18); }
.field input[readonly] { background: var(--card2); color: var(--text); }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.pick { display: flex; gap: 12px; align-items: center; background: var(--card);
  border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px; margin-bottom: 12px;
  box-shadow: 0 0 0 3px rgba(77,163,255,.12); }
.pick img { width: 54px; border-radius: 6px; aspect-ratio: 2/3; object-fit: cover; }

/* 管理后台 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { padding: 10px 17px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 14px; cursor: pointer; transition: all .15s; }
.tabs button:hover { color: var(--text); border-color: var(--accent); }
.tabs button.on { background: var(--card2); color: var(--text); font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent); }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line);
  vertical-align: top; }
table.list th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .5px; }
table.list tbody tr, table.list tr:not(:first-child) { transition: background .12s; }
table.list tr:not(:first-child):hover { background: rgba(77,163,255,.05); }
.wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); }
.urlcell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #232936;
  border: 1px solid var(--line); padding: 13px 22px; border-radius: 12px; font-size: 14px; z-index: 50;
  box-shadow: var(--shadow); animation: toastup .25s ease; max-width: 90vw; text-align: center; }
@keyframes toastup { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; font-size: 14px; line-height: 2; }
.points { display: inline-block; background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 20px; margin: 8px 8px 8px 0; }
.points b { font-size: 22px; color: var(--accent2); }

/* 锁定页（未登录） */
.lock { max-width: 430px; margin: 13vh auto 0; text-align: center; padding: 36px 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.lock .logo-big { font-size: 60px; margin-bottom: 14px;
  filter: drop-shadow(0 6px 18px rgba(77,163,255,.35)); }
.lock h1 { font-size: 23px; margin: 0 0 10px; letter-spacing: 1px; }
.lock p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0 0 6px; }
.lock .actions { margin-top: 24px; display: flex; gap: 10px; justify-content: center; }

/* 管理后台统计卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px;
  text-align: center; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .n { font-size: 23px; font-weight: 800; color: var(--accent); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* 首页公告条 */
.announce { background: linear-gradient(90deg, #2b2118, #241d14); border: 1px solid #6b5320; color: #f5cf87;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-size: 14px; line-height: 1.7; }
.announce code { background: rgba(0,0,0,.3); padding: 2px 8px; border-radius: 6px; color: #ffe1a8; }

/* 导航未读徽标 */
.badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff; background: #e5484d; border-radius: 9px; padding: 0 5px;
  margin-left: 4px; vertical-align: 2px; }

/* 通知列表 */
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px;
  border: 1px solid var(--line); background: var(--card); border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer; transition: border-color .15s; }
.notif:hover { border-color: #3a4356; }
.notif.unread { border-color: #6b5320; background: #221c12; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; margin-top: 6px; flex-shrink: 0; }
.notif.read .dot { background: transparent; }
.notif .tt { flex: 1; font-size: 14px; line-height: 1.6; }
.notif .time { font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 640px) {
  .media-head { flex-direction: row; padding: 12px; gap: 12px; }
  .media-head img { width: 104px; }
  .media-head .info h1 { font-size: 18px; }
  .media-head .info p { -webkit-line-clamp: 4; font-size: 13px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 10px; }
  .card .t { min-height: 52px; font-size: 12px; }
  .topbar { padding: 8px 12px 4px; gap: 6px; flex-wrap: wrap; row-gap: 0; }
  .logo { flex: 1; font-size: 17px; }
  .nav { order: 3; flex: 1 1 100%; }
  .nav a { padding: 10px 15px; font-size: 16px; min-height: 46px; }
  #view { padding: 14px 12px 28px; }
  .lock { margin: 8vh 12px 0; }
  .searchbox { margin: 8px 0 12px; }
  h2.sec { font-size: 16px; margin: 20px 0 10px; }
}
