/* 테스트 랩 전용 스타일: 유튜브 UI 목업 */

.lab-main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.lab-stage {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  background: #f9f9f9;
  transition: background 0.2s;
}

body.yt-dark .lab-stage { background: #0f0f0f; }

/* ---------- 공통 카드 ---------- */

.yt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.yt-card { cursor: pointer; }

.yt-thumb-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #ddd;
}
body.yt-dark .yt-thumb-wrap { background: #272727; }

.yt-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 13px;
}

.yt-dur {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
}

.yt-card-info {
  display: flex;
  gap: 10px;
  padding-top: 10px;
}

.yt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b0b0b0, #7d7d7d);
  flex-shrink: 0;
}
.yt-avatar.small { width: 22px; height: 22px; display: inline-block; vertical-align: middle; margin-right: 6px; }

.yt-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #0f0f0f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-title.small { font-size: 13px; }
body.yt-dark .yt-title { color: #f1f1f1; }

.yt-meta {
  font-size: 13px;
  color: #606060;
  margin-top: 3px;
}
body.yt-dark .yt-meta { color: #aaaaaa; }
.yt-meta.with-avatar { display: flex; align-items: center; margin-top: 8px; }

/* 내 카드 표시 (테두리 없이 은은한 링) */
.mine .yt-thumb-wrap { outline: 3px solid rgba(76, 201, 240, 0.85); outline-offset: 2px; }

/* ---------- 검색 결과 ---------- */

.yt-searchbar {
  max-width: 860px;
  margin: 0 auto 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 15px;
  color: #0f0f0f;
}
body.yt-dark .yt-searchbar { background: #121212; border-color: #303030; color: #f1f1f1; }

.yt-list { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.yt-row { display: flex; gap: 16px; cursor: pointer; }
.yt-thumb-wrap.row { width: 360px; flex-shrink: 0; }
.yt-row-info { min-width: 0; }
.yt-row .yt-title { font-size: 17px; font-weight: 500; }

/* ---------- 모바일 ---------- */

.yt-phone {
  width: 375px;
  margin: 0 auto;
  background: #fff;
  border-radius: 36px;
  border: 10px solid #1c1c1e;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
body.yt-dark .yt-phone { background: #0f0f0f; }

.yt-phone-notch {
  height: 26px;
  background: #1c1c1e;
  border-radius: 0 0 16px 16px;
  width: 55%;
  margin: 0 auto;
}

.yt-phone-feed { padding: 10px 0 20px; }
.yt-phone-feed .yt-card { margin-bottom: 14px; }
.yt-phone-feed .yt-thumb-wrap { border-radius: 0; }
.yt-phone-feed .yt-card-info { padding: 10px 12px 0; }

/* ---------- 관련 영상 (시청 페이지 사이드바) ---------- */

.yt-watch {
  display: flex;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.yt-player {
  flex: 1;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  align-self: flex-start;
}

.yt-side { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.yt-side-label { font-size: 15px; font-weight: 600; color: #0f0f0f; margin-bottom: 4px; }
body.yt-dark .yt-side-label { color: #f1f1f1; }

.yt-compact { display: flex; gap: 10px; cursor: pointer; }
.yt-thumb-wrap.compact { width: 168px; flex-shrink: 0; border-radius: 8px; }
.yt-compact .yt-title.small { font-weight: 600; }

/* ---------- 컨트롤 패널 요소 ---------- */

.view-tabs { display: flex; flex-direction: column; gap: 8px; }

.view-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.view-tab:hover { border-color: var(--accent); }
.view-tab.active { border-color: var(--accent); background: rgba(76, 201, 240, 0.1); }
.view-tab .lock { font-size: 12px; color: var(--accent-2); font-weight: 700; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  width: auto !important;
}
.checkbox-label input { accent-color: var(--accent); }

.lab-tip {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  padding: 12px;
  background: var(--panel-2);
  border-radius: 10px;
}

/* ---------- 순간노출 오버레이 ---------- */

#flash-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.96);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  padding: 40px;
  z-index: 50;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .yt-grid { grid-template-columns: repeat(2, 1fr); }
  .yt-watch { flex-direction: column; }
  .yt-side { width: 100%; }
}

@media (max-width: 900px) {
  .lab-main { flex-direction: column; }
}
