@charset "utf-8";

/* ==========================================================================
   LATEST PORTFOLIO YOUTUBE DARK THEME (MINIMAL CLEAN)
   ========================================================================== */

.lt_yt_gallery_wrap {
  width: 100%;
  margin-bottom: 40px;
  box-sizing: border-box;
}

/* 갤러리 그리드 (5열 기본) */
.lt_yt_grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.lt_yt_card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.lt_yt_card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  border-color: rgba(99, 102, 241, 0.4);
}

.lt_yt_inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 썸네일 박스 & 비율 */
.lt_yt_thumb_wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.lt_yt_thumb_wrap.ratio_16_9 {
  padding-bottom: 56.25%; /* 16:9 가로 */
}
.lt_yt_thumb_wrap.ratio_9_16 {
  padding-bottom: 177.77%; /* 9:16 세로 쇼츠 (유튜브 공식 비율) */
}

.lt_thumb_img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.lt_yt_card:hover .lt_thumb_img {
  transform: scale(1.06);
}

.lt_thumb_overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}
.lt_yt_card:hover .lt_thumb_overlay {
  background: rgba(0, 0, 0, 0.55);
}

.lt_play_circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 2px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.6);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lt_yt_card:hover .lt_play_circle {
  transform: scale(1.15);
  background: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.9);
}

.lt_badge_wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.lt_badge_shorts {
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.lt_badge_cate {
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* 카드 제목 */
.lt_yt_body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lt_yt_subject {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.lt_yt_subject a {
  color: #f8fafc;
  text-decoration: none;
  transition: color 0.2s ease;
}
.lt_yt_subject a:hover,
.lt_yt_card:hover .lt_yt_subject a {
  color: #818cf8;
}
.lt_cmt {
  font-size: 11.5px;
  color: #ef4444;
  font-weight: 700;
  margin-left: 4px;
}

.lt_empty_box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #111827;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #94a3b8;
}

/* ==========================================================================
   화면 정중앙 유튜브 레이어 팝업 모달 (Center Screen Modal)
   ========================================================================== */
.yt_modal_backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  margin: 0;
}

.yt_modal_backdrop.is_active {
  display: flex !important;
}

body.modal_open {
  overflow: hidden !important;
}

.yt_modal_dialog {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: auto;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 세로 쇼츠 모달 크기 */
.yt_modal_dialog.modal_shorts {
  max-width: 420px;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.yt_modal_header {
  padding: 14px 20px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 50px;
}
.yt_modal_title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt_modal_close_btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.yt_modal_close_btn:hover {
  background: #ef4444;
  transform: rotate(90deg);
}

.yt_modal_body {
  padding: 0;
  background: #000;
}

.yt_modal_player_wrap {
  position: relative;
  width: 100%;
}
.yt_modal_player_wrap.ratio_16_9 {
  padding-bottom: 56.25%; /* 16:9 가로 비율 */
}
.yt_modal_player_wrap.ratio_9_16 {
  padding-bottom: 177.77%; /* 9:16 세로 쇼츠 비율 */
}

.yt_modal_player_wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   반응형 미디어 쿼리 (Latest Grid)
   ========================================================================== */
@media (min-width: 1400px) {
  .lt_yt_grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
@media (max-width: 1200px) {
  .lt_yt_grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}
@media (max-width: 850px) {
  .lt_yt_grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .lt_yt_card {
    border-radius: 8px;
  }
  .lt_yt_body {
    padding: 6px 8px 8px;
  }
  .lt_yt_subject {
    font-size: 12px;
  }
  .lt_play_circle {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}
@media (max-width: 540px) {
  .lt_yt_grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .lt_yt_body {
    padding: 5px 6px 6px;
  }
  .lt_yt_subject {
    font-size: 11px;
    line-height: 1.3;
  }
  .lt_badge_shorts, .lt_badge_cate {
    font-size: 8.5px;
    padding: 1px 4px;
  }
}

/* 모바일 화면(768px 이하) 레이어 상단 밀착 (하단 짤림 방지) */
@media (max-width: 768px) {
  .yt_modal_backdrop {
    align-items: flex-start !important;
    padding: 8px 8px 20px !important;
    overflow-y: auto !important;
  }
  .yt_modal_dialog {
    margin: 0 auto !important;
    border-radius: 10px !important;
    max-width: 100% !important;
  }
  .yt_modal_dialog.modal_shorts {
    max-width: min(340px, 92vw) !important;
  }
  .yt_modal_header {
    padding: 10px 14px !important;
  }
  .yt_modal_title {
    font-size: 13.5px !important;
  }
  .yt_modal_close_btn {
    top: 6px !important;
    right: 8px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }
}
