/* Cut Edge Frames - Custom HLS Video Player Styles */

.cutedge-video-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 24px 16px;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.cutedge-player-container {
  width: 100%;
  max-width: 1200px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background-color: #06080d;
  box-shadow: 0 12px 48px -12px rgba(0, 229, 255, 0.22), 0 0 0 1px rgba(0, 229, 255, 0.18);
  user-select: none;
  -webkit-user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

/* Strict 2:1 Aspect Ratio Wrapper */
.cutedge-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cutedge-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Poster Frame Overlay */
.cutedge-poster-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 2;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.cutedge-player-container.is-playing .cutedge-poster-overlay,
.cutedge-player-container.has-started .cutedge-poster-overlay {
  opacity: 0;
}

/* Center Big Play Button */
.cutedge-center-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(8, 12, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.25), inset 0 0 16px rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cutedge-center-play-btn svg {
  width: 36px;
  height: 36px;
  fill: #00e5ff;
  margin-left: 4px; /* Optical center compensation */
  filter: drop-shadow(0 2px 8px rgba(0, 229, 255, 0.4));
  transition: transform 0.2s ease;
}

.cutedge-center-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.45), inset 0 0 24px rgba(0, 229, 255, 0.25);
}

.cutedge-center-play-btn:hover svg {
  transform: scale(1.08);
}

.cutedge-player-container.is-playing .cutedge-center-play-btn {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.85);
}

/* Controls Overlay */
.cutedge-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 18px 14px;
  background: linear-gradient(to top, rgba(4, 6, 10, 0.95) 0%, rgba(4, 6, 10, 0.6) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 6;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cutedge-player-container.is-playing.hide-controls .cutedge-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

/* Progress / Scrubber Bar */
.cutedge-progress-container {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.cutedge-progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  transition: height 0.15s ease;
}

.cutedge-progress-container:hover .cutedge-progress-track {
  height: 6px;
}

.cutedge-progress-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  pointer-events: none;
  transition: width 0.2s linear;
}

.cutedge-progress-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
  border-radius: 4px;
  pointer-events: none;
}

.cutedge-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.cutedge-progress-container:hover .cutedge-progress-thumb,
.cutedge-progress-container.is-dragging .cutedge-progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

/* Control Row Elements */
.cutedge-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cutedge-controls-left,
.cutedge-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cutedge-btn {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease, background 0.18s ease, transform 0.15s ease;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
}

.cutedge-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cutedge-btn:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.12);
}

.cutedge-btn:active {
  transform: scale(0.92);
}

/* Time Display */
.cutedge-time-display {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
  letter-spacing: 0.02em;
}

.cutedge-time-display .separator {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 4px;
}

/* Volume Slider Group */
.cutedge-volume-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cutedge-volume-slider-container {
  width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
}

.cutedge-volume-group:hover .cutedge-volume-slider-container,
.cutedge-volume-group:focus-within .cutedge-volume-slider-container,
.cutedge-volume-slider-container.is-active {
  width: 70px;
  opacity: 1;
}

.cutedge-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 66px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.cutedge-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.8);
  cursor: pointer;
}

.cutedge-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.8);
  cursor: pointer;
  border: none;
}

/* Quality Menu Popup */
.cutedge-quality-container {
  position: relative;
}

.cutedge-quality-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.cutedge-btn:hover .cutedge-quality-badge {
  background: rgba(0, 229, 255, 0.22);
  border-color: #00e5ff;
}

.cutedge-quality-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: rgba(10, 14, 22, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 229, 255, 0.15);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 105px;
  z-index: 20;
}

.cutedge-quality-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cutedge-quality-option {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.15s ease;
}

.cutedge-quality-option:hover {
  color: #fff;
  background: rgba(0, 229, 255, 0.12);
}

.cutedge-quality-option.is-selected {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.16);
}

.cutedge-quality-option.is-selected::after {
  content: '✓';
  font-size: 11px;
  font-weight: bold;
}

/* Fullscreen Specific Styles */
.cutedge-player-container:fullscreen,
.cutedge-player-container:-webkit-full-screen {
  border-radius: 0;
  max-width: none;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.cutedge-player-container:fullscreen .cutedge-video-wrapper,
.cutedge-player-container:-webkit-full-screen .cutedge-video-wrapper {
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
}

/* Responsive Viewports */
@media (max-width: 768px) {
  .cutedge-video-section {
    padding: 20px 12px 10px;
  }
  
  .cutedge-player-container {
    border-radius: 14px;
  }
  
  .cutedge-center-play-btn {
    width: 64px;
    height: 64px;
  }
  
  .cutedge-center-play-btn svg {
    width: 28px;
    height: 28px;
  }
  
  .cutedge-controls {
    padding: 20px 12px 10px;
  }
  
  .cutedge-controls-left,
  .cutedge-controls-right {
    gap: 6px;
  }
  
  .cutedge-volume-group {
    display: none; /* Keep mobile controls clutter-free */
  }
  
  .cutedge-time-display {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .cutedge-video-section {
    padding: 16px 8px 8px;
  }
  
  .cutedge-player-container {
    border-radius: 12px;
  }
  
  .cutedge-center-play-btn {
    width: 52px;
    height: 52px;
  }
  
  .cutedge-center-play-btn svg {
    width: 22px;
    height: 22px;
  }
}
