body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #12131e;
  color: #e0e0e0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 980px;
  margin: 20px auto;
  padding: 0 15px;
}

/* Баннер */
.anime-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.08);
  margin-bottom: 40px;
}

.anime-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 19, 30, 0.9), rgba(0, 0, 0, 0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #ffe600;
  box-sizing: border-box;
}

.banner-overlay h1 {
  margin: 0 0 8px 0;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.banner-overlay h2 {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* Информационная строка под баннером */
.info-line {
  font-size: 0.875rem;
  color: #b0b3b8;
  margin-top: 1rem;
  padding: 0 10px;
  user-select: none;
}

/* Описание серии */
.episode-description {
  background-color: #2c2f43;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  padding: 20px 25px;
  margin-top: 1.5rem;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0;
  line-height: 1.6;
}

.episode-description h1,
.episode-description h2,
.episode-description h3 {
  color: #fefefe;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.episode-description h1 {
  font-size: 2rem;
}

.episode-description h2 {
  font-size: 1.5rem;
}

.episode-description h3 {
  font-size: 1.25rem;
}

.episode-description p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Хедер описания */
.episode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.episode-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffe600;
  margin: 0;
  user-select: none;
}

/* Кнопка "Смотреть Онлайн" */
.watch-button {
  background-color: #ffe600;
  color: #12131e;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  user-select: none;
  white-space: nowrap;
}

.watch-button:hover,
.watch-button:focus {
  background-color: #ffea00;
}

/* Навигация по сериям */
.episode-nav {
  display: flex;
  justify-content: space-between; /* одна слева, другая справа */
  margin-top: 1.5rem;
  padding: 0 1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
  flex-wrap: nowrap; /* запрет переноса */
}

.episode-nav a {
  color: #facc15;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.episode-nav a:hover,
.episode-nav a:focus {
  color: #fde047;
  background-color: rgba(250, 204, 21, 0.15);
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
  transform: translateY(-2px);
  outline: none;
}

/* Убираем адаптацию в колонку — чтобы ссылки не становились вертикальными */
@media (max-width: 480px) {
  .episode-nav {
    flex-wrap: nowrap; /* всегда в одну строку */
  }

  .episode-nav a {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
}

/* Адаптив */
@media (max-width: 480px) {
  .anime-banner {
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: none;
  }
  .banner-overlay {
    padding: 12px 14px;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .banner-overlay h1 {
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: none;
  }
  .banner-overlay h2 {
    font-size: 1rem;
  }
  .info-line {
    font-size: 0.75rem;
    padding: 0 12px;
  }
  .episode-description {
    padding: 15px 18px;
    font-size: 0.9rem;
    line-height: 1.4;
  }
  .episode-header {
    flex-direction: column;
    gap: 20px;
padding: 20px 20px;
  }
  .episode-header h1 {
    font-size: 1.6rem;
    text-align: center;
  }
  .watch-button {
    padding: 8px 18px;
    font-size: 0.9rem;
    border-radius: 4px;
  }
  .episode-nav {
flex-direction: row;
    gap: 10px;
    padding: 0 12px;
  }
  .episode-nav a {
    font-size: 0.9rem;
  }
}
.all-episodes {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  background-color: #1a1b23;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  font-family: 'Segoe UI', sans-serif;
}

.all-episodes h2 {
  font-size: 1.5rem; /* text-xl */
  font-weight: 700;  /* font-bold */
  margin-bottom: 0.5rem; /* mb-2 */
  color: #fef08a; /* желтоватый */
  text-align: center;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* Сетка для списка серий */
.all-episodes ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0;
  list-style: none;
  margin: 0;
}

/* На ширине от 768px (md) — 4 колонки */
@media (min-width: 768px) {
  .all-episodes ul {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Стили для элементов списка */
.all-episodes li a {
  display: block;
  padding: 12px 0;
  background-color: #2d2e3a;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
  color: #f1f5f9;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

/* Эффект при наведении */
.all-episodes li a:hover {
  color: #facc15;
  background-color: #3b3c4f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

/* Стили для активной ссылки (текущей серии) */
.text-yellow-400 {
  color: #facc15 !important;
}

.font-bold {
  font-weight: 700 !important;
}

.underline {
  text-decoration: underline !important;
}
      footer {
        background: #1a1b27;
        padding: 20px 0;
        text-align: center;
        color: #ffffff;
        font-size: 16px;
        margin-top: 40px;
    }
          footer a {
        color: #ff9a9a;
        text-decoration: none;
        font-weight: 700;
        transition: .3s;
    }
      /* Адаптив для мобильных устройств */
  @media (max-width: 480px) {
    header.episode-header {
      padding: 0 10px !important;
      gap: 8px !important;
    }
    header.episode-header h1 {
      flex-basis: 100% !important;
      font-size: 1.1rem !important;
    }
    header.episode-header a.watch-button {
      font-size: 0.9rem !important;
      padding: 8px 18px !important;
      flex-basis: 100% !important;
      text-align: center !important;
      display: block !important;
    }
  }