/* ============================================================
   NOCLIP — 백룸 워커 (AppTulz)
   ============================================================ */
#nc-root {
  position: fixed; inset: 0; z-index: 9999;
  background: #000; overflow: hidden; touch-action: none;
  user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;
  font-family: 'Courier New', ui-monospace, monospace;
}
#nc-root * { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -moz-user-select: none; }
#nc-app { position: absolute; inset: 0; }
#nc-app canvas { display: block; }

/* 나가기 — 좌상단 최상단 */
#nc-exit {
  position: absolute; top: 14px; left: 14px; z-index: 10010; pointer-events: auto;
  font-family: 'Courier New', monospace; font-size: 12px; letter-spacing: 2px;
  color: rgba(255,255,255,.7); background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.25); border-radius: 4px;
  padding: 6px 12px; cursor: pointer; text-decoration: none; transition: color .2s, border-color .2s;
}
#nc-exit:hover, #nc-exit:focus { color: #fff; border-color: rgba(255,255,255,.6); outline: none; }

/* 음소거 — 우상단 */
#nc-mute {
  position: absolute; top: 14px; right: 16px; z-index: 10010; pointer-events: auto;
  width: 40px; height: 40px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35);
  color: #fff; font-size: 18px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: border-color .2s;
}
#nc-mute:hover, #nc-mute:focus { border-color: rgba(255,255,255,.6); outline: none; }

/* OSD */
#nc-osd { position: absolute; inset: 0; pointer-events: none; z-index: 20; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.9); letter-spacing: 1px; }
.nc-rec { position: absolute; top: 58px; left: 18px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: bold; }
.nc-dot { width: 11px; height: 11px; border-radius: 50%; background: #ff2b2b; box-shadow: 0 0 6px #ff2b2b; animation: nc-blink 1s steps(1) infinite; }
@keyframes nc-blink { 50% { opacity: 0; } }
.nc-play { position: absolute; top: 60px; right: 20px; font-size: 13px; opacity: .85; }
.nc-tstamp { position: absolute; bottom: 18px; left: 20px; font-size: 14px; will-change: transform; opacity: .85; }
.nc-batt { position: absolute; bottom: 18px; right: 20px; font-size: 14px; display: flex; align-items: center; gap: 6px; opacity: .85; }
.nc-batticon { display: inline-block; width: 22px; height: 11px; border: 1.5px solid #fff; position: relative; }
.nc-batticon::after { content: ''; position: absolute; right: -4px; top: 3px; width: 2.5px; height: 5px; background: #fff; }
.nc-batticon i { position: absolute; left: 1.5px; top: 1.5px; bottom: 1.5px; width: 60%; background: #fff; display: block; }
.nc-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 13px; text-align: center; line-height: 1.9; opacity: .9; transition: opacity .6s; text-transform: uppercase; }

/* 게임 HUD — 상단 중앙 */
#nc-hud { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 25; text-align: center; pointer-events: none; }
#nc-time { font-size: 28px; font-weight: bold; letter-spacing: 2px; color: #fff; text-shadow: 0 0 4px rgba(0,0,0,.9); }
#nc-hud-sub { font-size: 12px; letter-spacing: 1px; color: rgba(255,240,190,.85); margin-top: 1px; }
#nc-hud-sub span { color: #fff; }
#nc-hatch { font-size: 12px; letter-spacing: 1px; color: #2ffadf; margin-top: 3px; text-shadow: 0 0 5px rgba(18,255,216,.45); }
#nc-hatch span { font-weight: bold; }

/* 깊이 전환 자막 */
#nc-level { position: absolute; top: 42%; left: 50%; transform: translate(-50%,-50%); z-index: 26; font-size: 36px; font-weight: bold; letter-spacing: 8px; color: #fff; opacity: 0; pointer-events: none; text-shadow: 0 0 14px rgba(0,0,0,.9); }

/* 추격자 방향 경고 — 화면 가장자리 붉은 글로우 */
.nc-edge { position: absolute; pointer-events: none; z-index: 23; opacity: 0; transition: opacity .12s; }
#nc-edge-left  { left: 0; top: 0; bottom: 0; width: 110px; background: linear-gradient(to right, rgba(255,28,28,.6), transparent); }
#nc-edge-right { right: 0; top: 0; bottom: 0; width: 110px; background: linear-gradient(to left, rgba(255,28,28,.6), transparent); }
#nc-edge-back  { left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(to top, rgba(255,28,28,.6), transparent); }

/* 온스크린 컨트롤 */
#nc-joy { position: absolute; left: 26px; bottom: 64px; width: 130px; height: 130px; z-index: 30; border-radius: 50%; border: 2px solid rgba(255,255,255,.28); background: rgba(255,255,255,.05); pointer-events: auto; }
#nc-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(255,255,255,.5); border: 2px solid rgba(255,255,255,.6); }
#nc-joyLabel { position: absolute; left: 26px; bottom: 40px; width: 130px; text-align: center; z-index: 30; font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: 2px; pointer-events: none; }
#nc-lookLabel { position: absolute; right: 26px; bottom: 40px; z-index: 30; font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: 2px; pointer-events: none; }

/* 게임오버 */
#nc-over { position: absolute; inset: 0; z-index: 10005; display: none; align-items: center; justify-content: center; background: rgba(6,5,2,.82); }
.nc-over-box { width: min(86%, 360px); text-align: center; color: #fff; padding: 28px 22px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.45); background-image: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0,0,0,.25) 3px); }
.nc-over-title { font-size: 30px; font-weight: bold; letter-spacing: 4px; color: #ff3b3b; text-shadow: 0 0 10px rgba(255,59,59,.5); animation: nc-flick 1.6s steps(2) infinite; }
@keyframes nc-flick { 92% { opacity: 1; } 94% { opacity: .35; } 96% { opacity: 1; } }
.nc-over-sub { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 6px; letter-spacing: 1px; }
.nc-over-stats { display: flex; justify-content: center; gap: 18px; margin: 22px 0 8px; }
.nc-over-stats > div { display: flex; flex-direction: column; gap: 3px; }
.nc-over-stats span { font-size: 11px; color: rgba(255,240,190,.7); letter-spacing: 1px; }
.nc-over-stats b { font-size: 22px; color: #fdf3d0; }
.nc-over-best { font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 14px; letter-spacing: 1px; }
.nc-over-best span { color: #fdf3d0; font-weight: bold; }
#nc-rankrow { display: flex; gap: 8px; margin-bottom: 8px; }
#nc-nick { flex: 1; min-width: 0; padding: 10px 12px; font-family: 'Courier New', monospace; font-size: 13px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.35); color: #fff; outline: none; }
#nc-nick:focus { border-color: rgba(253,243,208,.55); }
#nc-submit { padding: 10px 14px; font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 1px; cursor: pointer; border-radius: 4px; border: 1px solid rgba(253,243,208,.4); background: rgba(253,243,208,.12); color: #fdf3d0; transition: background .2s; white-space: nowrap; }
#nc-submit:hover { background: rgba(253,243,208,.22); }
#nc-submit:disabled { opacity: .45; cursor: default; }
#nc-rankmsg { font-size: 12px; min-height: 14px; margin-bottom: 8px; letter-spacing: .5px; color: #6fe0c4; }
#nc-lb { margin-bottom: 18px; text-align: left; }
.nc-lb-title { font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,.5); text-transform: uppercase; margin-bottom: 6px; }
#nc-lb-list { list-style: none; margin: 0; padding: 0; max-height: 168px; overflow-y: auto; }
#nc-lb-list li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
#nc-lb-list li .nc-lb-rank { width: 22px; color: rgba(255,255,255,.45); text-align: right; }
#nc-lb-list li .nc-lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
#nc-lb-list li .nc-lb-sv { color: #fdf3d0; font-weight: bold; }
#nc-lb-list li .nc-lb-dp { color: rgba(111,224,196,.85); font-size: 11px; }
#nc-lb-list li.nc-lb-me { background: rgba(253,243,208,.1); border-radius: 3px; }
#nc-lb-list li.nc-lb-top .nc-lb-rank { color: #fdf3d0; }
.nc-lb-empty { color: rgba(255,255,255,.4); justify-content: center; }
.nc-over-btns { display: flex; gap: 10px; }
.nc-over-btns button { flex: 1; padding: 13px 0; font-family: 'Courier New', monospace; font-size: 14px; letter-spacing: 1px; cursor: pointer; border-radius: 4px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); color: #fff; transition: background .2s, border-color .2s; }
.nc-over-btns button:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }
#nc-retry { background: rgba(253,243,208,.12); border-color: rgba(253,243,208,.4); }
