/* replay viewer additions (layout on top of style.css) */

body.replay #players { bottom: 150px; overflow-y: auto; }
.pcard .stats.s2 { margin-top: 4px; }

#side { position: fixed; left: 16px; top: 76px; bottom: 150px; width: 400px; z-index: 2; display: flex; flex-direction: column;
  background: rgba(4, 12, 20, .72); border: 1px solid var(--line); border-radius: 6px; padding: 10px; backdrop-filter: blur(4px); }
#side .tabs { margin-top: 0; }
#side .filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; font-size: 12px; color: var(--dim); }
#side .filters select { font-size: 12px; padding: 3px 8px; }
.chk { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.chk input { accent-color: var(--cyan); }
#list { flex: 1; overflow-y: auto; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
#list .r { display: grid; grid-template-columns: 46px 1fr; gap: 6px; padding: 3px 6px; border-left: 2px solid var(--c, #456); border-radius: 2px; cursor: pointer; line-height: 1.4; opacity: .38; }
#list .r.past { opacity: .85; }
#list .r.now { opacity: 1; background: rgba(62,243,255,.13); box-shadow: inset 0 0 0 1px rgba(62,243,255,.35); }
#list .r:hover { background: rgba(255,255,255,.06); opacity: 1; }
#list .r .t { color: var(--dim); }
#list .r .tool { color: var(--c); font-weight: bold; }
#list .r .args { color: #bfe9ff; word-break: break-all; }
#list .r .res { color: var(--dim); word-break: break-all; }
#list .r .err { color: #ff7a7a; word-break: break-all; }
#list .r.q { font-size: 11.5px; }
#list .r.q .tool { color: var(--dim); font-weight: normal; }
#list .r.human .body { color: #fff; }
#list .r.human .body::before { content: '司令官 ▸ '; color: var(--cyan); }
#list .r.ai .body::before { content: 'AI ▸ '; color: var(--c); }
#list .r.kill .body { color: #ffb3a0; }
#list .r.elim .body, #list .r.win .body { color: #ff6060; font-weight: bold; }
#list .r.warn .body { color: #ffd27a; }
#list .empty { color: var(--dim); padding: 12px; text-align: center; }

#dock { position: fixed; left: 16px; right: 16px; bottom: 12px; height: 126px; z-index: 3; background: rgba(4, 12, 20, .8); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; backdrop-filter: blur(4px); display: flex; flex-direction: column; gap: 6px; }
#dock .ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#dock .ctl button { font-size: 12px; padding: 4px 10px; }
#dock .play { min-width: 52px; color: var(--cyan); border-color: var(--cyan); }
.speeds { display: flex; gap: 0; }
.speeds button { border-radius: 0; margin-left: -1px; text-transform: none; }
.speeds button:first-child { border-radius: 4px 0 0 4px; }
.speeds button:last-child { border-radius: 0 4px 4px 0; }
.speeds button.on { color: #02040a; background: var(--cyan); border-color: var(--cyan); }
.gsel { margin-left: auto; font-size: 12px; color: var(--dim); }
.gsel select { font-size: 12px; padding: 3px 8px; }
#tl { position: relative; flex: 1; min-height: 0; cursor: pointer; }
#tl canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#tip { position: absolute; bottom: 100%; margin-bottom: 6px; transform: translateX(-50%); background: rgba(2,8,14,.95); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; font-size: 12px; white-space: nowrap; pointer-events: none; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }

#pickTable { width: 100%; border-collapse: collapse; font-size: 14px; }
#pickTable th { color: var(--dim); font-weight: 400; font-size: 12px; text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.1); }
#pickTable td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
#pickTable tr.go { cursor: pointer; }
#pickTable tr.go:hover td { background: rgba(62,243,255,.08); }
#pickTable .live { color: #7dff9a; }
.loadtxt { font-family: var(--font); font-size: 28px; letter-spacing: .3em; color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }

@media (max-width: 1100px) { #side { width: 320px; } #players { width: 230px; } }
@media (max-width: 760px) {
  #side { top: auto; bottom: 150px; height: 34vh; width: auto; right: 16px; }
  body.replay #players { top: 70px; bottom: auto; }
  .gsel { margin-left: 0; }
  #dock { height: 150px; }
}
@media (max-width: 1000px) { .logo { font-size: 16px; letter-spacing: .2em; } .logo span { display: none; } .viewctl label { font-size: 0; } .viewctl label select { font-size: 12px; } }
