/* ============================================================
   影阁 · 视频站样式（前台 + 后台）
   ============================================================ */
:root {
  --bg: #0a0c10;
  --bg-soft: #0f1218;
  --surface: #12151c;
  --surface-2: #171b24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --muted: #98a1b3;
  --muted-2: #6f7889;
  --primary: #e11d48;
  --primary-hover: #f43f5e;
  --primary-soft: rgba(225, 29, 72, 0.14);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-hover); outline-offset: 2px; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(225, 29, 72, 0.14), transparent 60%),
    radial-gradient(700px 420px at 0% 0%, rgba(59, 130, 246, 0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(10, 12, 16, 0.92); }
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.35);
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.nav-link {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-link.is-active { color: #fff; background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.search-form {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color 0.18s, background 0.18s, width 0.2s;
}
.search-form:focus-within { border-color: var(--primary); background: rgba(255, 255, 255, 0.08); }
.search-form input {
  width: 150px; border: 0; background: transparent; outline: none;
  color: var(--text); font-size: 13.5px;
}
.search-form input::placeholder { color: var(--muted-2); }
.search-form button {
  border: 0; cursor: pointer; padding: 4px 12px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 13px;
}
.admin-entry {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border);
  color: var(--muted); transition: 0.18s;
}
.admin-entry:hover { color: #fff; border-color: var(--border-strong); background: rgba(255, 255, 255, 0.06); }
.nav-toggle { display: none; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 90px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.96) 0%, rgba(10, 12, 16, 0.72) 45%, rgba(10, 12, 16, 0.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 55%);
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; color: #fca5b5;
  margin-bottom: 14px;
}
.hero-kicker::before { content: ""; width: 22px; height: 2px; background: var(--primary); border-radius: 2px; }
.hero-title {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -1px;
  margin-bottom: 16px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.hero-desc { color: #c6ccd8; font-size: 16px; max-width: 560px; margin-bottom: 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; cursor: pointer;
  transition: transform 0.16s, background 0.16s, border-color 0.16s, box-shadow 0.16s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 26px rgba(225, 29, 72, 0.3); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--border-strong); }
.btn-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.22); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------------- Chips / Sections ---------------- */
.chips-section { padding: 26px 0 4px; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted); font-size: 13.5px; white-space: nowrap;
  transition: 0.18s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { background: var(--text); color: #0a0c10; border-color: var(--text); font-weight: 600; }
.chip-count { font-size: 11px; opacity: 0.65; }

.section { padding: 40px 0 8px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; letter-spacing: -0.3px; }
.section-sub { color: var(--muted-2); font-size: 13px; }

/* ---------------- Video grid / cards ---------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 22px 18px;
}
.video-card { min-width: 0; }
.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}
.card-thumb:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.thumb-media { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card-thumb:hover .thumb-media img { transform: scale(1.05); }
.thumb-letter { font-size: 46px; font-weight: 800; color: rgba(255, 255, 255, 0.22); }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.85);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 12, 16, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; opacity: 0; transition: 0.22s;
}
.card-thumb:hover .play-badge { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.duration-badge {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 7px; border-radius: 5px;
  background: rgba(0, 0, 0, 0.72); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px;
}
.card-body { padding: 11px 2px 0; }
.card-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.card-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }
.card-meta { display: flex; gap: 10px; color: var(--muted-2); font-size: 12px; margin-top: 6px; }
.card-meta span + span::before { content: "·"; margin-right: 8px; color: var(--muted-2); }

/* ---------------- Rank ---------------- */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rank-card {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: 0.18s;
}
.rank-card:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--border-strong); }
.rank-no { font-size: 20px; font-weight: 800; width: 26px; color: var(--muted-2); font-style: italic; text-align: center; }
.rank-card:nth-child(1) .rank-no { color: #fbbf24; }
.rank-card:nth-child(2) .rank-no { color: #cbd5e1; }
.rank-card:nth-child(3) .rank-no { color: #d97706; }
.rank-thumb {
  width: 78px; height: 46px; border-radius: 6px; overflow: hidden;
  flex-shrink: 0; background: var(--surface-2); display: grid; place-items: center;
}
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { min-width: 0; display: flex; flex-direction: column; }
.rank-info strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-info small { color: var(--muted-2); font-size: 12px; }

/* ---------------- Category cards ---------------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.category-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  padding: 22px 18px; min-height: 104px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  transition: transform 0.2s, border-color 0.2s;
}
.category-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}
.category-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.category-name { position: relative; z-index: 1; font-size: 18px; font-weight: 700; }
.category-count { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, 0.72); }

/* ---------------- Page hero ---------------- */
.page-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 28px 0 30px;
  min-height: 190px;
  display: flex; align-items: flex-end;
}
.page-hero-bg { position: absolute; inset: 0; opacity: 0.7; }
.page-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 16, 0.9), rgba(10, 12, 16, 0.35));
}
.page-hero-content { position: relative; z-index: 1; padding: 34px 34px 30px; }
.page-hero-content h1 { font-size: clamp(26px, 3.4vw, 40px); margin: 4px 0 8px; letter-spacing: -0.5px; }
.page-hero-content p { color: var(--muted); font-size: 14px; }
.page-hero-compact { min-height: 0; background: var(--surface); }
.page-hero-compact .page-hero-content { padding: 34px; width: 100%; }
.search-form-lg { max-width: 560px; margin-top: 18px; height: 46px; border-radius: 12px; padding: 0 6px 0 16px; }
.search-form-lg input { flex: 1; width: auto; font-size: 14.5px; }
.search-form-lg button { height: 36px; padding: 0 18px; }

/* ---------------- Breadcrumb ---------------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; margin: 24px 0 16px; font-size: 13px; color: var(--muted-2); flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-current { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------------- Watch page ---------------- */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding-bottom: 50px; }
.player-shell {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.player-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-embed, .player-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-error {
  height: 100%; display: grid; place-items: center; padding: 24px; text-align: center;
  color: var(--muted); background: var(--surface);
}
.watch-info { padding: 22px 4px 0; }
.watch-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.watch-heading h1 { font-size: clamp(21px, 2.6vw, 30px); letter-spacing: -0.4px; }
.tag-featured {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px;
  color: #fecdd3; background: var(--primary-soft);
  border: 1px solid rgba(225, 29, 72, 0.4);
  padding: 2px 9px; border-radius: 999px;
}
.watch-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted-2); font-size: 13px; margin-top: 12px; }
.meta-link { color: #fda4af; }
.meta-link:hover { text-decoration: underline; }
.watch-desc {
  margin-top: 18px; padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #c3c9d4; font-size: 14px;
}
.watch-side { position: sticky; top: calc(var(--header-h) + 20px); }
.side-head h2 { font-size: 17px; margin-bottom: 14px; }
.side-list { display: flex; flex-direction: column; gap: 12px; }
.side-card { display: flex; gap: 12px; align-items: center; }
.side-thumb {
  width: 132px; aspect-ratio: 16/9; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; position: relative;
  background: var(--surface-2); border: 1px solid var(--border);
}
.side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-duration {
  position: absolute; right: 5px; bottom: 5px; font-size: 10.5px;
  background: rgba(0, 0, 0, 0.75); padding: 1px 5px; border-radius: 4px;
}
.side-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.side-info strong { font-size: 13.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-info small { color: var(--muted-2); font-size: 11.5px; }
.side-card:hover strong { color: #fda4af; }
.side-empty { color: var(--muted-2); font-size: 13px; }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 36px 0 10px; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--border);
  color: var(--muted); font-size: 13.5px;
  transition: 0.16s;
}
.page-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }
.page-btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.page-gap { color: var(--muted-2); align-self: center; }

/* ---------------- Empty / notices ---------------- */
.empty-state {
  text-align: center; padding: 84px 24px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  margin: 40px 0;
}
.empty-icon { color: var(--muted-2); display: flex; justify-content: center; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 460px; margin: 0 auto 22px; }
.notice {
  margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.notice-success { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.08); color: #86efac; }
.notice-error { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); color: #fca5a5; }
.notice-info { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.08); color: #93c5fd; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 50px; padding: 40px 0 28px; background: rgba(255, 255, 255, 0.012); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 24px; align-items: start; }
.footer-brand p { color: var(--muted-2); font-size: 13px; margin-top: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-end; font-size: 13.5px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.copyright { grid-column: 1 / -1; color: var(--muted-2); font-size: 12.5px; border-top: 1px solid var(--border); padding-top: 18px; }

/* ============================================================
   Admin
   ============================================================ */
.admin-body { background: var(--bg-soft); }
.admin-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.admin-sidebar {
  width: 232px; flex-shrink: 0;
  background: #0c0f14;
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { padding: 0 8px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.admin-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.admin-nav a.is-active { color: #fff; background: var(--primary-soft); }
.admin-nav svg { flex-shrink: 0; opacity: 0.85; }
.admin-sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; font-size: 12.5px; color: var(--muted-2); }
.admin-sidebar-foot a { display: block; padding: 6px 8px; color: var(--muted); }
.admin-sidebar-foot a:hover { color: var(--text); }

.admin-main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.admin-topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-topbar h1 { font-size: 22px; letter-spacing: -0.3px; }
.admin-topbar .spacer { flex: 1; }
.admin-user { color: var(--muted); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
}
.stat-label { color: var(--muted-2); font-size: 12.5px; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-top: 4px; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted-2); margin-left: 4px; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px;
}
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-size: 16.5px; }
.panel-head .spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 12px; color: var(--muted-2);
  font-weight: 600; font-size: 12px; letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table .cell-title { max-width: 360px; }
.table .cell-title strong { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .cell-title small { color: var(--muted-2); font-size: 11.5px; }
.table-thumb { width: 76px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-on { background: rgba(34, 197, 94, 0.12); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-off { background: rgba(148, 163, 184, 0.12); color: var(--muted); border: 1px solid var(--border); }
.badge-featured { background: var(--primary-soft); color: #fda4af; border: 1px solid rgba(225, 29, 72, 0.35); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: #c7cdd8; }
.field .hint { color: var(--muted-2); font-size: 12px; }
.field input[type="text"], .field input[type="url"], .field input[type="number"],
.field input[type="password"], .field input[type="file"], .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  background: #0d1016; border: 1px solid var(--border-strong);
  color: var(--text); outline: none; transition: border-color 0.18s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { min-height: 120px; resize: vertical; }
.field input[type="file"] { padding: 8px; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.07); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 6px 12px; margin-right: 10px; cursor: pointer;
}
.check-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #c7cdd8; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

.current-cover { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.current-cover img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.current-cover .hint { color: var(--muted-2); font-size: 12px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 34px 30px;
  box-shadow: var(--shadow);
}
.login-card .brand { justify-content: center; margin-bottom: 10px; }
.login-sub { text-align: center; color: var(--muted-2); font-size: 13px; margin-bottom: 24px; }
.login-card .field { margin-bottom: 15px; }
.login-card .btn { margin-top: 6px; }
.login-foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--muted-2); }
.login-foot a { color: var(--muted); }
.login-foot a:hover { color: var(--text); }

.admin-mobile-bar { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .watch-layout { grid-template-columns: minmax(0, 1fr); }
  .watch-side { position: static; }
  .side-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 900px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 2px; padding: 12px 20px 18px;
    background: rgba(10, 12, 16, 0.98);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: 0.2s; overflow: visible;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 11px 12px; font-size: 15px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 9px;
    background: transparent; border: 1px solid var(--border); border-radius: 9px; cursor: pointer;
  }
  .nav-toggle span { height: 2px; background: var(--muted); border-radius: 2px; transition: 0.2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .search-form input { width: 110px; }
  .hero { min-height: 440px; padding: 70px 0 44px; }
  .hero-desc { font-size: 14.5px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }

  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 12px 16px; gap: 12px; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .admin-sidebar .brand-name { display: none; }
  .admin-nav { flex-direction: row; overflow-x: auto; }
  .admin-nav a { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .admin-nav a span { display: none; }
  .admin-sidebar-foot { margin: 0; border: 0; padding: 0; }
  .admin-main { padding: 20px 16px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .table .cell-title { max-width: 180px; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .header-inner { gap: 12px; }
  .brand-name { font-size: 17px; }
  .search-form { display: none; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; gap: 6px; }
  .section-head h2 { font-size: 19px; }
  .hero-title { font-size: 34px; }
  .hero-meta { gap: 12px; font-size: 12.5px; }
  .page-hero-content { padding: 24px 20px; }
  .watch-heading h1 { font-size: 20px; }
  .rank-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-list { grid-template-columns: 1fr; }
  .table .cell-title { max-width: 130px; }
  .admin-topbar h1 { font-size: 19px; }
}

/* ---------------- 选集面板（自动采集剧集） ---------------- */
.ep-panel {
  margin-top: 16px;
  padding: 16px 18px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.ep-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ep-head h2 { font-size: 16px; margin: 0; }
.ep-count { font-size: 12.5px; color: var(--muted-2); }
.ep-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  max-height: 268px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ep-btn {
  display: flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 6px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.ep-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); border-color: var(--border-strong); }
.ep-btn.is-active {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.28);
}
@media (max-width: 640px) {
  .ep-list { max-height: 208px; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
}

/* 内容筛选条（年份/地区/排序） */
.filter-bar{margin:18px 0 22px;padding:14px 16px;background:#12161d;border:1px solid #1e242d;border-radius:12px}
.filter-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0}
.filter-label{font-size:12px;color:#7d8794;min-width:36px}
.filter-bar .chip{padding:4px 12px;border-radius:999px;background:#1b2129;border:1px solid #232b35;color:#cfd6e0;font-size:13px;text-decoration:none}
.filter-bar .chip:hover{background:#232c37}
.filter-bar .chip.is-active{background:#e11d48;border-color:#e11d48;color:#fff}


/* 搜索联想下拉 */
.search-form{position:relative}
.search-suggest{display:none;position:absolute;left:0;right:0;top:calc(100% + 6px);background:#12161d;border:1px solid #232b35;border-radius:10px;box-shadow:0 12px 30px rgba(0,0,0,.45);z-index:50;overflow:hidden}
.search-suggest.is-open{display:block}
.ss-item{display:flex;gap:10px;align-items:center;padding:8px 10px;text-decoration:none;color:#e6e6e6;border-bottom:1px solid #1b2129}
.ss-item:last-child{border-bottom:0}
.ss-item:hover{background:#1b2129}
.ss-item img,.ss-noimg{width:34px;height:48px;object-fit:cover;border-radius:6px;background:#1f252e;flex:0 0 auto}
.ss-text{display:flex;flex-direction:column;min-width:0}
.ss-text b{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ss-text i{font-style:normal;font-size:11px;color:#7d8794}

