/* ---------- Video stage: player + side ad slots ---------- */

.video-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.video-stage {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.video-player-wrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

/* Plyr skin (https://plyr.io) — themed to the site's pink accent */
.video-player-wrap {
  --plyr-color-main: var(--accent);
  --plyr-video-background: #000;
}

.video-player-wrap .plyr--video {
  border-radius: 10px;
}

.video-player-wrap video {
  object-fit: contain;
}

/* Fallback sizing for the plain <video controls> tag, only seen if the
   Plyr script is blocked/offline and never gets to enhance it */
.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Skyscraper ad slots, anchored beside the player. They stretch to its
   height and simply disappear if the ad fails to fill (no fallback content
   makes sense for a sidebar slot) — see js/videoks-page.js. */
.video-ad-slot {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  border-radius: 10px;
  overflow: hidden;
}

.video-ad-slot:empty {
  display: none;
}

.video-ad-left {
  right: 100%;
  margin-right: 20px;
}

.video-ad-right {
  left: 100%;
  margin-left: 20px;
}

.video-ad-slot ins.adsbygoogle {
  width: 100%;
  height: 100%;
}

@media (max-width: 1440px) {
  .video-ad-slot {
    display: none;
  }
}

/* ---------- Title ---------- */

.video-title-row {
  max-width: 1100px;
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.video-detail-title {
  font-size: 1.4rem;
  font-weight: 700;
}

/* ---------- Group / Idol info box ---------- */

/* flex + max-width (not a 1fr/1fr grid) so each card hugs its own content
   instead of stretching to fill half of a 1100px-wide box */
.video-info-box {
  max-width: 1100px;
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.video-info-col {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  background: var(--bg-header);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

.video-info-col:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.video-info-avatar {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
}

.video-info-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.video-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.video-info-name {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 2px 0 0;
}

.video-info-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.video-info-meta svg {
  color: var(--accent);
  flex-shrink: 0;
}

.video-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 10px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.video-info-col:hover .video-info-btn {
  background: var(--accent);
  color: #fff;
}

/* ---------- Mix videos: boxed, horizontally-sliding row of idols (shown
   instead of .video-info-box) ---------- */

.video-mix-box {
  max-width: 1100px;
  margin: 20px auto 0;
  background: var(--bg-header);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.video-mix-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.video-mix-title {
  font-size: 1rem;
  font-weight: 700;
}

/* Pinned to the right so the title stays centered */
.video-mix-arrows {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}

.video-mix-arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1f;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.video-mix-arrow:hover {
  color: var(--text);
  border-color: var(--accent);
}

.video-mix-viewport {
  overflow: hidden;
}

/* Always a single row (never wraps to a second row) — js/videoks-page.js
   measures whether that row actually fits and, if not, adds .is-scrollable
   below instead of letting it wrap. */
.video-mix-track {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  /* Room for the hover ring and lift — .video-mix-viewport and the
     scrollable track both clip overflow, which was shaving the top/bottom. */
  padding: 4px;
}

/* Only applied once the idols actually overflow one row (js/videoks-page.js) —
   turns the centered row into a scrollable one the arrows can drive. */
.video-mix-track.is-scrollable {
  justify-content: flex-start;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.video-mix-track.is-scrollable::-webkit-scrollbar {
  display: none;
}

.video-mix-idol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 120px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.video-mix-idol .video-info-avatar {
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

/* The extra ring thickens the red border without changing the avatar's size */
.video-mix-idol:hover .video-info-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  transform: translateY(-2px);
}

.video-mix-idol-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* ---------- Related videos ---------- */

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 24px auto 0;
  background: #1a1a1f;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.load-more-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.load-more-btn.is-loading svg {
  animation: load-more-spin 0.8s linear infinite;
}

@keyframes load-more-spin {
  to { transform: rotate(360deg); }
}

.load-more-final-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 24px auto 0;
  padding: 10px 20px;
  background: #1a1a1f;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.load-more-final-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 380px) {
  .video-info-avatar {
    width: 90px;
    height: 90px;
  }

  .video-info-name {
    font-size: 1.05rem;
  }
}
