/* ==================== VIDEO DETAIL PAGE STYLES ==================== */

/* Back Link */
.video-detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.video-detail-back-link:hover {
  color: var(--primary-hover);
  transform: translateX(-4px);
}

/* Video Detail Section */
.video-detail-section {
  margin-bottom: 3rem;
}

/* Video Detail Container */
.video-detail-container {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.video-detail-container:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Main Layout */
.video-player-section {
  background: #000;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  width: 100%;
}

.video-player-wrapper {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #000;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

/* Video Player */
.video-player {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-player iframe,
.video-player video,
.video-player .video-thumbnail-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
  object-fit: contain;
}

/* HLS Player */
.video-player-hls {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #000;
}

#video-player-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Quality Selector */
.quality-selector-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.quality-selector {
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.quality-selector:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.6);
}

.quality-selector option {
  background: #1a1a1a;
  color: #fff;
  padding: 0.5rem;
}

/* Transcoding Status */
.transcoding-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #999;
  font-size: 0.95rem;
  z-index: 5;
}

.transcoding-status p {
  margin: 0;
  padding: 1rem;
}

/* Video Info Section */
.video-info-section {
  padding: 2.5rem;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Video Title */
.video-title {
  margin: 0;
  font-size: 2rem;
  color: #20232a;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* Video Badges */
.video-badges {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.video-category-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.video-category-badge:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.video-status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #c8e6c9;
}

.video-views-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  color: #666;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #e0e0e0;
}

/* Video Metadata */
.video-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metadata-label {
  display: block;
  font-size: 0.85rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-value {
  display: block;
  font-size: 1.1rem;
  color: #20232a;
  font-weight: 600;
}

/* Video Description */
.video-description {
  padding-top: 1.5rem;
}

.video-description h3 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: #20232a;
  font-weight: 600;
}

.video-description p {
  margin: 0;
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  letter-spacing: 0.3px;
}

/* Button Styles */
.btn-primary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.9rem 2rem;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 0.3rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .video-title {
    font-size: 1.6rem;
  }

  .video-info-section {
    padding: 2rem;
  }

  .video-player-wrapper {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  .video-detail-back-link {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .video-title {
    font-size: 1.4rem;
  }

  .video-info-section {
    padding: 1.5rem;
  }

  .video-player-section {
    padding: 0.75rem;
  }

  .video-player-wrapper {
    aspect-ratio: 16 / 9;
  }

  .video-badges {
    gap: 0.6rem;
  }

  .video-category-badge,
  .video-status-badge,
  .video-views-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .video-metadata {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .video-description p {
    font-size: 0.95rem;
  }

  .quality-selector-wrapper {
    top: 8px;
    right: 8px;
  }

  .quality-selector {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .video-detail-back-link {
    font-size: 0.85rem;
    gap: 0.3rem;
    margin-bottom: 1rem;
  }

  .video-detail-container {
    border-radius: 0.5rem;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  }

  .video-player-section {
    padding: 0.5rem;
    background: #000;
  }

  .video-player-wrapper {
    border-radius: 0.3rem;
    aspect-ratio: 16 / 9;
  }

  .video-player,
  .video-player-hls {
    border-radius: 0.3rem;
  }

  .video-info-section {
    padding: 1rem;
  }

  .video-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .video-info {
    gap: 1rem;
  }

  .video-badges {
    gap: 0.4rem;
    padding-bottom: 0.8rem;
  }

  .video-category-badge,
  .video-status-badge,
  .video-views-badge {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .video-metadata {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1rem 0;
  }

  .metadata-label {
    font-size: 0.75rem;
  }

  .metadata-value {
    font-size: 1rem;
  }

  .video-description {
    padding-top: 1rem;
  }

  .video-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .video-description p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .btn-primary {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    margin-top: 1rem;
    width: 100%;
    text-align: center;
  }

  .quality-selector-wrapper {
    top: 6px;
    right: 6px;
  }

  .quality-selector {
    padding: 0.45rem 0.5rem;
    font-size: 0.7rem;
  }

  .transcoding-status {
    font-size: 0.9rem;
  }

  .transcoding-status p {
    padding: 0.8rem;
  }
}


/* ==================== PLYR CUSTOMIZATION ==================== */

.plyr {
  --plyr-color-main: var(--primary-color);
}

.plyr__controls {
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
  opacity: 1 !important;
}

.plyr--video {
  background: #000;
}

.plyr__control {
  color: #fff;
}

.plyr__control:hover {
  color: var(--primary-color);
}

.plyr [data-plyr="play"] {
  display: flex !important;
}

.plyr__progress {
  background: rgba(255, 255, 255, 0.3);
}

.plyr__progress__buffer {
  background: rgba(255, 255, 255, 0.5);
}
