/* 导播台:深色导播风,金色主色,和设计画布一致 */
:root {
  --bg: #0D1017; --panel: #151A23; --panel2: #1B212C; --line: #2A3342; --line2: #222A36;
  --fg: #E8ECF3; --muted: #A3ADBD; --dim: #6B7586;
  --gold: #F2B84B; --gold2: #FFD27A; --say: #FFD6E0; --act: #C3A8FF; --ok: #5BE0A0; --warn: #F2C46B; --bad: #FF8A9A;
  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: rgba(13,16,23,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: 1px; }
.brand i { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #FFD27A, #F2B84B 50%, #E98A3C); display: grid; place-items: center; font-style: normal; color: #1b1404; font-size: 14px; }
.nav { display: flex; gap: 4px; }
.nav button { background: none; border: 0; padding: 7px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.nav button.on { background: var(--panel2); color: var(--fg); }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.live { background: #FF4D6A; box-shadow: 0 0 0 4px rgba(255,77,106,.18); animation: pulse 1.6s infinite; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255,77,106,.05); } }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--gold); color: #1b1404; font-weight: 700; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
#levelSeg { align-self: flex-start; }
#levelSeg button { padding: 6px 14px; }

.btn { min-height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3a4558; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1b1404; font-weight: 700; }
.btn.red { background: #3A1A20; border-color: #5C2A33; color: var(--bad); }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.ghost { background: none; }
.btn:focus-visible, .nav button:focus-visible, .seg button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.page { padding: 16px 20px 40px; }
.grid3 { display: grid; grid-template-columns: 330px minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
@media (max-width: 1180px) { .grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid3 > :nth-child(2) { grid-column: 1 / -1; order: -1; } }
@media (max-width: 760px) { .grid3 { grid-template-columns: minmax(0, 1fr); } .page { padding: 12px; } }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.panel h3 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.panel h3 .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.tiny { font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stat { background: var(--panel2); border-radius: 9px; padding: 7px 9px; }
.stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); }

.feed { height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; font-size: 13px; scrollbar-width: thin; }
.feed .row { display: flex; gap: 6px; padding: 4px 6px; border-radius: 6px; line-height: 1.45; }
.feed .row b { color: var(--muted); font-weight: 500; flex: none; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .gift { background: rgba(242,184,75,.1); } .feed .gift span { color: var(--gold2); }
.feed .follow span, .feed .fansclub span { color: var(--ok); }
.feed .src { margin-left: auto; color: var(--dim); font-size: 11px; flex: none; }

.now { background: linear-gradient(180deg, #1D1A12, #171B24); border-color: #4B3D1E; min-height: 128px; }
.now .text { font-size: 22px; line-height: 1.45; color: var(--say); min-height: 32px; }
.now .label { font-size: 12px; color: var(--gold); }
.bar { height: 4px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s linear; }

.queue { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.qi { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--panel2); font-size: 13px; }
.qi .p { font-size: 11px; color: var(--dim); text-align: center; }
.qi .k { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #222A36; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k.gift { background: #3A2F14 !important; color: var(--warn) !important; } .k.ops { background: #173528 !important; color: var(--ok) !important; } .k.manual { background: #2b2140 !important; color: var(--act) !important; }

.say { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
textarea, input[type=text], input[type=number], input[type=password], select { background: #0F131B; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; min-width: 0; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--gold); }
.chip.on { border-color: var(--gold); background: #2A2210; }

.ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opbtn { position: relative; min-height: 52px; border-radius: 11px; border: 1px solid #24543E; background: #12271D; color: #D4F7E5; font-weight: 700; font-size: 15px; cursor: pointer; }
.opbtn.fans { border-color: #5a4720; background: #251E0E; color: var(--gold2); }
.opbtn:disabled { opacity: .5; }
.opbtn small { display: block; font-weight: 400; font-size: 11px; opacity: .75; }

.perf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.perf button { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; text-align: left; }
.perf button:hover { border-color: var(--gold); }
.perf img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: radial-gradient(circle at 50% 40%, #2c2540, #15121d); }
.perf b { font-size: 13px; display: block; } .perf small { font-size: 11px; color: var(--muted); }

.toggles { display: flex; flex-direction: column; gap: 8px; }
.tg { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.tg input { appearance: none; width: 34px; height: 20px; border-radius: 20px; background: #2A3342; position: relative; cursor: pointer; flex: none; transition: background .2s; }
.tg input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #E8ECF3; transition: transform .2s; }
.tg input:checked { background: var(--gold); } .tg input:checked::after { transform: translateX(14px); }

.log { max-height: 220px; overflow-y: auto; font-size: 12px; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.log .warn { color: var(--warn); } .log .error { color: var(--bad); }
.said { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.said .s { display: grid; grid-template-columns: 52px 92px minmax(0, 1fr); gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line2); }
.said .s.blocked { color: var(--bad); text-decoration: line-through; }

/* 配置页 */
.cfg { max-width: 1180px; display: flex; flex-direction: column; gap: 14px; }
.cfg .bar2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
.form label { color: var(--muted); padding-top: 8px; font-size: 13px; }
@media (max-width: 760px) { .form { grid-template-columns: minmax(0, 1fr); } .form label { padding-top: 0; } }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px; border-bottom: 1px solid var(--line); }
table.t td { padding: 5px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.t input, table.t select, table.t textarea { width: 100%; padding: 6px 8px; }
.tablewrap { overflow-x: auto; }
.avatar { width: 160px; aspect-ratio: 9/16; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #0F131B; }
.prod { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.prod.cur { border-color: var(--gold); }
.prod img, .prod .ph { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; background: #0F131B; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--dim); font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #222A36; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; z-index: 50; max-width: 90vw; }
.toast.err { border-color: #5C2A33; color: var(--bad); }
.alert { background: #3A1A20; border: 1px solid #5C2A33; color: var(--bad); padding: 10px 14px; border-radius: 10px; }

/* 登录 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.login h1 { margin: 0 0 4px; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.form > div > input[type=text], .form > div > textarea, .form > div > select { width: 100%; }
.form > div > select { max-width: 240px; }

/* 实时画面:竖屏 9:16 */
.previewBox { position: relative; width: 100%; max-width: 270px; margin: 0 auto; aspect-ratio: 9 / 16; background: #05070b; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.previewBox img, .previewBox iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; transition: opacity .25s; }
.previewEmpty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font-size: 12px; text-align: center; padding: 12px; }
