:root { --bg:#07060d; --panel:#14121f; --line:#2b2740; --fg:#ece9f7; --muted:#9a95b5; --accent:#ffb84d; --accent2:#7fe3ff; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
#app { display: flex; flex-direction: column; min-height: 100%; max-width: 1920px; margin: 0 auto; padding: 8px 12px 12px; gap: 8px; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; max-height: calc(100vh - 150px); margin: 0 auto; }
.stage:fullscreen { max-height: none; border-radius: 0; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fade { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
#fadeW { background: #fff; } #fadeB { background: #000; }
#titles { position: absolute; inset: 0; pointer-events: none; }
.tt { position: absolute; left: 0; right: 0; text-align: center; opacity: 0; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.8); font-weight: 700; }
.tt.caption { top: 40%; font-size: clamp(18px, 3.4vw, 54px); font-weight: 400; letter-spacing: .06em; }
.tt.title { top: 34%; font-size: clamp(26px, 7vw, 110px); letter-spacing: .08em; background: linear-gradient(90deg,#ffb84d,#ff5aa8,#7fe3ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 18px rgba(255,120,200,.55)); }
.tt.subtitle { top: 56%; font-size: clamp(16px, 3vw, 46px); font-weight: 400; }
.tt.place { left: 4%; right: auto; top: 6%; text-align: left; font-size: clamp(14px, 2.2vw, 34px); padding: .3em .8em; background: rgba(0,0,0,.45); border-left: 4px solid var(--accent2); }
.tt.sysmsg { top: 12%; font-size: clamp(11px, 1.7vw, 26px); font-family: ui-monospace, Consolas, monospace; color: var(--accent2); text-shadow: 0 0 12px #00b7ff; }
.tt.alarm { top: 8%; font-size: clamp(14px, 2.6vw, 40px); font-family: ui-monospace, Consolas, monospace; color: #ff4d4d; text-shadow: 0 0 14px #ff0000; animation: blink .9s steps(2) infinite; }
@keyframes blink { 50% { filter: brightness(.35); } }
.subs { position: absolute; left: 6%; right: 6%; bottom: 5%; text-align: center; font-size: clamp(14px, 2.4vw, 36px); line-height: 1.25; pointer-events: none; }
.subs span.t { display: inline-block; background: rgba(0,0,0,.62); padding: .15em .6em; border-radius: .35em; text-shadow: 0 1px 2px #000; }
.subs b { margin-right: .5em; }
.hint { position: absolute; right: 10px; top: 8px; font: 12px ui-monospace, monospace; color: #9f9; text-shadow: 0 1px 2px #000; pointer-events: none; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(ellipse at center, rgba(20,10,40,.55), rgba(0,0,0,.82)); text-align: center; padding: 24px; }
.overlay[hidden] { display: none; }
.overlay h1 { margin: 0; font-size: clamp(26px, 6vw, 88px); letter-spacing: .06em; background: linear-gradient(90deg,#ffb84d,#ff5aa8,#7fe3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.overlay .sub { margin: 0; color: var(--muted); font-size: clamp(14px, 2vw, 26px); }
.overlay .note { color: var(--muted); max-width: 70ch; font-size: 13px; margin: 0; }
.overlay.error { background: rgba(20,0,0,.92); align-items: flex-start; justify-content: center; text-align: left; overflow: auto; }
.overlay.error pre { white-space: pre-wrap; margin: 0; font: 13px/1.45 ui-monospace, Consolas, monospace; color: #ffd0d0; }
.overlay.endcard { background: rgba(0,0,0,.6); }
button { font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .4; cursor: default; }
button.big { font-size: clamp(16px, 2.2vw, 28px); padding: .5em 1.6em; background: linear-gradient(135deg,#ff8a3d,#ff3d8a); border: 0; color: #fff; font-weight: 700; border-radius: 999px; }
.controls { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 8.5ch; }
.vol { display: inline-flex; align-items: center; gap: 4px; }
.seekwrap { position: relative; flex: 1; min-width: 200px; height: 26px; }
#seek { width: 100%; margin: 0; position: absolute; top: 3px; left: 0; z-index: 2; background: transparent; accent-color: var(--accent); }
.marks { position: absolute; left: 0; right: 0; top: 0; height: 26px; pointer-events: none; z-index: 1; }
.marks i { position: absolute; top: 15px; width: 2px; height: 9px; background: #5a5578; }
.scene-name { font-size: 12px; color: var(--muted); min-height: 1.2em; }
.panel { position: fixed; right: 12px; bottom: 12px; top: 12px; width: min(460px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow: auto; z-index: 20; font-size: 13px; }
.panel[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel h4 { margin: 12px 0 4px; font-size: 13px; color: var(--accent); }
.panel code { background: #0c0a16; padding: 1px 5px; border-radius: 4px; }
.panel ul { margin: 4px 0; padding-left: 18px; }
.ok { color: #7be07b; } .bad { color: #ff8a8a; }
@media (max-width: 640px) { #app { padding: 4px; } .controls button { padding: 6px 8px; } }
