/* ═══ 화면 공통 ════════════════════════════════════════════════ */
.screen {
  background: var(--screen); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 2px 4px rgba(16,16,24,.06), 0 16px 34px -12px rgba(16,16,24,.22),
              0 60px 110px -38px rgba(16,16,24,.46);
}
.stage { position: relative; background: #000; overflow: hidden; }
/* 영상은 자르지 않고 비율대로 담는다(contain) - 패널이 열려 화면이
   좁아지면 실제 넷플릭스처럼 영상이 줄고 위아래에 레터박스가 남는다.
   스테이지 배경(#000)이 그 레터박스다. */
.stage > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.82) 100%); }

.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.floater { position: absolute; bottom: 92px; font-size: 27px; opacity: 0;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.85)); animation: float-up 2.6s var(--ease) forwards; }
@keyframes float-up {
  0%   { opacity: 0; transform: translateY(16px) scale(.6); }
  14%  { opacity: 1; transform: translateY(0) scale(1.14); }
  32%  { transform: translateY(-20px) scale(1); }
  100% { opacity: 0; transform: translateY(-136px) scale(.86); }
}

/* 컨트롤(재생바)은 원본 넷플릭스에도 있는 UI 라 비교 원본 레이어(z6)
   위에 둔다. Replix 것인 히트맵만 아래에서 따로 잘라낸다. */
.controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; padding: 0 20px 18px; }
.heat { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 38px; margin-bottom: 10px; }
.heat span { flex: 1; height: 5%; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #ff5b63, rgba(229,9,20,.32)); transition: height .5s var(--ease); }
.track { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,.24); }
.track-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--accent);
  border-radius: 2px; transition: width .26s linear; }
.track-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); transform: translate(-50%,-50%);
  box-shadow: 0 0 0 4px rgba(229,9,20,.22); transition: left .26s linear; }
.timecode { margin-top: 11px; font-family: var(--mono); font-size: 12px;
  color: rgba(255,255,255,.76); display: flex; align-items: center; gap: 12px; }
.timecode em { font-style: normal; color: #ff8f95; transition: opacity .25s var(--ease); }

/* ── 원본↔Replix 비교 분할선 ─────────────────────────────────
   스위치를 누르지 않아도 스테이지 위에서 마우스를 움직이면 분할선이
   따라오며 왼쪽 = 원본, 오른쪽 = Replix 로 갈라 보인다. 원본 레이어는
   같은 프레임 한 장을 오버레이(탄막 4·이모지 3) 위(z6)에
   얹고 분할선 왼쪽만 남긴 것이다. --sx 는 스크립트가 픽셀로 넣는다. */
.stage { --sx: 0px; }
.orig { position: absolute; inset: 0; z-index: 6; overflow: hidden; pointer-events: none;
  clip-path: inset(0 calc(100% - var(--sx)) 0 0); }
.orig img { width: 100%; height: 100%; object-fit: contain; display: block;
  background: #000; }
/* 히트맵은 Replix 것 - 분할선 왼쪽을 걷는다(컨트롤 좌우 패딩 20px 보정) */
.stage.split-on .heat { clip-path: inset(0 0 0 calc(var(--sx) - 20px)); }
/* '반응 몰림' 문구는 작아서 잘라 보이면 지저분하다 - 비교 중엔 감춘다 */
.stage.split-on .timecode em { opacity: 0; }
.split-line { position: absolute; top: 0; bottom: 0; left: var(--sx); z-index: 8;
  width: 0; pointer-events: none; opacity: 0; transition: opacity .25s var(--ease); }
.stage.split-on .split-line { opacity: 1; }
.split-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px;
  width: 2px; background: rgba(255,255,255,.85); box-shadow: 0 0 14px rgba(0,0,0,.65); }
.split-grip { position: absolute; top: 50%; left: 0; transform: translate(-50%,-50%);
  width: 27px; height: 27px; border-radius: 50%; background: #fff; color: #16161c;
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.split-tag { position: absolute; top: 11px; font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.split-tag--l { right: 9px; background: rgba(0,0,0,.6); color: rgba(255,255,255,.92); }
.split-tag--r { left: 9px; background: var(--accent); color: #fff; }
/* 분할선과 원본 레이어는 끈 상태에서도 남는다 - 선이 오른쪽 끝에
   붙어 '왼쪽으로 쓸면 Replix 가 돌아온다'는 손잡이 역할을 한다. */

/* 채팅 패널 */
.panel { background: var(--screen); border-left: 1px solid var(--s-line);
  display: flex; flex-direction: column; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px 12px;
  border-bottom: 1px solid var(--s-line); }
.panel-logo { font-weight: 800; font-size: 13px; letter-spacing: -.02em; color: #ff5b63; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: #10b981; flex: 0 0 auto;
  animation: dot-pulse 2.4s var(--ease) infinite; }
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.45); }
  70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.panel-viewers { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--s-muted); }
.panel-ep { padding: 10px 14px; border-bottom: 1px solid var(--s-line); font-size: 11.5px;
  color: var(--s-muted); display: flex; align-items: center; gap: 7px; min-width: 0; }
.panel-ep > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-chip { font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: rgba(229,9,20,.18); color: #ff9096; flex: 0 0 auto; }
.feed { flex: 1; min-height: 0; padding: 12px 12px 9px; display: flex; flex-direction: column;
  gap: 10px; justify-content: flex-end; overflow: hidden; }
.msg { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.46;
  animation: msg-in .38s var(--spring) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.av { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff; margin-top: 1px; }
.msg-body { min-width: 0; }
.msg-name { font-weight: 700; font-size: 11.5px; color: var(--s-text); margin-right: 5px; }
.msg-text { color: var(--s-body); word-break: break-word; }
.msg-time { font-family: var(--mono); font-size: 9.5px; color: var(--s-dim); margin-left: 5px; }
.msg--reply { padding-left: 17px; position: relative; }
.msg--reply::before {
  content: "↳"; position: absolute; left: 3px; top: 1px;
  color: var(--s-dim); font-size: 11px;
}
.msg--big .msg-text { font-size: 21px; line-height: 1.2; }
.like {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 7px;
  font-family: var(--mono); font-size: 9.5px; color: #ff8f95; vertical-align: middle;
}
.like svg { width: 10px; height: 10px; }
.like.pop { animation: like-pop .42s var(--spring); }
@keyframes like-pop { 0% { transform: scale(1); } 45% { transform: scale(1.5); } 100% { transform: scale(1); } }
.panel-input { border-top: 1px solid var(--s-line); padding: 11px 13px; display: flex;
  align-items: center; gap: 7px; font-size: 11.5px; color: var(--s-dim); }
.caret { width: 1px; height: 12px; background: var(--s-muted); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
