body, html {
  margin: 0;
  padding: 0;
  background: var(--background-color);
  color: var(--text-color);
  font-family: 'Segoe UI', Arial, sans-serif;
}
.watch-app {
  display: flex;
  /* use dynamic viewport to avoid foldable/notch seams */
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
}
.watch-sidebar {
  width: 220px;
  background: var(--cards, #141420);
  padding: 20px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
}
.watch-main {
  flex: 1;
  padding: 24px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.player-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: var(--cards, #22223a);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 12px #000a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-player {
  width: 100%;
  height: 100%;
  border: none;
  background: #111;
}
.server-bar {
  display: flex;
  gap: 12px;
  margin: 0 0 10px 0;
}
.server-bar button {
  background: var(--cards, #23234a);
  color: var(--text-color, #111);
  border: none;
  border-radius: 5px;
  padding: 6px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.12s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.server-bar button:hover,
.server-bar button:focus,
.server-bar button.active {
  background: var(--accent, #ffd54f);
  color: var(--accent-contrast, #181818);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  transform: translateY(-1px);
}
.server-bar button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,213,79,0.45), 0 4px 12px rgba(0,0,0,0.22);
}
.episode-status {
  background: var(--cards, #23234a);
  color: var(--accent, #ffd54f);
  padding: 8px 16px;
  border-radius: 7px;
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.show-info {
  margin-top: 12px;
  background: var(--cards, #202040);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.show-info-row {
  display: flex;
  gap: 20px;
}
.show-poster {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  background: #333;
}
.show-meta {
  flex: 1;
}
.show-meta h2 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
}
.show-genres {
  margin-bottom: 7px;
}
.genre-chip {
  display: inline-block;
  background: var(--chip-bg, #2f2f5d);
  color: var(--accent, #ffd54f);
  border-radius: 5px;
  padding: 2px 10px;
  margin-right: 5px;
  font-size: 0.95rem;
}
.show-desc {
  color: var(--muted-text, #e0e0e0);
  line-height: 1.5;
}
.ep-btn {
  background: var(--cards, #252555);
  color: var(--text-color, #111);
  border: none;
  border-radius: 5px;
  margin: 4px 4px 0 0;
  padding: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.12s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.ep-btn.active,
.ep-btn:hover,
.ep-btn:focus {
  background: var(--accent, #ffd54f);
  color: var(--accent-contrast, #181818);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  transform: translateY(-1px);
}
.ep-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,213,79,0.45), 0 4px 12px rgba(0,0,0,0.22);
}
select {
  background: var(--cards, #23234a);
  color: var(--text-color, #fff);
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  margin-bottom: 10px;
  font-size: 1rem;
}
.no-server {
  color: #ff5252;
  font-size: 1.2rem;
  text-align: center;
  margin: 30px 0;
}
.error {
  color: #ff5252;
  font-size: 1.3rem;
  text-align: center;
  margin: 40px 0;
}

/* ===== Responsive: Tablets & Phones ===== */
@media (max-width: 1200px) {
  .player-container { max-width: 1000px; }
}

@media (max-width: 992px) {
  .watch-main { padding: 20px; }
  .player-container { max-width: 100%; }
  .show-info-row { gap: 16px; }
  .show-meta h2 { font-size: 1.4rem; }
}

@media (max-width: 768px) {
  .watch-app { flex-direction: column; }
  .watch-sidebar { width: 100%; min-height: auto; padding: 12px 14px; }
  .watch-main { padding: 16px; gap: 14px; }
  .player-container { border-radius: 8px; }
  .server-bar { flex-wrap: wrap; gap: 8px; }
  .server-bar button { padding: 6px 12px; font-size: 0.95rem; }
  .episode-status { font-size: 1rem; padding: 8px 12px; }
  .show-info { padding: 16px; border-radius: 8px; }
  .show-info-row { flex-direction: column; }
  .show-poster { width: 110px; height: 165px; }
  .genre-chip { font-size: 0.9rem; }
}

@media (max-width: 600px) {
  .watch-main { padding: 12px; gap: 12px; }
  .player-container { box-shadow: 0 2px 8px #0009; }
  .server-bar { gap: 6px; }
  .server-bar button { padding: 6px 10px; font-size: 0.92rem; }
  .show-meta h2 { font-size: 1.2rem; }
  .show-desc { font-size: 0.98rem; }
  .ep-btn { width: 34px; height: 34px; font-size: 0.95rem; }
}

@media (max-width: 420px) {
  .watch-main { padding: 10px; }
  .server-bar button { padding: 5px 10px; font-size: 0.9rem; }
  .show-poster { width: 96px; height: 144px; }
  .genre-chip { font-size: 0.86rem; }
}
