/* ===== Player Area ===== */
.player-area {
  position: relative;
  width: calc(100% + 28px);
  margin: 0 -14px;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.player-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Back Button */
.player-back {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.player-back:active { opacity: 0.5; }

/* Top Info Bar (site name) */
.player-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  z-index: 15;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

/* Controls Bar */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  z-index: 15;
}

.ctrl-btn {
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: #fff;
}
.ctrl-btn:active { opacity: 0.6; }

.ctrl-time {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  flex-shrink: 0;
}

.ctrl-progress {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.ctrl-progress-fill {
  height: 100%;
  background: var(--pink, #FF4D94);
  border-radius: 2px;
  width: 30%;
  position: relative;
}

.ctrl-progress-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.ctrl-speed {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  flex-shrink: 0;
}

/* Play Button Overlay */
.player-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 18;
  transition: transform 0.2s;
}
.player-play-btn:active { transform: translate(-50%, -50%) scale(0.9); }

/* VIP / Coins Overlay */
.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 25;
  padding: 20px;
}

.overlay-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.overlay-desc {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

.overlay-btns {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.overlay-btn {
  padding: 10px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
  outline: none;
}
.overlay-btn:active { transform: scale(0.95); }

.overlay-btn-primary {
  background: linear-gradient(135deg, #FF4D94, #FF7EB3);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,77,148,0.4);
}

.overlay-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

/* ===== Video Info ===== */
.player-info {
  padding-top: 16px;
}

.player-title {
  color: var(--text-primary, #F2F2F2);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  word-break: break-all;
}

/* Tags */
.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.player-tag {
  font-size: 12px;
  color: var(--pink, #FF4D94);
  border: 1px solid rgba(255,77,148,0.35);
  background: rgba(255,77,148,0.08);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s;
}
.player-tag:active {
  background: rgba(255,77,148,0.2);
}

/* Action Bar */
.player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 0;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--text-muted, #6B7280);
  font-size: 13px;
  transition: color 0.2s;
  padding: 6px 0;
}

.action-item svg { flex-shrink: 0; }

.action-item span { white-space: nowrap; }

.action-item:active { opacity: 0.6; }

.action-item.action-active {
  color: var(--pink, #FF4D94);
}

/* ===== Ad Banner ===== */
.player-ad {
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.player-ad img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Divider ===== */
.player-divider {
  height: 1px;
  background: var(--border, rgba(255,255,255,0.06));
  margin: 14px 0 0 0;
}

/* ===== Recommend Section ===== */
.recommend-section {
  margin-top: 18px;
}

.recommend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recommend-title {
  color: var(--text-primary, #F2F2F2);
  font-size: 17px;
  font-weight: 600;
}

.recommend-refresh {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--pink, #FF4D94);
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.recommend-refresh:active { opacity: 0.6; }

.recommend-refresh svg {
  transition: transform 0.4s ease;
}
.recommend-refresh:active svg {
  transform: rotate(180deg);
}

/* DPlayer dark theme overrides */
.dplayer { background: #000 !important; border-radius: 0 !important; }
.dplayer-video-wrap { background: #000; }
#dplayer-wrap { width: 100%; }
#dplayer-wrap .dplayer { width: 100% !important; height: 100% !important; }
.player-video-wrap { position: relative; overflow: visible; }
.player-video-wrap .overlay { position: absolute; inset: 0; z-index: 20; }
.dplayer .dplayer-controller .dplayer-icons .dplayer-icon { color: rgba(255,255,255,0.8); }
.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played { background: #D8B46A !important; }
.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded { background: rgba(216,180,106,0.3); }
.dplayer .dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played .dplayer-thumb { background: #D8B46A !important; }

/* Action button tight spacing */
.player-actions {
  display: flex !important;
  justify-content: space-around !important;
  padding: 12px 8px !important;
  gap: 0 !important;
}
.player-action-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 11px !important;
  padding: 0 !important;
}
.player-action-btn svg {
  width: 22px !important;
  height: 22px !important;
}
.player-action-btn span {
  font-size: 11px !important;
  white-space: nowrap !important;
}

/* Video card badge styling */
.video-card-badge {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.4 !important;
  z-index: 5 !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}
.badge-vip {
  background: linear-gradient(135deg, #FFD666, #FAAD14) !important;
  color: #1a1a1a !important;
  box-shadow: 0 1px 4px rgba(250, 173, 20, 0.5) !important;
}
.badge-free {
  background: rgba(82, 196, 26, 0.85) !important;
  color: #fff !important;
  box-shadow: 0 1px 4px rgba(82, 196, 26, 0.4) !important;
}
.badge-coins {
  background: linear-gradient(135deg, #D8B46A, #B8860B) !important;
  color: #fff !important;
  box-shadow: 0 1px 4px rgba(216, 180, 106, 0.5) !important;
}

/* Cover image loading state */
.video-card-cover {
  background: #1a1a2e;
  overflow: hidden;
}
/* removed: opacity rule was matching parent div not img */

/* Share/Route panel animations */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes heartPop {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}


/* === Mobile DPlayer Controls === */
@media (max-width: 768px) {
  .dplayer-controller {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .dplayer-bar-wrap {
    height: 14px !important;
    touch-action: none;
    cursor: pointer;
  }
  .dplayer-bar {
    height: 4px !important;
  }
  .dplayer-bar-wrap:active .dplayer-bar,
  .dplayer-bar-wrap:hover .dplayer-bar {
    height: 6px !important;
  }
  .dplayer-icons .dplayer-icon {
    min-width: 40px;
    min-height: 40px;
    padding: 8px !important;
  }
  .dplayer-full-icon {
    min-width: 44px;
    min-height: 44px;
  }
  .dplayer-video-wrap {
    touch-action: manipulation;
  }
  .dplayer-controller-mask {
    touch-action: manipulation;
  }
  .dplayer-notice {
    font-size: 13px !important;
    bottom: 60px !important;
  }
  /* Ensure controls show on touch */
  .dplayer-controller {
    opacity: 1 !important;
    transition: opacity 0.2s !important;
  }
  .dplayer-hide-controller .dplayer-controller {
    opacity: 0 !important;
  }
}
