.player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-overlay.active {
  opacity: 1;
  visibility: visible;
}

.player-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  user-select: none;
}

.player-container.theater-mode {
  max-width: 1300px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 229, 255, 0.2);
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.8rem 2.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.player-title-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-movie-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.player-movie-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.player-btn-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.player-center-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-cyan);
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 15;
}

.player-center-feedback.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.player-center-feedback svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.player-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary-cyan);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 10;
}

.player-spinner.active {
  opacity: 1;
  visibility: visible;
}

@keyframes spinLoader {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.player-controls-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2.5rem 1.8rem 2.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 65%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.player-controls-wrap.hide-hud,
.player-header.hide-hud {
  opacity: 0;
  pointer-events: none;
}

.player-timeline-container {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-timeline-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: visible;
  transition: height 0.15s ease;
}

.player-timeline-container:hover .player-timeline-bar {
  height: 10px;
}

.player-timeline-buffer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.player-timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-cyan), #38bdf8);
  border-radius: 3px;
  box-shadow: 0 0 12px var(--primary-cyan-glow);
}

.player-timeline-thumb {
  position: absolute;
  top: 50%;
  right: -7px;
  transform: translateY(-50%) scale(0);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.player-timeline-container:hover .player-timeline-thumb {
  transform: translateY(-50%) scale(1);
}

.player-time-tooltip {
  position: absolute;
  bottom: 25px;
  transform: translateX(-50%);
  background: rgba(12, 18, 30, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.player-timeline-container:hover .player-time-tooltip {
  opacity: 1;
}

.player-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-left-controls,
.player-right-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.player-btn-ctrl {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.player-btn-ctrl:hover {
  color: var(--primary-cyan);
  transform: scale(1.1);
}

.player-btn-ctrl svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.player-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-volume-slider {
  width: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  transition: width 0.25s ease;
  overflow: hidden;
}

.player-volume-wrap:hover .player-volume-slider {
  width: 80px;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-cyan);
  cursor: pointer;
  box-shadow: -100px 0 0 100px var(--primary-cyan);
}

.player-time-display {
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.player-dropdown-menu {
  position: relative;
}

.player-menu-popover {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  background: rgba(12, 18, 30, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  min-width: 170px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
}

.player-menu-popover.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.player-menu-item {
  width: 100%;
  padding: 0.6rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.player-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.player-menu-item.active {
  color: var(--primary-cyan);
  font-weight: 700;
}

.player-menu-item.active::after {
  content: '✓';
  color: var(--primary-cyan);
  font-weight: 900;
}
