/* ShortDrama.in - Vertical 9:16 Reel Player Styles */

.player-viewport-container {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 500;
}

/* Ambient dynamic background glow for desktop */
.player-ambient-backdrop {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(0.25);
  opacity: 0.8;
  transform: scale(1.1);
  pointer-events: none;
}

/* The 9:16 Vertical Reel Player Box */
.vertical-player-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 460px;
  max-height: 860px;
  background: #050508;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(245, 158, 11, 0.15);
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .vertical-player-frame {
    height: 94vh;
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.12);
  }
}

/* Video Element */
.reel-video-element {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  z-index: 1;
}

/* Overlay Top Bar */
.player-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  z-index: 10;
}

.player-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.player-btn-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.player-drama-meta {
  display: flex;
  flex-direction: column;
}

.player-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.player-episode-badge {
  font-size: 11px;
  color: var(--gold-light);
  font-weight: 600;
}

.player-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-vip-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--gold-gradient);
  color: #000;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  transition: var(--transition);
}
.player-vip-badge-btn:hover {
  transform: scale(1.05);
}

/* Right-side Action Column (TikTok/DramaBox Style) */
.player-side-actions {
  position: absolute;
  right: 12px;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.side-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  transition: var(--transition);
}

.side-action-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}

.side-action-btn:hover .side-action-icon-wrap {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.side-action-btn.liked .side-action-icon-wrap {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.side-action-label {
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

/* Central Play/Pause Tap Area & Gesture Feedback */
.player-tap-zone {
  position: absolute;
  inset: 60px 0 100px 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.center-play-indicator {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--gold-glow);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.center-play-indicator.visible {
  opacity: 1;
  transform: scale(1);
}

/* Bottom Controls Bar */
.player-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 14px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-timeline-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.player-progress-bar {
  position: relative;
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: height 0.15s ease;
}

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

.player-progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gold-gradient);
  border-radius: 2px;
}

.player-time-display {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

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

.episode-switch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}

.episode-switch-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.episode-switch-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Paywall Lock Screen in Player */
.player-paywall-screen {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.player-paywall-screen.active {
  display: flex;
}

.paywall-lock-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.4);
  margin-bottom: 18px;
  animation: pulseGold 2s infinite;
}

.paywall-headline {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.paywall-subheadline {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 320px;
  margin-bottom: 24px;
}

.paywall-btn-unlock {
  width: 100%;
  max-width: 320px;
  padding: 15px;
  border-radius: var(--radius-full);
  background: var(--gold-gradient);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--gold-glow);
  transition: var(--transition);
}

.paywall-btn-unlock:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.7);
}

.paywall-watch-free-btn {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition);
}
.paywall-watch-free-btn:hover {
  color: #fff;
}

/* Episode Drawer (Bottom Slide-Up Sheet) */
.episodes-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 30;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.episodes-drawer-backdrop.active {
  display: block;
  opacity: 1;
}

.episodes-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 70%;
  background: #11111a;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--border-active);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  z-index: 35;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.episodes-drawer.open {
  transform: translateY(0);
}

.drawer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-list {
  padding: 14px 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
}

.drawer-episode-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-episode-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.drawer-episode-item.active {
  border-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.drawer-episode-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.drawer-episode-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
}

.drawer-episode-badge.free {
  color: #4ade80;
}

.drawer-episode-badge.locked {
  color: var(--gold-light);
}

@keyframes pulseGold {
  0%, 100% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 45px rgba(245, 158, 11, 0.6);
    transform: scale(1.05);
  }
}
