/* [원본 코드 전체] */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #020202; color: #f4eadc; font-family: "Malgun Gothic", "Noto Sans KR", sans-serif; overflow-x: hidden; }

#bg { position: fixed; inset: -30px; background-size: cover; background-position: center; filter: blur(60px) brightness(0.4); z-index: 0; transition: background-image 2s ease-in-out; animation: ambientParallax 15s linear infinite alternate; will-change: transform, filter; }
@keyframes ambientParallax {
    0% { transform: scale(1.1) translate(0, 0); filter: blur(60px) brightness(0.4); }
    50% { transform: scale(1.15) translate(-20px, -20px); filter: blur(75px) brightness(0.35); }
    100% { transform: scale(1.1) translate(0, 0); filter: blur(60px) brightness(0.4); }
}

.player { position: relative; z-index: 1; width: 100%; max-width: 430px; min-height: 100vh; margin: 0 auto; padding: 22px 14px; background: linear-gradient(to bottom, rgba(5,5,5,0.7), rgba(0,0,0,0.95)); box-shadow: 0 0 80px rgba(0,0,0,0.8); }

.cover { position: relative; overflow: hidden; border-radius: 28px; box-shadow: 0 0 50px rgba(217, 168, 91, 0.1); aspect-ratio: 16 / 9; }
@keyframes kenburns { from { transform: scale(1.0); } to { transform: scale(1.12); } }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 24px; animation: kenburns 8s linear forwards; transition: opacity 1.5s ease-in-out; }

.song-info { margin-top: -118px; padding: 0 18px 24px; position: relative; z-index: 2; }
.archive { text-align: center; font-size: 10px; letter-spacing: 5px; opacity: 0.4; color: #f5dfb8; margin-bottom: 34px; }
#title { font-size: 12px; opacity: 0.4; margin: 0; font-weight: 400; }
#artist { margin: 8px 0 0; color: #d7c2a0; font-size: 15px; }

.progress { margin: 30px 4px 30px; }
.progress input { width: 100%; height: 4px; accent-color: #c9b080; cursor: pointer; }
.time-row { display: flex; align-items: center; gap: 14px; padding: 0 4px; }
#currentTime, #remainTime { min-width: 48px; text-align: center; color: rgba(215, 194, 160, 0.6); font-size: 12px; }

.controls { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 30px; }
.controls button { width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(217, 168, 91, 0.3); background: rgba(20, 18, 15, 0.5); color: #f4eadc; font-size: 21px; cursor: pointer; }
#play { width: 74px; height: 74px; font-size: 28px; color: #f4bf6b; }

.playlist { padding: 18px; }
.playlist h2 { margin: 0 0 20px; font-size: 12px; letter-spacing: 3px; color: #d9a85b; opacity: 0.5; }
.playlist li { display: grid; grid-template-columns: 36px 28px 1fr; align-items: center; gap: 15px; padding: 18px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); cursor: pointer; }
.playlist-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.playlist li.active .playlist-index, .playlist li.active .playlist-name { color: #f4bf6b; font-weight: 700; }

/* 추가된 탭 스타일 */
.tab-btn { background: rgba(20, 18, 15, 0.5); border: 1px solid rgba(217, 168, 91, 0.3); color: #d9a85b; padding: 6px 14px; cursor: pointer; border-radius: 15px; font-size: 10px; transition: 0.3s; }
.tab-btn.active { background: #d9a85b; color: #000; font-weight: bold; }

/* ===== v3.2 UX FIX — preserved song navigation + notice + stable tabs ===== */
.song-nav{
  padding:14px 16px;
  border:1px solid rgba(217,168,91,.16);
  border-radius:20px;
  background:rgba(8,8,8,.42);

  margin:16px 12px 18px;
  text-align:center;
  font-size:12px;
  line-height:1.55;
  color:rgba(244,234,220,.68);
}
.song-nav div{margin:4px 0;}
#currentTitle{color:#f4bf6b;font-weight:600;}

.notice{
  margin:0 0 16px;
  padding:10px 14px;
  border:1px solid rgba(217,168,91,.18);
  border-radius:14px;
  background:rgba(255,255,255,.035);
  font-size:12px;
  line-height:1.45;
  color:rgba(244,234,220,.55);
  text-align:center;
  letter-spacing:-.2px;
}

.tabs{
  display:flex;
  justify-content:center;
  gap:8px;
  margin:0 0 15px;
}

/* 좌측 하단 텍스트 정보 삭제/숨김 */
.song-info {
    display: none !important;
}


/* ===== JK SELAH VIDEO ARCHIVE v4.0 ===== */
.cover-video{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  z-index:3;
  transition:opacity 1.5s ease-in-out;
  pointer-events:none;
  background:#17120d;
}

.cover-video.is-active{
  opacity:1;
}



.video-logo{
  position:absolute;
  right:-20px;
  bottom:-2px;
  display:block;
  width:118px;
  height:auto;
  padding:0;
  margin:0;
  background:transparent;
  border:0;
  box-shadow:none;
  opacity:1;
  transform:translate3d(0,0,0);
  transition:opacity .25s ease;
  pointer-events:none;
  z-index:20;
  overflow:hidden;
}

.video-logo-image{
  position:relative !important;
  inset:auto !important;
  display:block;
  width:100%;
  height:auto !important;
  object-fit:contain !important;
  object-position:center;
  opacity:1 !important;
  transition:none !important;
  animation:none !important;
  transform:none !important;
  border-radius:0 !important;
  aspect-ratio:auto !important;
  pointer-events:none;
  user-select:none;
}

.video-logo.show{
  opacity:1;
}



/* ===== SRT 2-LINE COVER OVERLAY ===== */
.srt-overlay{
  position:absolute;
  left:0;
  bottom:0;
  transform:none;
  width:100%;
  padding:7px 16px 8px;
  border-radius:0 0 24px 24px;
  background:rgba(7,5,3,.14);
  text-align:center;
  pointer-events:none;
  z-index:15;
  text-shadow:0 1px 4px rgba(0,0,0,.9);
}
.srt-current{
  min-height:18px;
  color:#f4e3c5;
  font-size:14px;
  line-height:1.3;
  font-weight:500;
  letter-spacing:-.2px;
}
.srt-next{
  min-height:14px;
  margin-top:2px;
  color:rgba(244,227,197,.50);
  font-size:11px;
  line-height:1.3;
  font-weight:400;
  letter-spacing:-.2px;
}
@media (max-width:430px){
  .srt-overlay{bottom:0;width:100%;padding:6px 12px 7px;}
  .srt-current{font-size:13px;}
  .srt-next{font-size:10px;}
}

/* ===== INTERNAL QA FULLSCREEN — F9, internal server only ===== */
.cover:fullscreen,
.cover:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.cover:fullscreen > img,
.cover:fullscreen > video,
.cover:-webkit-full-screen > img,
.cover:-webkit-full-screen > video {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  background: #000;
}

.cover:fullscreen .srt-overlay,
.cover:-webkit-full-screen .srt-overlay {
  border-radius: 0;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

/* ===== DISTRIBUTION FULLSCREEN ENTRY ===== */
.theater-entry{
  display:flex;
  justify-content:center;
  margin:-10px 0 14px;
}
#theaterBtn{
  border:1px solid rgba(217,168,91,.28);
  border-radius:999px;
  padding:7px 18px;
  background:rgba(20,18,15,.44);
  color:rgba(244,234,220,.72);
  font-size:11px;
  letter-spacing:.08em;
  cursor:pointer;
}
#theaterBtn:hover{color:#f4eadc;border-color:rgba(217,168,91,.52);}

/* ===== FULLSCREEN VISUAL SCALE FIX v2 =====
   F9 QA와 배포용 전체화면이 같은 기준 화면을 사용한다.
   영상/이미지는 16:9 전체 화면, SRT와 신호등은 검수 기준 크기로 고정한다. */
.cover:fullscreen .video-logo,
.cover:-webkit-full-screen .video-logo{
  right:-3.2vw;
  bottom:-0.25vw;
  width:clamp(260px, 22vw, 380px);
  z-index:60;
}

.cover:fullscreen .srt-overlay,
.cover:-webkit-full-screen .srt-overlay{
  left:0;
  bottom:0;
  width:100%;
  padding:clamp(14px,1.25vw,24px) clamp(22px,2vw,38px) clamp(24px,2vw,38px);
  background:rgba(7,5,3,.16);
  z-index:45;
  text-shadow:0 2px 8px rgba(0,0,0,.96);
}

.cover:fullscreen .srt-current,
.cover:-webkit-full-screen .srt-current{
  min-height:1.35em;
  font-size:clamp(30px,2.55vw,46px);
  line-height:1.22;
  font-weight:500;
  letter-spacing:-.7px;
}

.cover:fullscreen .srt-next,
.cover:-webkit-full-screen .srt-next{
  min-height:1.25em;
  margin-top:clamp(4px,.45vw,8px);
  font-size:clamp(22px,1.9vw,34px);
  line-height:1.22;
  font-weight:400;
  letter-spacing:-.5px;
}

/* ===== FULLSCREEN MINI PLAYLIST — SINGLE SOURCE ===== */
.fullscreen-ui-layer {
  position: absolute;
  inset: 0;
  z-index: 2147482000;
  overflow: visible;
  pointer-events: none;
  isolation: isolate;
}

.fullscreen-playlist-trigger {
  display: none;
}

.fullscreen-mini-playlist {
  position: absolute;
  left: clamp(26px, 3vw, 58px);
  bottom: clamp(42px, 6vh, 92px);
  z-index: 2147483000;
  width: max-content;
  max-width: min(420px, 38vw);
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: left;
  text-shadow: 0 2px 7px rgba(0,0,0,1);
}

.fullscreen-mini-playlist.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fullscreen-mini-playlist li {
  margin: 0;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.48);
  font-size: clamp(14px,1.05vw,20px);
  line-height: 1.42;
  font-weight: 400;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.fullscreen-mini-playlist li:hover {
  color: rgba(255,255,255,.72);
}

.fullscreen-mini-playlist li.is-current {
  color: rgba(255,255,255,.98);
  font-weight: 600;
}

.cover:fullscreen .fullscreen-ui-layer,
.cover:-webkit-full-screen .fullscreen-ui-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

.cover:fullscreen .fullscreen-playlist-trigger,
.cover:-webkit-full-screen .fullscreen-playlist-trigger {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 25vw;
  height: 100%;
  z-index: 2147482999;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

/* 신호등을 오른쪽으로 한 단계 더 이동 */
.cover:fullscreen .video-logo,
.cover:-webkit-full-screen .video-logo {
  right: -4.0vw !important;
}
