:root { color-scheme: light; --ink: #1c1917; --muted: #57534e; --line: #e7e5e4; --paper: #fafaf9; --card: #fff; --accent: #9a3412; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
input, select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; background: #fff; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 24px 112px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 0; }
.row > button { flex: 0 0 auto; white-space: nowrap; }
.stack { display: grid; gap: 10px; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: #9f1239; min-height: 1.2em; }
header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
header .tools { display: flex; gap: 8px; align-items: center; flex: none; }
header .tools a, header .tools button { flex: none; white-space: nowrap; }
nav.bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 8px 12px; background: #fff; border-top: 1px solid var(--line); }
nav.bar a { flex: 1; text-align: center; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; font-size: 14px; }
nav.bar a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #a8a29e; margin-right: 6px; }
.dot.on { background: #15803d; }
.grid { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.log { min-height: 280px; max-height: 520px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.log p { margin: 8px 0; }
.tag { font-size: 12px; color: var(--muted); }
h1, h2 { margin: 0 0 8px; }
h2 { font-size: 18px; }
a { color: var(--accent); }
a.download { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; border-radius: 8px; padding: 8px 12px; }
.site-foot { margin: 28px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (min-width: 1024px) {
  #hallList ul.plain { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  #hallList ul.plain li { border-bottom: 0; }
}
.qr { width: 132px; height: 132px; }
#recent button { display: block; width: 100%; margin-top: 6px; text-align: left; }
#recent button[aria-current="true"] { border-color: var(--accent); color: var(--accent); }

/* === Launch board（群雄逐鹿 · 近期开服） === */
/* 和直播区一样自带深色底。 */
.launch-section { margin: 16px auto 0; max-width: 1400px; padding: 16px; background: #0f0f1a; border-radius: 12px; color: #ccc; }
.launch-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.launch-title { font-size: 20px; font-weight: 700; color: #fff; margin: 0; }
.launch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1200px) { .launch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .launch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.launch-card { min-width: 0; padding: 14px; background: #1a1a2e; border: 1px solid #2a2a40; border-radius: 8px; }
.launch-card.is-new { border-color: #e53935; }
.launch-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.launch-card-name { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launch-new-tag { flex: none; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; }
.launch-soon-tag { flex: none; background: #2a2a40; color: #ccc; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; }
.launch-card-date { margin-top: 6px; font-size: 13px; color: #888; }
.launch-card-age { margin-top: 2px; font-size: 13px; color: #ccc; }
.launch-card.is-new .launch-card-age { color: #ff8a80; }
.launch-empty { grid-column: 1 / -1; padding: 24px 0; text-align: center; color: #888; font-size: 14px; }

/* === Livestream === */
/* 页面其余部分是浅色；直播区自带深色底，所以下面的浅色字都落在这块深色上。 */
.live-section { margin: 16px auto 0; max-width: 1400px; padding: 16px; background: #0f0f1a; border-radius: 12px; color: #ccc; }
.live-section .muted { color: #888; }
.live-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.live-title { font-size: 20px; font-weight: 700; color: #fff; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-badge { background: #e53935; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; letter-spacing: 1px; }
.live-count { color: #888; font-size: 14px; font-weight: 400; }
.live-golive-btn { background: #e53935; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; flex: none; white-space: nowrap; }
.live-golive-btn:hover { background: #c62828; }

/* Tabs */
.live-tabs { display: flex; gap: 0; border-bottom: 1px solid #333; margin-bottom: 16px; }
.live-tab { background: none; border: none; border-radius: 0; color: #888; font-size: 15px; padding: 10px 24px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.live-tab:hover { color: #ccc; }
.live-tab.active { color: #fff; border-bottom-color: #e53935; font-weight: 600; }

/* Card grid */
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1200px) { .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .live-grid { grid-template-columns: minmax(0, 1fr); } }

/* Stream card */
.live-card { background: #1a1a2e; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; border: 1px solid #2a2a3e; }
.live-card:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(0,0,0,.5); border-color: #555; }
.live-thumb { position: relative; padding-top: 56.25%; overflow: hidden; }
.live-thumb-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px; text-align: center; font-size: 28px; font-weight: 700; color: rgba(255,255,255,.3); letter-spacing: 2px; }
.live-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-live-badge { position: absolute; top: 8px; left: 8px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; display: flex; align-items: center; gap: 4px; }
.live-live-badge::before { content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: live-pulse 1.5s infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-live-badge::before { animation: none; } .live-card, .live-card:hover { transition: none; transform: none; } }
.live-platform-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #ccc; font-size: 11px; padding: 2px 8px; border-radius: 3px; }
.live-offline-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: flex-start; padding: 8px; color: #aaa; font-size: 12px; }
.live-card-info { padding: 10px 12px; }
.live-card-title { color: #e0e0e0; font-size: 14px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 6px; }
.live-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.live-zone-tag { background: #2a2a3e; color: #aaa; font-size: 11px; padding: 2px 8px; border-radius: 3px; }
.live-card-link { color: #888; font-size: 11px; text-decoration: none; margin-left: auto; }
.live-card-link:hover { color: #ccc; }
.live-card-report { background: none; border: none; padding: 0; color: #888; font-size: 11px; }
.live-card-report:hover { color: #e57373; }
.live-zone-tag + .live-card-report { margin-left: auto; }

/* 开播 panel */
.live-golive-panel { background: #1a1a2e; border: 1px solid #333; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.live-golive-panel h3 { color: #fff; font-size: 16px; margin: 0 0 12px; }
.live-golive-panel label { display: block; color: #aaa; font-size: 13px; margin-bottom: 10px; }
.live-golive-panel input, .live-golive-panel select { width: 100%; padding: 8px 12px; background: #0d0d1a; border: 1px solid #333; border-radius: 4px; color: #fff; font-size: 14px; margin-top: 4px; box-sizing: border-box; }
.live-golive-panel button { margin-top: 8px; }
.live-golive-panel button[data-title-save] { background: #333; color: #ccc; border: none; border-radius: 4px; font-size: 13px; }
.live-golive-panel button[data-title-save]:hover { background: #444; }
.live-golive-room { border-bottom: 1px solid #333; padding-bottom: 16px; margin-bottom: 16px; }
.live-golive-room-head { color: #e0e0e0; font-size: 14px; font-weight: 600; }
.live-golive-more summary { cursor: pointer; color: #aaa; font-size: 14px; margin-bottom: 10px; }
.live-golive-pending { margin-top: 12px; color: #888; font-size: 13px; }
.live-golive-pending p { margin: 4px 0; }
.live-golive-note { margin: 12px 0 0; color: #8bc34a; font-size: 13px; min-height: 1.2em; }
.live-golive-note.is-error { color: #ef9a9a; }
.live-rtmp-info { background: #0d0d1a; border: 1px solid #333; border-radius: 6px; padding: 12px; margin: 8px 0; }
.live-rtmp-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.live-rtmp-label { color: #888; font-size: 12px; min-width: 70px; }
.live-rtmp-value { color: #4fc3f7; font-size: 13px; font-family: monospace; word-break: break-all; flex: 1; min-width: 0; }
.live-rtmp-value.live-rtmp-masked { color: #888; }
.live-golive-panel .live-rtmp-copy { background: #333; color: #ccc; border: none; padding: 4px 10px; border-radius: 3px; font-size: 12px; cursor: pointer; white-space: nowrap; margin-top: 0; }
.live-golive-panel .live-rtmp-copy:hover { background: #444; }
.live-obs-tips { background: #1a2a1a; border: 1px solid #2a4a2a; border-radius: 6px; padding: 10px; margin: 8px 0 12px; color: #8bc34a; font-size: 12px; }

/* Player */
.live-player:not(:empty) { margin-bottom: 16px; }
.live-player iframe, .live-player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 500px; border: 0; border-radius: 8px; background: #000; }
.live-player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.live-player-name { color: #e0e0e0; font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-player-close { flex: none; background: #333; color: #ccc; border: none; padding: 4px 14px; border-radius: 4px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.live-player-close:hover { background: #444; }
.live-player-placeholder { background: #0d0d1a; border: 1px solid #333; border-radius: 8px; padding: 40px 16px; text-align: center; color: #888; }
.live-player-url { margin-top: 8px; color: #4fc3f7; font-family: monospace; font-size: 13px; word-break: break-all; }

/* Empty state */
.live-empty { grid-column: 1 / -1; text-align: center; color: #666; padding: 60px 0; font-size: 15px; }
