/* =========================================================
   video_player.css
   Clean version
   ========================================================= */

/* =========================================================
   Watch Layout
   ========================================================= */
.watch-page{
  width: 100%;
  max-width: 1780px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.watch-main{
  min-width: 0;
  overflow: hidden;
}


/* =========================================================
   Sidebar Items
   ========================================================= */
.watch-sidebar-title{
  margin: 2px 6px 10px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}

.watch-sidebar-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.watch-suggest{
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;

  color: #fff;
  text-decoration: none;
  transition: background .15s ease;
}

.watch-suggest:hover{
  background: rgba(255,255,255,0.06);
}

.watch-suggest-thumb{
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.watch-suggest-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.watch-suggest-duration{
  position: absolute;
  right: 6px;
  bottom: 6px;

  padding: 2px 6px;
  border-radius: 8px;

  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 12px;
}

.watch-suggest-title{
  max-height: 2.5em;
  overflow: hidden;

  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.watch-suggest-meta{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}


/* =========================================================
   Video Info
   ========================================================= */
.video-wrapper{
  width: 100%;
  max-width: none;
  margin: 0;
}

.video-topbar{
  margin-top: 12px;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.video-title{
  margin: 0;

  color: rgba(255,255,255,0.95);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.video-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.like-btn,
.download-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;

  background: #2e2e2e;
  color: rgba(255,255,255,0.92);
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;

  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    transform .15s ease;
}

.like-btn:hover,
.download-btn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

.like-btn:active,
.download-btn:active{
  transform: scale(0.98);
}

.like-btn.active{
  background: rgba(255,0,51,0.15);
  border-color: rgba(255,0,51,0.35);
}

.like-btn:disabled,
.like-btn[disabled]{
  opacity: 0.55;
  cursor: not-allowed;
}

.video-meta-box{
  margin-top: 12px;
  padding: 12px 14px;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;

  background: #2e2e2e;
  color: rgba(255,255,255,0.80);
  font-size: 13px;
  line-height: 1.6;
}


/* =========================================================
   Video Player
   ========================================================= */
.video-player{
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;

  background: #000;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(0,0,0,0.65);
}

.video-player > video{
  position: relative;
  z-index: 1;

  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;
  background: #000;
}

.video-player > .controls{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82),
    rgba(0,0,0,0)
  );

  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);

  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0,0,0);

  transition:
    opacity .22s ease,
    transform .22s ease;
}

.video-player.hide-controls > .controls{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0,8px,0);
}


/* =========================================================
   Player Buttons
   ========================================================= */
.video-player .controls .btn,
#playPause{
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;

  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;

  cursor: pointer;
  transition:
    background .15s ease,
    transform .15s ease;
}

.video-player .controls .btn:hover,
#playPause:hover{
  background: rgba(255,255,255,0.10);
}

.video-player .controls .btn:active,
#playPause:active{
  transform: scale(0.98);
}

#currentTime,
#duration{
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
}


/* =========================================================
   Range Inputs
   ========================================================= */
.video-player .controls input[type="range"]{
  flex: 1;
  height: 4px;

  appearance: none;
  outline: none;

  background: rgba(255,255,255,0.25);
  border-radius: 999px;
}

.video-player .controls input[type="range"]::-webkit-slider-thumb{
  appearance: none;

  width: 14px;
  height: 14px;
  border-radius: 50%;

  background: #ff6b88;
  box-shadow: 0 0 0 3px rgba(255,0,51,0.18);
}

.video-player .controls input[type="range"]::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;

  background: #ff6b88;
}


/* =========================================================
   Volume
   ========================================================= */
.volume-control{
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-control input[type="range"]{
  width: 90px;
  flex: 0 0 auto;
}

.volume-icon{
  color: #fff;
  font-size: 18px;
  opacity: 0.95;
}


/* =========================================================
   Fullscreen
   ========================================================= */
.video-player:fullscreen,
.video-player:-webkit-full-screen{
  position: fixed;
  inset: 0;

  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;

  max-width: none;
  max-height: none;
  aspect-ratio: auto;

  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;

  background: #000;
  box-shadow: none;
}

.video-player:fullscreen > video,
.video-player:-webkit-full-screen > video{
  position: absolute;
  inset: 0;
  z-index: 1;

  width: 100%;
  height: 100%;

  object-fit: contain;
  background: #000;
}

.video-player:fullscreen > .controls,
.video-player:-webkit-full-screen > .controls{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.65) 55%,
    rgba(0,0,0,0) 100%
  );

  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0,0,0);
}

/* fullscreen에서는 visibility:hidden을 쓰지 않는다.
   Chrome/Edge에서 controls layer가 다시 안 그려지는 문제를 줄이기 위함 */
.video-player:fullscreen.hide-controls > .controls,
.video-player:-webkit-full-screen.hide-controls > .controls{
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transform: translate3d(0,8px,0);
}


/* =========================================================
   Fullscreen Sidebar Overlay
   ========================================================= */
.video-player .watch-sidebar{
  position: absolute;
  top: 0;
  right: 0;
  z-index: 60;

  width: 420px;
  height: 100%;
  box-sizing: border-box;
  padding: 12px;
  overflow: auto;

  background: rgba(20,20,20,0.92);
  border-left: 1px solid rgba(255,255,255,0.10);
  border-radius: 0;

  opacity: 0;
  pointer-events: none;
  transform: translateX(102%);

  transition:
    opacity .22s ease,
    transform .22s ease;
}

.video-player.show-sidebar .watch-sidebar,
.video-player .watch-sidebar:hover{
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

@media (max-width: 600px){
  .video-player .watch-sidebar{
    width: min(86vw, 420px);
  }
}


/* =========================================================
   Comment Section
   ========================================================= */
.comment-section{
  margin-top: 18px;
  padding: 14px;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;

  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.88);
}

.comment-section h3{
  margin: 0 0 12px;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  font-weight: 900;
}

.comment-input-box{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comment-avatar{
  width: 40px;
  height: 40px;
  object-fit: cover;

  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;

  background: rgba(255,255,255,0.08);
}

.comment-input-box textarea,
.comment-edit-area textarea{
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;

  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;

  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.92);

  outline: none;
}

.comment-input-box textarea{
  flex: 1;
  min-height: 42px;
  resize: vertical;
}

.comment-input-box textarea:focus,
.comment-edit-area textarea:focus{
  border-color: rgba(255,0,51,0.35);
}

.comment-submit-box{
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.comment-button,
.edit-btn,
.delete-btn2,
.comment-edit-save,
.comment-edit-cancel{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;

  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);

  cursor: pointer;
  text-decoration: none;
  transition:
    background .15s ease,
    transform .15s ease;
}

.comment-button{
  padding: 9px 14px;
  border-radius: 12px;
}

.edit-btn,
.delete-btn2{
  padding: 5px 10px;
  font-size: 12px;
}

.comment-edit-save,
.comment-edit-cancel{
  padding: 7px 10px;
}

.comment-button:hover,
.edit-btn:hover,
.delete-btn2:hover,
.comment-edit-save:hover,
.comment-edit-cancel:hover{
  background: rgba(255,255,255,0.10);
}

.comment-button:active,
.edit-btn:active,
.delete-btn2:active,
.comment-edit-save:active,
.comment-edit-cancel:active{
  transform: scale(0.98);
}

.comment-list{
  margin-top: 14px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment{
  display: flex;
  gap: 10px;
}

.comment-body{
  flex: 1;
  min-width: 0;
}

.comment-header{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  margin-bottom: 4px;
}

.comment-time{
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}

.comment-content{
  margin: 0;

  color: rgba(255,255,255,0.88);
  line-height: 1.45;
  word-break: break-word;
}

.comment-edit-area textarea{
  margin-top: 8px;
}

.comment-edit-actions{
  margin-top: 8px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-edit-msg{
  color: rgba(255,255,255,0.70);
  font-size: 12px;
}


/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 600px){
  .watch-page{
    padding: 12px;
  }

  .video-topbar{
    flex-direction: column;
  }

  .video-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .volume-control input[type="range"]{
    width: 70px;
  }
}

/* 영상 시청페이지 */
/* =========================================================
   Watch Page Modern Skin + VX Recommended Sidebar
   기존 watch-page grid 구조 유지 / 중복 spk layout 제거
   ========================================================= */

/* watch layout 강제 정리 */
.watch-page{
  width: 100%;
  max-width: 1780px;
  margin: 0 auto;
  padding: 18px 16px 56px;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.watch-main{
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
}

/* 왼쪽 메인 카드 */
.video-wrapper{
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: #1B1B1B;
  box-shadow: 0 8px 24px rgba(0,0,0,0.20);
}

.video-player{
  border-radius: 14px 14px 0 0;
  box-shadow: none;
}

.spk-video-info-panel{
  padding: 14px 14px 16px;
  background: #1B1B1B;
}

/* 제목/버튼 */
.video-topbar{
  margin: 0;
  padding: 0;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.spk-video-heading{
  min-width: 0;
}

.spk-watch-label{
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;

  background: #2a2a2a;
  color: rgba(255,255,255,0.86);

  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

.spk-watch-label i{
  color: #ff6b88;
  font-size: 12px;
}

.video-title{
  margin: 0;

  color: #f4f4f4;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.video-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.like-btn,
.download-btn,
.spk-watch-action-btn{
  min-height: 40px;
  padding: 0 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;

  background: #2a2a2a;
  color: #f3f3f3;

  font-size: 14px;
  font-weight: 800;
  text-decoration: none;

  box-shadow: none;
  cursor: pointer;

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .15s ease;
}

.like-btn:hover,
.download-btn:hover,
.spk-watch-action-btn:hover{
  background: #272727;
  border-color: rgba(255,255,255,0.14);
  color: #fff;
  transform: translateY(-1px);
}

.like-btn:active,
.download-btn:active,
.spk-watch-action-btn:active{
  transform: translateY(0);
}

.like-btn i,
.download-btn i,
.spk-watch-action-btn i{
  color: #ff6b88 !important;
  font-size: 14px;
}

.like-btn.active,
.spk-watch-like-btn.active{
  background: #2a1b20;
  border-color: rgba(255,107,136,0.45);
  color: #fff;
}

.like-btn:disabled,
.like-btn[disabled],
.spk-watch-action-btn.is-disabled,
.spk-watch-action-btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* 메타 박스 */
.video-meta-box,
.spk-video-meta-box{
  margin-top: 14px;
  padding: 12px;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 13px;

  background: #161616;
  color: inherit;
  font-size: inherit;
  line-height: normal;
}

.spk-meta-item{
  min-width: 0;
  padding: 8px 11px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;

  background: #202020;
}

.spk-meta-label{
  display: inline;
  margin: 0;

  color: rgba(255,255,255,0.48);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.spk-meta-label::after{
  content: ":";
}

.spk-meta-value{
  display: inline;

  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 800;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spk-meta-keywords{
  flex: 1 1 100%;
  align-items: flex-start;
}

.spk-meta-keywords .spk-meta-value{
  white-space: normal;
  line-height: 1.45;
}

/* =========================================================
   VX Recommended Sidebar
   다른 CSS와 충돌하지 않는 독립 클래스
   ========================================================= */

.vx-rec-panel{
  grid-column: 2;
  grid-row: 1;

  position: sticky;
  top: 16px;
  align-self: start;

  width: 100%;
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);

  overflow-y: auto;
  overflow-x: hidden;

  box-sizing: border-box;
  padding: 16px;

  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: #1B1B1B;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);

  scrollbar-width: thin;
  scrollbar-color: rgba(255,107,136,0.55) rgba(255,255,255,0.04);
}

.vx-rec-panel::-webkit-scrollbar{
  width: 8px;
}

.vx-rec-panel::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

.vx-rec-panel::-webkit-scrollbar-thumb{
  background: rgba(255,107,136,0.58);
  border-radius: 999px;
}

.vx-rec-panel::-webkit-scrollbar-thumb:hover{
  background: rgba(255,107,136,0.78);
}

.vx-rec-head{
  padding: 0 4px 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.vx-rec-kicker{
  margin-bottom: 6px;
  color: #ff6b88;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vx-rec-title{
  color: rgba(255,255,255,0.96);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.vx-rec-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vx-rec-item{
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;

  padding: 9px;
  border-radius: 12px;

  color: inherit;
  text-decoration: none;

  background: transparent;

  transition:
    background .16s ease,
    transform .16s ease;
}

.vx-rec-item:hover{
  background: #202020;
  transform: translateY(-1px);
}

.vx-rec-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #050505;
}

.vx-rec-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vx-rec-duration{
  position: absolute;
  right: 6px;
  bottom: 6px;

  padding: 3px 7px;
  border-radius: 8px;

  background: rgba(0,0,0,0.76);
  color: #fff;

  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.vx-rec-info{
  min-width: 0;
  padding-top: 1px;
}

.vx-rec-video-title{
  color: rgba(255,255,255,0.94);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

.vx-rec-meta{
  margin-top: 6px;

  color: rgba(255,255,255,0.56);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 댓글 디자인 유지 */
.spk-comment-panel{
  margin-top: 16px;
  padding: 16px;

  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;

  background: #1B1B1B;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.spk-comment-head{
  margin-bottom: 14px;
}

.spk-comment-head h3{
  margin: 0;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: rgba(255,255,255,0.92);
  font-size: 15px;
  font-weight: 900;
}

.spk-comment-head i{
  color: #ff6b88;
}

.spk-comment-input-box textarea{
  min-height: 48px;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;

  background: #242424;
  color: rgba(255,255,255,0.92);
}

.spk-comment-input-box textarea:focus{
  border-color: rgba(255,107,136,0.35);
}

.spk-comment-submit{
  min-height: 38px;
  padding: 0 16px;

  border: 1px solid rgba(255,107,136,0.48);
  border-radius: 12px;

  background: #ff6b88;
  color: #fff;

  font-weight: 900;
}

.spk-comment-submit:hover{
  background: #ff7994;
}

.spk-comment{
  padding: 12px;

  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;

  background: #161616;
}

.spk-comment-user{
  color: #fff;
  text-decoration: none;
}

.spk-comment-user:hover{
  color: #ff6b88;
}

/* 반응형 */
@media (max-width: 900px){
  .watch-page{
    grid-template-columns: 1fr;
    padding: 12px 12px 42px;
  }

  .watch-main{
    grid-column: 1;
  }

  .vx-rec-panel{
    grid-column: 1;
    grid-row: auto;

    position: static;
    max-height: none;
    overflow: visible;

    margin-top: 16px;
  }
}

@media (max-width: 760px){
  .video-topbar{
    flex-direction: column;
    align-items: flex-start;
  }

  .video-actions{
    width: 100%;
  }

  .like-btn,
  .download-btn,
  .spk-watch-action-btn{
    min-height: 38px;
  }

  .video-title,
  .spk-watch-title{
    font-size: 19px;
  }

  .video-meta-box,
  .spk-video-meta-box{
    display: grid;
    grid-template-columns: 1fr;
  }

  .spk-meta-item{
    width: 100%;
    box-sizing: border-box;
  }

  .vx-rec-item{
    grid-template-columns: 132px minmax(0, 1fr);
  }
}

@media (max-width: 480px){
  .like-btn,
  .download-btn,
  .spk-watch-action-btn{
    flex: 1;
  }

  .vx-rec-item{
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

/* =========================================================
   Watch layout + recommended sidebar
   원하는 동작:
   - 스크롤 시 오른쪽 탭 고정
   - 브라우저 폭이 줄면, 동영상이 너무 작아지기 전에 아래로 이동
   ========================================================= */

.watch-page{
  width: 100%;
  max-width: 1780px;
  margin: 0 auto;
  padding: 18px 16px 56px;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.watch-main{
  min-width: 0;
  overflow: hidden;
}

/* -------------------------
   Recommended sidebar
   ------------------------- */
.vx-rec-panel{
  grid-column: 2;
  grid-row: 1;

  position: sticky;
  align-self: start;

  top: 12px;
  height: calc(110dvh + 80px); /* 움직이는 문제 해결 부분 아래까지*/
  max-height: calc(120dvh + 80px);
  min-height: calc(100dvh + 20px);

  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;

  box-sizing: border-box;
  padding: 16px;

  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: #1B1B1B;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);

  scrollbar-width: thin;
  scrollbar-color: rgba(255,107,136,0.55) rgba(255,255,255,0.04);
}

.vx-rec-panel::-webkit-scrollbar{
  width: 8px;
}

.vx-rec-panel::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

.vx-rec-panel::-webkit-scrollbar-thumb{
  background: rgba(255,107,136,0.58);
  border-radius: 999px;
}

.vx-rec-panel::-webkit-scrollbar-thumb:hover{
  background: rgba(255,107,136,0.78);
}

.vx-rec-head{
  padding: 0 4px 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.vx-rec-kicker{
  margin-bottom: 6px;
  color: #ff6b88;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vx-rec-title{
  color: rgba(255,255,255,0.96);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.vx-rec-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vx-rec-item{
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;

  padding: 9px;
  border-radius: 12px;

  color: inherit;
  text-decoration: none;
  background: transparent;

  transition: background .16s ease, transform .16s ease;
}

.vx-rec-item:hover{
  background: #202020;
  transform: translateY(-1px);
}

.vx-rec-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #050505;
}

.vx-rec-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vx-rec-duration{
  position: absolute;
  right: 6px;
  bottom: 6px;

  padding: 3px 7px;
  border-radius: 8px;

  background: rgba(0,0,0,0.76);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.vx-rec-info{
  min-width: 0;
  padding-top: 1px;
}

.vx-rec-video-title{
  color: rgba(255,255,255,0.94);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vx-rec-meta{
  margin-top: 6px;

  color: rgba(255,255,255,0.56);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   핵심
   브라우저가 이 정도 이하로 줄면
   메인 동영상이 작아지기 전에 sidebar를 아래로 내린다.
   1500px은 네 스크린샷 기준으로 꽤 적절한 시작값.
   필요하면 1450 / 1550으로 조절 가능.
   ========================================================= */
@media (max-width: 1400px){
  .watch-page{
    grid-template-columns: 1fr;
  }

  .watch-main{
    grid-column: 1;
  }

  .vx-rec-panel{
    grid-column: 1;
    grid-row: auto;

    position: static;
    top: auto;

    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;

    overflow: visible;
    overflow-y: visible;
    overflow-x: hidden;

    margin-top: 16px;
    align-self: stretch;
  }

  .vx-rec-list{
    height: auto;
    min-height: 0;
    max-height: none;

    overflow: visible;

    display: flex;
    flex-direction: column;
  }

  .vx-rec-item{
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 760px){
  .vx-rec-item{
    grid-template-columns: 132px minmax(0, 1fr);
  }
}

@media (max-width: 480px){
  .vx-rec-item{
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

/* =========================
   Video Like Toggle State
========================= */

.spk-watch-actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.spk-watch-like-btn {
  border: 0;
  cursor: pointer;
}

.spk-watch-like-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.spk-watch-like-btn.active {
  background: rgba(255, 111, 156, 0.14);
  color: #ff6f9c;
  border-color: rgba(255, 111, 156, 0.24);
}

.spk-watch-like-btn.active i {
  color: #ff6f9c;
}

.spk-watch-like-btn.active:hover {
  background: rgba(255, 111, 156, 0.19);
}
