/* ==================== PLAYERS - MIDNIGHT GLASS ==================== */

.box-player {
  padding: 120px 20px 60px;
  max-width: 1500px;
  margin: 0 auto;
}

.container-player {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  margin-bottom: 50px;
  animation: modalPopIn 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Movie/Series Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.info-poster {
  width: 100%;
}

.info-poster img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.info-poster img:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 210, 255, 0.15);
}

.info-content h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(0, 210, 255, 0.4);
  line-height: 1.1;
}

.info-content p {
  margin-bottom: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

.info-content strong {
  color: #fff;
  font-weight: 600;
  margin-right: 5px;
}

.rating-badge {
  color: #fbbf24;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(251, 191, 36, 0.1);
  padding: 5px 12px;
  border-radius: 50px;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Trailer Button */
.btn-trailer {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-normal);
  margin-top: 10px;
}

.btn-trailer:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  border-color: #fff;
}

/* Video Player Container */
.player-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow var(--transition-normal);
}

.player-wrapper:hover {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 210, 255, 0.3);
}

.player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video & Sidebar Layout */
.video-sidebar-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  margin-bottom: 40px;
}

.player-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.player-sidebar .ad-slot {
  margin: 0;
  min-height: 250px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 1100px) {
  .video-sidebar-container {
    grid-template-columns: 1fr;
  }

  .player-sidebar {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Server Selection */
.server-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.server-btn {
  padding: 12px 25px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.server-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.server-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

/* Season & Episode Styling (Series) */
.series-nav-title {
  font-size: 1.8rem;
  color: #fff;
  margin: 40px 0 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.series-nav-title:before {
  content: '';
  display: block;
  width: 6px;
  height: 24px;
  background: var(--primary);
  border-radius: 20px;
  box-shadow: 0 0 10px var(--primary);
}

.seasons-list {
  display: flex;
  gap: 12px;
  list-style: none;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 15px;
}

.season-tab {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-weight: 600;
  color: var(--text-secondary);
}

.season-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.season-tab.active-season {
  background: rgba(0, 210, 255, 0.15);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.episode-item {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.episode-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.episode-item.active-episode {
  background: var(--primary);
  color: #000;
  font-weight: 700;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 210, 255, 0.3);
  border-color: var(--primary);
}

/* Suggestions Branding */
.main-suggestions {
  margin-top: 80px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.main-suggestions h3 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 800;
}

.main-suggestions h3::before {
  content: "";
  display: block;
  width: 6px;
  height: 30px;
  background: var(--primary);
  border-radius: 4px;
  box-shadow: 0 0 15px var(--primary);
}

#suggestions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .info-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .info-content h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  .box-player {
    padding: 100px 15px 30px;
  }

  .container-player {
    padding: 20px;
    border-radius: 16px;
  }

  .info-content h1 {
    font-size: 1.8rem;
  }

  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .main-suggestions {
    padding: 20px;
  }

  #suggestions {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }
}

/* Trailer Modal */
.trailer-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.trailer-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 210, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close-modal {
  position: absolute;
  top: -50px;
  right: -20px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  transition: all 0.2s;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.close-modal:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .close-modal {
    top: 10px;
    right: 10px;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
  }
}