/* ==========================================================================
   WIMPRO Player Stylesheet
   Version: 1.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   Player Container
   -------------------------------------------------------------------------- */
.wimpro-player-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #000;
  border-radius: var(--wimpro-radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.wimpro-player-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   Player Controls Overlay
   -------------------------------------------------------------------------- */
.wimpro-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 20px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wimpro-player-wrapper:hover .wimpro-player-controls,
.wimpro-player-controls.visible {
  opacity: 1;
}

/* Progress Bar */
.wimpro-player-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.wimpro-player-progress:hover {
  height: 6px;
}

.wimpro-player-progress-fill {
  height: 100%;
  background: var(--wimpro-gold);
  border-radius: 2px;
  transition: width 0.1s linear;
  position: relative;
}

.wimpro-player-progress-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--wimpro-gold);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wimpro-player-progress:hover .wimpro-player-progress-fill::after {
  opacity: 1;
}

/* Controls Row */
.wimpro-player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wimpro-player-controls-left,
.wimpro-player-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wimpro-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s ease, transform 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.wimpro-player-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.wimpro-player-btn-play {
  width: 48px;
  height: 48px;
}

.wimpro-player-time {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
}

/* Big Play Button */
.wimpro-player-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.2s ease;
  border: none;
  color: #050505;
}

.wimpro-player-big-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--wimpro-gold);
}

.wimpro-player-big-play.hidden {
  display: none;
}

/* Resume Notice */
.wimpro-resume-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  border-radius: var(--wimpro-radius-lg);
  padding: 32px;
  text-align: center;
  z-index: 10;
  backdrop-filter: blur(10px);
  display: none;
}

.wimpro-resume-notice h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.wimpro-resume-notice p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

.wimpro-resume-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Player Loading Spinner
   -------------------------------------------------------------------------- */
.wimpro-player-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.wimpro-player-loading.active {
  display: block;
}

.wimpro-player-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--wimpro-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

.wimpro-volume-slider {
  width: 0;
  overflow: hidden;
  transition: width 0.2s ease;
}

.wimpro-volume-group:hover .wimpro-volume-slider {
  width: 80px;
}

.wimpro-volume-slider input[type="range"] {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
}

.wimpro-volume-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Episode List (Series)
   -------------------------------------------------------------------------- */
.wimpro-episode-list {
  margin-top: 40px;
}

.wimpro-episode-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.wimpro-episode-list-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.wimpro-season-select {
  padding: 8px 16px;
  background: var(--wimpro-card);
  border: 1px solid var(--wimpro-border);
  border-radius: var(--wimpro-radius);
  color: var(--wimpro-white);
  font-size: 0.9rem;
  cursor: pointer;
}

.wimpro-season-select:focus {
  border-color: var(--wimpro-gold);
}

.wimpro-episode-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--wimpro-card);
  border-radius: var(--wimpro-radius);
  margin-bottom: 8px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.wimpro-episode-item:hover {
  background: var(--wimpro-card-hover);
}

.wimpro-episode-item.current {
  border-left: 3px solid var(--wimpro-gold);
}

.wimpro-episode-number {
  font-size: 0.8rem;
  color: var(--wimpro-gray-dark);
  font-weight: 600;
  min-width: 30px;
  padding-top: 2px;
}

.wimpro-episode-thumb {
  width: 120px;
  height: 68px;
  border-radius: var(--wimpro-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.wimpro-episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wimpro-episode-info {
  flex: 1;
}

.wimpro-episode-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.wimpro-episode-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--wimpro-gray);
  margin-bottom: 6px;
}

.wimpro-episode-desc {
  font-size: 0.8rem;
  color: var(--wimpro-gray-light);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Responsive Player
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .wimpro-player-wrapper {
    border-radius: 0;
  }

  .wimpro-player-controls {
    padding: 40px 12px 12px;
  }

  .wimpro-player-btn-play {
    width: 40px;
    height: 40px;
  }

  .wimpro-player-btn {
    width: 36px;
    height: 36px;
  }

  .wimpro-episode-item {
    flex-direction: column;
  }

  .wimpro-episode-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .wimpro-resume-notice {
    width: 90%;
    padding: 24px;
  }
}
