/* ============================================================
   BLUEFOX — ChapterIntroVideo + ChapterIntroMetadata
   Cinematic 16:9 frame, Bluefox palette, sober native controls.
   ============================================================ */

.bf-civ {
  margin: 0 0 24px;
  width: 100%;
}

.bf-civ-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  border: 1px solid rgba(31, 107, 255, 0.25);
  box-shadow:
    0 35px 90px rgba(0, 0, 0, 0.55),
    0 8px 30px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  isolation: isolate;
}

.bf-civ-player,
.bf-civ-player iframe,
.bf-civ-player video,
.bf-civ-iframe,
.bf-civ-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.bf-civ-video {
  object-fit: cover;
}

/* ---------- Poster ---------- */
.bf-civ-poster {
  position: absolute;
  inset: 0;
  background-color: #0B1024;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.bf-civ-poster.hidden {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Unmute toggle ---------- */
.bf-civ-unmute {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(15, 20, 40, 0.85);
  color: var(--text-primary, #EAF0FF);
  border: 1px solid rgba(79, 209, 255, 0.4);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.bf-civ-unmute:hover {
  background: rgba(31, 107, 255, 0.35);
  border-color: var(--cyan-main, #4FD1FF);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(79, 209, 255, 0.25);
}
.bf-civ-unmute:focus-visible {
  outline: 2px solid var(--cyan-main, #4FD1FF);
  outline-offset: 2px;
}
.bf-civ-unmute.is-active {
  background: linear-gradient(135deg, rgba(79, 209, 255, 0.85), rgba(31, 107, 255, 0.85));
  border-color: var(--cyan-main, #4FD1FF);
  color: #fff;
}
.bf-civ-unmute-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.bf-civ-unmute-icon svg { width: 18px; height: 18px; }

/* ---------- Replay overlay (end of video) ---------- */
.bf-civ-replay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bf-civ-replay.visible {
  opacity: 1;
  pointer-events: auto;
}
.bf-civ-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(15, 20, 40, 0.92);
  color: var(--text-primary, #EAF0FF);
  border: 1px solid var(--cyan-main, #4FD1FF);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(79, 209, 255, 0.3);
  transition: transform 0.18s ease, background 0.18s ease;
}
.bf-civ-replay-btn:hover {
  background: rgba(31, 107, 255, 0.35);
  transform: translateY(-2px);
}
.bf-civ-replay-btn svg { width: 18px; height: 18px; }

.bf-civ-error {
  padding: 20px;
  background: var(--bg-card, #0F1428);
  border: 1px dashed var(--accent-red, #FF4D4F);
  border-radius: var(--radius-md, 16px);
  color: var(--accent-red, #FF4D4F);
  font-size: 13px;
}

/* ============================================================
   ChapterIntroMetadata
   ============================================================ */
.bf-civ-meta {
  margin: 0 0 32px;
  padding: 18px 22px 20px;
  background: var(--bg-card, #0F1428);
  border: 1px solid var(--border-color, rgba(31, 107, 255, 0.15));
  border-radius: var(--radius-md, 16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bf-civ-meta-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bf-civ-meta-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #EAF0FF);
  letter-spacing: -0.005em;
}
.bf-civ-meta-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(79, 209, 255, 0.12);
  border: 1px solid rgba(79, 209, 255, 0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan-main, #4FD1FF);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bf-civ-meta-duration svg { width: 13px; height: 13px; }
.bf-civ-meta-objectives {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bf-civ-meta-objectives li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-secondary, #B8C4E8);
  line-height: 1.5;
}
.bf-civ-meta-objectives svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--violet-main, #7A5CFF);
}
.bf-civ-meta-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color, rgba(31, 107, 255, 0.25)), transparent);
  margin: 4px 0 -4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .bf-civ-frame {
    border-radius: var(--radius-md, 16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  }
  .bf-civ-unmute {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .bf-civ-unmute-label {
    display: none; /* keep just the icon on small screens */
  }
  .bf-civ-meta {
    padding: 14px 16px 16px;
  }
  .bf-civ-meta-title { font-size: 16px; }
}
