:root {
  --bg: #0b0b0b;
  --panel: #141414;
  --panel-2: #1b1b1b;
  --line: #2a2a2a;
  --fg: #f5f5f5;
  --muted: #9c9c9c;
  --dim: #6b6b6b;
  --accent: #ff5a1f;
  --accent-ink: #0b0b0b;
  --ok: #3ccf7a;
  --warn: #ffb020;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans);
  font-size: 15px; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.top {
  position: sticky; top: 0; z-index: 20; background: rgba(11,11,11,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; min-width: 0; }
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq { width: 12px; height: 12px; background: var(--accent); flex: none; }

/* 按钮：直角 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  border: 1px solid var(--fg); background: transparent; color: var(--fg); font-weight: 700; cursor: pointer;
  border-radius: 0; white-space: nowrap; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-w { background: var(--fg); color: var(--bg); }
.btn-a { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-lg { height: 52px; font-size: 17px; padding: 0 22px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-ghost { border-color: var(--line); color: var(--muted); }

/* 首屏 */
.hero { padding: 28px 0 8px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: .12em; font-family: var(--mono); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.hero h1 { margin: 14px 0 6px; font-size: clamp(34px, 9vw, 64px); line-height: 1.12; font-weight: 900; letter-spacing: .01em; }
.hero p.sub { margin: 0; font-size: clamp(17px, 4.6vw, 22px); font-weight: 700; }
.notice { margin-top: 14px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--panel); color: var(--fg); font-size: 14px; white-space: pre-wrap; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin: 20px 0 0; }
.stats > div { padding: 12px 12px 10px; border-right: 1px solid var(--line); min-width: 0; }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--mono); font-size: clamp(22px, 7vw, 34px); line-height: 1.1; font-weight: 800; }
.stats span { color: var(--muted); font-size: 12px; }
.stats .hl b { color: var(--accent); }

/* 列表 */
.bar { display: flex; align-items: center; gap: 10px; margin: 22px 0 14px; flex-wrap: wrap; }
.tabs { display: flex; border: 1px solid var(--line); }
.tabs button { height: 36px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.tabs button.on { background: var(--fg); color: var(--bg); }
.search { flex: 1; min-width: 140px; height: 38px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; border-radius: 0; outline: none; }
.search:focus { border-color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.cover { position: relative; padding-top: 62.5%; background: #000; overflow: hidden; }
.cover img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.rank {
  position: absolute; left: 0; top: 0; padding: 4px 10px; background: rgba(11,11,11,.85); font-family: var(--mono);
  font-weight: 800; font-size: 14px; letter-spacing: .04em;
}
.rank.top { background: var(--accent); color: var(--accent-ink); }
.card .body { padding: 12px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 800; word-break: break-word; }
.card .by { color: var(--muted); font-size: 13px; }
.card .intro { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.votes b { font-family: var(--mono); font-size: 26px; line-height: 1; font-weight: 800; }
.votes span { color: var(--muted); font-size: 12px; margin-left: 4px; }
.tag { display: inline-block; font-size: 12px; padding: 0 6px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

/* 详情 */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin: 16px 0 12px; font-size: 14px; }
.detail .bigcover { background: #000; border: 1px solid var(--line); }
.detail .bigcover img { width: 100%; max-height: 72vh; object-fit: contain; margin: 0 auto; }
.detail h1 { font-size: clamp(24px, 6.6vw, 36px); line-height: 1.25; margin: 16px 0 4px; font-weight: 900; word-break: break-word; }
.vbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); padding: 14px; margin: 16px 0; background: var(--panel); }
.vbox .votes b { font-size: 40px; }
.vbox .r { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.section { margin: 18px 0; }
.section h2 { font-size: 13px; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 0 0 8px; font-family: var(--mono); }
.intro-full { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
video { width: 100%; max-height: 70vh; background: #000; border: 1px solid var(--line); }
.share { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 22px; }
.status-pill { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.st-pending { color: var(--warn); }
.st-approved { color: var(--ok); }
.st-hidden { color: var(--dim); }

/* 表单 */
.form { max-width: 640px; }
.form h1 { font-size: clamp(26px, 7vw, 40px); font-weight: 900; margin: 18px 0 4px; }
.field { margin: 16px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field label em { color: var(--accent); font-style: normal; margin-left: 2px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.field input[type=text], .field input[type=url], .field input[type=password], .field input[type=number], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; border-radius: 0; outline: none; font-size: 16px;
}
.field input:focus, .field textarea:focus { border-color: var(--muted); }
.field textarea { min-height: 120px; resize: vertical; }
.field .picker, .picker { position: relative; display: flex; font-weight: 400; align-items: center; justify-content: center; border: 1px dashed var(--muted); background: var(--panel); min-height: 150px; cursor: pointer; overflow: hidden; text-align: center; color: var(--muted); }
.picker img { width: 100%; max-height: 320px; object-fit: contain; }
.picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.progress { height: 4px; background: var(--line); margin-top: 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.ok-box { border: 1px solid var(--line); background: var(--panel); padding: 20px; margin: 20px 0; }

/* 页脚 */
.foot { margin-top: auto; border-top: 1px solid var(--line); padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); color: var(--dim); font-size: 12px; line-height: 1.8; }
.foot b { color: var(--muted); }
main { padding-bottom: 40px; }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--fg); color: var(--bg); padding: 10px 16px; font-weight: 700; max-width: calc(100vw - 32px); text-align: center;
}
.toast.err { background: var(--accent); color: var(--accent-ink); }

/* 后台 */
.adm table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm th, .adm td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; word-break: break-all; }
.adm th { color: var(--muted); font-weight: 700; white-space: nowrap; }
.adm .tbl { overflow-x: auto; border: 1px solid var(--line); }
.adm .row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 10px; }
.adm .row img { width: 120px; height: 75px; object-fit: cover; background: #000; }
.adm .row h3 { margin: 0; font-size: 16px; }
.adm .meta { color: var(--muted); font-size: 12px; }
.adm .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.adm .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.adm .filters input, .adm .filters select { height: 34px; border: 1px solid var(--line); background: var(--panel); padding: 0 8px; border-radius: 0; }
.adm .void td { color: var(--dim); text-decoration: line-through; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); width: 100%; max-width: 460px; padding: 18px; }
.modal h3 { margin: 0 0 6px; }
.seg { display: flex; border: 1px solid var(--line); margin-top: 6px; }
.seg button { flex: 1; height: 36px; border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--fg); color: var(--bg); }
@media (max-width: 520px) {
  .adm .row { grid-template-columns: 1fr; }
  .adm .row img { width: 100%; height: auto; aspect-ratio: 16/10; }
}

/* 参赛提交通道与后台入口 */
.submit-wrap { max-width: 1100px; }
.submit-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 8px; }
.submit-layout .form { max-width: none; }
.submit-side { position: sticky; top: 72px; }
.submit-layout.is-done { grid-template-columns: minmax(0, 640px); }
.submit-layout.is-done .submit-form { display: none; }
.side-kicker { margin: 0 0 8px; font-size: 12px; letter-spacing: .12em; color: var(--muted); font-family: var(--mono); font-weight: 700; }
.card h3.ph { color: var(--dim); font-weight: 700; }
.submit-notes { margin-top: 16px; border: 1px solid var(--line); background: var(--panel); padding: 14px 14px 4px; }
.submit-notes h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: .12em; font-family: var(--mono); color: var(--muted); }
.submit-notes ul { margin: 0; padding-left: 1.2em; }
.submit-notes li { margin: 0 0 8px; font-size: 13px; }
.picker.drag { border-color: var(--accent); color: var(--fg); background: var(--panel-2); }
.submit-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ok-box h2 { margin: 0 0 8px; font-size: 22px; }
.my-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.my-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--panel); padding: 10px; }
.my-item img { width: 120px; height: 75px; object-fit: cover; background: #000; }
.my-item h3 { margin: 0 0 6px; font-size: 16px; word-break: break-word; }
.entries { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.entry-label { font-weight: 800; margin-right: 4px; }
.entry { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); padding: 4px 8px; min-width: 0; max-width: 100%; }
.entry-name { font-weight: 700; font-size: 13px; }
.entry-url { color: var(--muted); font-size: 12px; font-family: var(--mono); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 859px) {
  .submit-top .wrap { height: auto; min-height: 56px; padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .submit-nav { width: 100%; flex: none; justify-content: flex-start; flex-wrap: wrap; }
  .submit-layout, .submit-layout.is-done { grid-template-columns: 1fr; }
  .submit-side { position: static; }
  .my-item { grid-template-columns: 88px minmax(0, 1fr); }
  .my-item img { width: 88px; height: 56px; }
  .my-item .my-go { grid-column: 1 / -1; }
}
