/* ============================================
   VIDEO SLIDESHOW PLAYER - UNAC Dark Theme
   ============================================ */

.video-player-section {
  margin: 2rem 0 3rem 0;
  background: var(--card-bg, #1e1e2e);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle, #2d2d44);
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-cyan, #00d4ff) 0%, var(--accent-green, #00ff88) 100%);
  color: var(--darker-bg, #0a0a0f);
}

.video-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.video-title svg {
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.video-duration {
  font-family: 'Space Mono', monospace;
  font-size: 0.8125rem;
  opacity: 0.9;
  background: rgba(0,0,0,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.video-container {
  position: relative;
  background: #0a0a0f;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.video-scenes {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  overflow: hidden;
}

.video-scene.active {
  opacity: 1;
  visibility: visible;
}

/* Ken Burns Animation */
@keyframes ken-burns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.scene-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.video-scene.active .scene-background {
  animation: ken-burns 15s ease-out forwards;
}

/* ============================================
   Scene Overlay & Content
   ============================================ */

.scene-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 15, 0.95) 0%,
    rgba(10, 10, 15, 0.85) 50%,
    rgba(10, 10, 15, 0.75) 100%
  );
}

.scene-content {
  width: 50%;
  padding: 1.5rem 2rem;
  padding-bottom: 5rem;
  color: #ffffff !important;
  background: none !important;
  overflow: hidden;
}

.scene-content * {
  color: #ffffff !important;
  background: none !important;
}

.scene-heading {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  color: #ffffff !important;
  background: none !important;
}

.scene-heading::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-cyan, #00d4ff), var(--accent-green, #00ff88));
  margin-top: 0.75rem;
  border-radius: 2px;
}

.scene-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  background: none !important;
}

.scene-bullets li {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #ffffff !important;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  background: none !important;
}

.scene-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--primary-cyan, #00d4ff);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

/* Bullet animation */
@keyframes bullet-enter {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

.video-scene.active .scene-bullets li {
  animation: bullet-enter 0.5s ease-out forwards;
}

.video-scene.active .scene-bullets li:nth-child(1) { animation-delay: 0.2s; opacity: 0; }
.video-scene.active .scene-bullets li:nth-child(2) { animation-delay: 0.35s; opacity: 0; }
.video-scene.active .scene-bullets li:nth-child(3) { animation-delay: 0.5s; opacity: 0; }
.video-scene.active .scene-bullets li:nth-child(4) { animation-delay: 0.65s; opacity: 0; }
.video-scene.active .scene-bullets li:nth-child(5) { animation-delay: 0.8s; opacity: 0; }

/* ============================================
   Video Controls
   ============================================ */

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.98) 0%, transparent 100%);
  opacity: 1;
  transition: opacity 0.3s;
}

.video-container:not(:hover) .video-controls {
  opacity: 0.4;
}

.video-container:hover .video-controls {
  opacity: 1;
}

.video-btn {
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
}

.video-btn:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.4);
  border-color: rgba(0, 212, 255, 0.8);
  transform: scale(1.05);
}

.video-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.video-btn svg {
  width: 18px;
  height: 18px;
}

.video-play-pause {
  width: 52px;
  height: 52px;
  background: var(--primary-cyan, #00d4ff);
  border: 2px solid var(--accent-green, #00ff88);
}

.video-play-pause:hover {
  background: var(--accent-green, #00ff88);
  transform: scale(1.08);
}

.video-play-pause svg {
  width: 22px;
  height: 22px;
  color: var(--darker-bg, #0a0a0f);
}

.video-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-cyan, #00d4ff), var(--accent-green, #00ff88));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

/* Collapsible Instructions */
.video-instructions {
  background: var(--card-bg, #1e1e2e);
  border-top: 1px solid var(--border-subtle, #2d2d44);
}

.video-instructions-toggle {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-secondary, #8892b0);
  transition: color 0.2s;
}

.video-instructions-toggle:hover {
  color: var(--primary-cyan, #00d4ff);
}

.video-instructions-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}

.video-instructions.expanded .video-instructions-toggle svg {
  transform: rotate(180deg);
}

.video-instructions-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary, #8892b0);
  padding: 0 1.5rem;
}

.video-instructions.expanded .video-instructions-content {
  max-height: 100px;
  padding: 0.5rem 1.5rem 0.75rem;
}

/* ============================================
   Closed Captions
   ============================================ */

.video-caption {
  position: absolute;
  bottom: 80px;
  left: 10%;
  right: 10%;
  text-align: center;
  z-index: 90;
  pointer-events: none;
  transition: opacity 0.3s;
}

.video-caption.hidden {
  opacity: 0;
}

.video-caption-text {
  display: inline-block;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 100%;
  font-family: 'Inter', sans-serif;
  text-shadow: none;
}

.video-btn.video-cc.active {
  background: rgba(0, 212, 255, 0.6);
  border-color: var(--primary-cyan, #00d4ff);
}

.video-btn.video-cc svg {
  width: 20px;
  height: 20px;
}

/* Volume slider */
.video-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-volume-slider {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, width 0.2s;
  width: 0;
}

.video-volume:hover .video-volume-slider,
.video-volume-slider:focus {
  opacity: 1;
  width: 70px;
}

.video-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--primary-cyan, #00d4ff);
  border-radius: 50%;
  cursor: pointer;
}

.video-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--primary-cyan, #00d4ff);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Fullscreen */
.video-player-section.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  border-radius: 0;
  margin: 0;
}

.video-player-section.fullscreen .video-container {
  height: 100%;
  aspect-ratio: unset;
}

.video-player-section.fullscreen .video-header,
.video-player-section.fullscreen .video-instructions {
  display: none;
}

/* ============================================
   Slide Templates
   ============================================ */

/* Intro Template */
.video-scene[data-template="intro"] .scene-overlay {
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 50, 80, 0.9), rgba(10, 10, 15, 0.95));
}

.video-scene[data-template="intro"] .scene-content {
  text-align: center;
  padding: 3rem;
  width: 80%;
}

.video-scene[data-template="intro"] .scene-heading {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 100%;
}

.video-scene[data-template="intro"] .scene-heading::after {
  margin: 1rem auto 0;
  width: 120px;
}

/* Split Left Template (Content on RIGHT) */
.video-scene[data-template="split-left"] .scene-overlay {
  align-items: stretch;
  justify-content: flex-end;
  background: linear-gradient(
    to left,
    rgba(10, 10, 15, 0.95) 0%,
    rgba(10, 10, 15, 0.85) 40%,
    transparent 60%
  );
}

.video-scene[data-template="split-left"] .scene-content {
  width: 45%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 2rem;
  padding-bottom: 5rem;
}

/* Split Right Template (Content on LEFT) */
.video-scene[data-template="split-right"] .scene-overlay {
  align-items: stretch;
  justify-content: flex-start;
  background: linear-gradient(
    to right,
    rgba(10, 10, 15, 0.95) 0%,
    rgba(10, 10, 15, 0.85) 40%,
    transparent 60%
  );
}

.video-scene[data-template="split-right"] .scene-content {
  width: 45%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 2rem;
  padding-bottom: 5rem;
}

/* Diagonal Template */
.video-scene[data-template="diagonal"] .scene-overlay {
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 15, 0.95) 0%,
    rgba(10, 10, 15, 0.7) 100%
  );
}

.video-scene[data-template="diagonal"] .scene-content {
  width: 60%;
  text-align: center;
}

.video-scene[data-template="diagonal"] .scene-heading::after {
  margin: 0.75rem auto 0;
}

/* Final Template */
.video-scene[data-template="final"] .scene-overlay {
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(0, 80, 60, 0.85) 0%,
    rgba(10, 10, 15, 0.95) 100%
  );
}

.video-scene[data-template="final"] .scene-content {
  width: 70%;
  text-align: center;
  padding: 3rem;
}

.video-scene[data-template="final"] .scene-heading {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.video-scene[data-template="final"] .scene-heading::after {
  margin: 1rem auto 0;
  width: 100px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
  .video-header {
    padding: 0.75rem 1rem;
  }

  .video-title {
    font-size: 0.9rem;
  }

  .scene-content {
    width: 100% !important;
    padding: 1rem !important;
    padding-bottom: 4rem !important;
  }

  .video-scene[data-template="split-left"] .scene-overlay,
  .video-scene[data-template="split-right"] .scene-overlay {
    background: linear-gradient(
      to top,
      rgba(10, 10, 15, 0.98) 0%,
      rgba(10, 10, 15, 0.85) 50%,
      rgba(10, 10, 15, 0.7) 100%
    );
    align-items: flex-end;
    justify-content: center;
  }

  .video-controls {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .video-btn {
    width: 36px;
    height: 36px;
  }

  .video-play-pause {
    width: 44px;
    height: 44px;
  }

  .video-caption {
    bottom: 70px;
    left: 5%;
    right: 5%;
  }

  .video-caption-text {
    font-size: 0.875rem;
    padding: 8px 12px;
  }
}
