/* Watch View & Player Styles - Masterpiece Light/Dark Adaptable */
.player-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Video Player Container */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  border: 1px solid var(--border-subtle);
}

.video-container video,
.video-container iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: none;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.iqiyi-official-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 220, 90, 0.35);
  border-radius: var(--radius-lg);
  color: #00dc5a;
  background: rgba(0, 220, 90, 0.08);
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.iqiyi-official-link:hover {
  background: rgba(0, 220, 90, 0.18);
  border-color: #00dc5a;
  transform: translateY(-1px);
}

.player-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3.5px solid rgba(245, 158, 11, 0.25);
  border-top-color: var(--gold-secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Watch Info & Titles */
.watch-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.watch-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.watch-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.watch-title-km {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.watch-title-zh {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Meta Badges Row */
.watch-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-badge {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.ep-badge {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.status-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

.platform-badge {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-fav-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.btn-fav-round.active {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
}

.btn-fav-round.active svg {
  fill: #ef4444;
  stroke: #ef4444;
}

/* Hero Download Button */
.btn-download-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  background: var(--gold-gradient);
  color: #000;
  font-family: var(--font-khmer);
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.3);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
}

.btn-download-hero:active {
  transform: scale(0.98);
}

.btn-download-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-khmer);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-download-poster:hover {
  border-color: var(--gold-primary);
  color: var(--gold-secondary);
}

.btn-download-poster:active {
  transform: scale(0.98);
}

.dl-icon {
  width: 20px;
  height: 20px;
  color: #000;
}

/* Episode Selector Header */
.episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.episodes-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.episodes-header span {
  font-size: 12.5px;
  color: var(--gold-primary);
  font-weight: 700;
}

.episode-button-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  padding: 2px 2px 2px 0;
}

.ep-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}

.ep-btn:hover {
  border-color: var(--gold-secondary);
}

.ep-btn.active {
  background: var(--gold-gradient);
  color: #000;
  border-color: var(--gold-primary);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}

.ep-btn.locked {
  opacity: 0.6;
}

.ep-lock-icon {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 10px;
  height: 10px;
  color: var(--gold-primary);
}

/* Quality Selector */
.quality-selector-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.quality-label {
  font-size: 13px;
  color: var(--text-muted);
}

.quality-buttons {
  display: flex;
  gap: 8px;
}

.quality-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.quality-btn.active {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.vip-small-badge {
  background: var(--gold-gradient);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ==========================================================================
   Donghua Server Selector Pills (Sleek Minimalist Luxury)
   ========================================================================== */
.player-server-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.server-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.player-server-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.player-server-list::-webkit-scrollbar {
  display: none;
}

.server-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.server-pill-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--text-primary);
}

.server-pill-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.3) 100%);
  border-color: var(--gold-primary);
  color: var(--gold-secondary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.meta-badge.sub-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
