:root {
  --bg: #0b0d10;
  --panel: #14171c;
  --panel-2: #1b1f26;
  --line: #262b33;
  --text: #e8e6e1;
  --muted: #8b9099;
  --accent: #c9a96e;
  --danger: #e0645c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

/* 顶部 */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 64px);
  background: rgba(11, 13, 16, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-size: 22px; font-weight: 600; letter-spacing: .3em; color: var(--accent); }
.brand-sub { font-size: 13px; color: var(--muted); letter-spacing: .1em; }

.hero {
  padding: clamp(40px, 8vw, 96px) clamp(16px, 5vw, 64px) 24px;
  max-width: 1400px; margin: 0 auto;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 500; margin: 0 0 8px; letter-spacing: .08em; }
.hero p { color: var(--muted); margin: 0; }

/* 视频网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding: 24px clamp(16px, 5vw, 64px) 80px;
  max-width: 1400px; margin: 0 auto;
}
.card { cursor: pointer; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: var(--panel-2);
  border: 1px solid var(--line);
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .thumb img, .card:hover .thumb video { transform: scale(1.04); }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent 60%);
  opacity: 0; transition: opacity .25s;
}
.card:hover .play { opacity: 1; }
.play span {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center;
}
.play span::after {
  content: ""; margin-left: 4px;
  border-left: 16px solid #111; border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
.card h3 { font-size: 16px; font-weight: 500; margin: 12px 2px 2px; }
.card .meta { font-size: 13px; color: var(--muted); margin: 0 2px; }

.empty { text-align: center; color: var(--muted); padding: 80px 16px; grid-column: 1 / -1; }

/* 播放弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(0,0,0,.88); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-inner { width: min(1200px, 100%); }
.modal video { width: 100%; max-height: 78vh; background: #000; border-radius: 10px; display: block; }

/* 播放器 */
.player-wrap {
  position: relative; overflow: hidden; border-radius: 10px; background: #000;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.modal h2 { font-weight: 500; margin: 16px 0 4px; font-size: 20px; }
.modal .desc { color: var(--muted); white-space: pre-wrap; margin: 0; }
.modal-close {
  position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 22px;
}

.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 16px 48px; border-top: 1px solid var(--line); }

/* 后台 */
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 80px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel h2 { margin: 0 0 16px; font-size: 18px; font-weight: 500; }
.btn {
  border: 1px solid var(--line); background: var(--panel-2); padding: 9px 18px;
  border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #17130b; border-color: var(--accent); font-weight: 600; }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, textarea.input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none;
}
.input:focus { border-color: var(--accent); }
.login-box { max-width: 380px; margin: 12vh auto; }
.login-box .input { margin: 8px 0 16px; }
.msg { color: var(--danger); font-size: 14px; min-height: 1.4em; }

.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 40px 16px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: rgba(201,169,110,.05); }
.queue-item { margin-top: 14px; }
.queue-item .name { font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.bar { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.v-row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.v-row:first-of-type { border-top: 0; }
.v-row .thumb { cursor: default; }
.v-row .fields { display: flex; flex-direction: column; gap: 10px; }
.v-row .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.v-row .small { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .v-row { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }
.dropzone { display: block; }
#category-filter { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; }
#category { width: auto; }
.organize { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 10px; }
.organize label { color: var(--muted); }
.card:focus-visible .play { opacity: 1; }
@media (max-width: 400px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .login-box { margin-inline: 16px; }
}

/* 泄露追查表格 */
table.trace { width: 100%; border-collapse: collapse; font-size: 14px; }
table.trace th, table.trace td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.trace th { color: var(--muted); font-weight: 500; white-space: nowrap; }
table.trace td.small { max-width: 320px; word-break: break-all; }
