/* --- Episode toolbar: right-justified as a group --- */
#MainBody .episode-toolbar {
  max-width: 500px;
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: center;
  gap: 10px;
  background: #380000;
  border: 1px solid #990000;
  border-radius: 8px;
  padding: 10px;
  margin: 0 auto 16px;       /* keep equal top/bottom rhythm */
  text-align: center;
}

/* Keep form inline, centered items with spacing */
#MainBody .episode-toolbar .ep-jump {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Select matches theme */
#MainBody .episode-toolbar select {
  appearance: none;
  background: #4A0000;
  color: #C0C0C0;
  border: 1px solid #990000;
  border-radius: 6px;
  padding: 8px 10px;
  font: 0.95rem/1.2 Arial, Helvetica, sans-serif;
}

@media (max-width:700px) {
  #MainBody .episode-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  #MainBody .episode-toolbar .ep-jump { width: 100%; }
  #MainBody .episode-toolbar .ep-prev,
  #MainBody .episode-toolbar .ep-next,
  #MainBody .episode-toolbar select { width: 100%; }
}

/* Episode info table — matches site frame */
#MainBody .ep-info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #380000;
  color: var(--color-text);
  border: 1px solid #990000;
  border-radius: 8px;
  overflow: hidden;                            /* rounds the outer corners */
  table-layout: fixed;                         /* clean wrapping */
  font: 1rem/1.5 Arial, Helvetica, sans-serif; /* match Index page */
}

/* Header */
#MainBody .ep-info-table thead th {
  text-align: center;
  padding: 10px 12px;
  background: linear-gradient(#5a0000, #380000);
  color: #FFD9B3;
  font-weight: bold;
  border-bottom: 1px solid #660000;
}

/* Body cells */
#MainBody .ep-info-table td {
  background: #3A0000;
  text-align: center;                          /* center by default */
  vertical-align: top;
  padding: 12px;
  border-top: 1px solid #660000;
  word-wrap: break-word;
}

/* --- Episode navigation buttons (Prev / Next) --- */
.episode-toolbar button.ep-prev,
.episode-toolbar button.ep-next {
  background-color: #4A0000;
  color: #C0C0C0;
  border: 1px solid #660000;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.episode-toolbar button.ep-prev:hover,
.episode-toolbar button.ep-next:hover {
  background-color: #990000; /* ensure inside color changes */
  color: #FFFFFF;
  box-shadow: inset 0 0 6px rgba(255, 100, 100, 0.6), 0 0 8px rgba(255, 255, 255, 0.4);
}

.episode-toolbar button.ep-prev:focus-visible,
.episode-toolbar button.ep-next:focus-visible {
  outline: 2px solid #FFD9B3;
  outline-offset: 2px;
}

/* Synopsis row overrides (left-aligned text) */
#MainBody .ep-info-table .synopsis-row td {
  text-align: left;
  background: #320000;                         /* subtle band to separate */
}
#MainBody .ep-info-table .synopsis-row h4 {
  margin: 0 0 6px;
  color: #FFD9B3;
  font: bold 1.1rem/1.2 Arial, Helvetica, sans-serif;
}

#MainBody .ep-info-table td p {
  margin: 0;
}

#MainBody .ep-info-table .synopsis-row p + p {
  margin-top: 14px;
}

/* Icons beside headers */
#MainBody .ep-info-table thead .icon {
  font-size: 1.1rem;
  margin-right: 6px;
  vertical-align: middle;
  color: #FFD9B3; /* warm tone matching header text */
}

/* Mobile tweaks */
@media (max-width:700px) {
  #MainBody .ep-info-table {
    font-size: 0.95rem;
  }
  #MainBody .ep-info-table thead th,
  #MainBody .ep-info-table td {
    padding: 10px;
  }
}

/* --- Episode auxiliary buttons --- */
.episode-aux {
  text-align: center;
  margin-top: 30px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
}

/* Base button style */
.episode-aux .ep-btn {
  display: inline-block;
  background: #3A0000;                 /* slightly darker red than main nav */
  color: #C0C0C0;
  text-decoration: none;
  padding: 10px 22px;
  border: 1px solid #660000;
  border-radius: 6px;                  /* subtle rounding */
  transition: all 0.3s ease;
  box-shadow: 0 0 6px rgba(0,0,0,0.4); /* faint ambient shadow */
}

/* Hover / focus glow */
.episode-aux .ep-btn:hover,
.episode-aux .ep-btn:focus {
  background: #990000;
  color: #FFFFFF;
  text-decoration: underline;
  box-shadow: 0 0 10px rgba(255, 200, 150, 0.35); /* faint cinematic glow */
}

/* Separator styling */
.episode-aux .sep {
  display: inline-block;
  color: #C0C0C0;
  margin: 0 12px;
  font-weight: normal;
  vertical-align: middle;
}

/* Mobile adjustments */
@media (max-width:700px) {
  .episode-aux {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .episode-aux .sep {
    display: none; /* remove pipes on mobile */
  }
  .episode-aux .ep-btn {
    width: 80%;
    text-align: center;
  }
}
.ep-title {
  text-align: center;
  margin: 20px 0;
}

.ep-title img {
  display: inline-block;
  border: none;
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
