/* Layout container for main content */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

/* Poster and metadata row */
.poster-meta {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex: 2;
}

.poster-meta img {
  width: 160px;
  border-radius: 8px;
  flex-shrink: 0;
}

.meta-text h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.meta-text p {
  margin: 0.3rem 0;
  line-height: 1.5;
}

/* Right control panel for TV features */
.right-panel {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.right-panel select,
.right-panel input,
.right-panel button {
  font-size: 1rem;
  padding: 0.4rem;
  margin: 0.3rem 0;
  border-radius: 5px;
  border: none;
}

.right-panel button,
.right-panel input[type="button"] {
  background-color: #1db954;
  color: white;
  cursor: pointer;
}

.right-panel button:hover,
.right-panel input[type="button"]:hover {
  background-color: #1ed760;
}

#episodes label {
  display: block;
  margin: 0.3rem 0;
  cursor: pointer;
}

/* Iframe/video player */
#iframe_div {
  margin-top: 2rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 8px;
  overflow: hidden;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Flash messages */
.success {
  color: #1db954;
}
.error {
  color: #ff4c4c;
}

.scroll-wrapper {
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  transform: translateZ(0); /* Forces hardware acceleration */
}

#episodes {
  padding-right: 0.5rem;
  margin-top: 0.5rem;
  border: 1px solid #333;
  border-radius: 5px;
  background-color: #1e1e1e;
}