/* /styles/style.css */

/* Переменные темы */
:root {
  --main-bg-color: #222529; /* Тёмный фон страницы */
  --darker-bg-color: #1a1d20; /* Более тёмный фон для хедера */
  --card-bg-color: #282c34; /* Фон для карточек и блоков */
  --accent-color: #ff424f; /* Красный акцентный цвет */
  --text-color: #e9ecef; /* Основной цвет текста */
  --text-secondary: #adb5bd; /* Второстепенный цвет текста */
  --border-color: #343a40; /* Цвет границ */
  --red-line-color: #ff424f; /* Цвет красной линии верхней границы */
  --light-bg-color: #f5f5f5; /* Светлый фон для некоторых элементов */
  --link-hover: #ff6b6b; /* Цвет ссылок при наведении */
}
.anime-description {
    font-size: 1.35rem;
    text-align: justify;
    background-color: rgb(34 37 41);
    padding: 10px 0;
}
.episodes-group-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* Больше колонок для ПК */
  gap: 12px;
  margin-top: 15px;
}

.episodes-group .episode-button, 
.episode-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 5px;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  transition: all 0.2s;
  text-align: center;
  font-size: 15px;
  height: 45px;
}
/* Сброс стилей */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', 'Arial', sans-serif;
  background-color: var(--main-bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--link-hover);
}

/* Хедер */
.header {
  background-color: var(--darker-bg-color);
  padding: 15px 0;
  position: relative;
  border-bottom: 1px solid var(--red-line-color);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

/* Поиск */
.search-form {
  margin-left: auto;
  position: relative;
  width: 300px;
}

.search-input {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: white;
  padding: 8px 15px;
  width: 100%;
  transition: all 0.3s;
}

/* Стили для активной серии (не ссылка) */
.episode-button.active {
  background-color: var(--accent-color);
  color: white;
  cursor: default;
}

/* Стиль для кнопки "Все серии" */
.episode-button.episode-all {
  background-color: var(--border-color);
  font-weight: 500;
}

.episode-button.episode-all:hover {
  background-color: var(--accent-color);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Выпадающий список результатов поиска */
.dropdown {
  position: relative;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.search-results li {
  padding: 0;
  margin: 0;
}

.search-result-item {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: var(--text-color);
  transition: background 0.2s;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: underline;
}

/* Контент */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-title {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 500;
  position: relative;
}

.age-rating {
  color: var(--text-secondary);
  font-size: 24px;
  margin-left: 10px;
}

.arc-title {
  font-size: 18px;
  margin: 10px 0;
  color: var(--accent-color);
}

.season-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0;
}

/* Стили для хлебных крошек */
.breadcrumbs {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--accent-color);
}

.breadcrumbs span {
  margin: 0 8px;
  color: var(--text-secondary);
}

.breadcrumbs span:last-child {
  color: var(--text-color);
  font-weight: 500;
}

/* Плеер и контент */
.player-wrapper {
  background-color: var(--darker-bg-color);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: row-reverse; /* Изменение направления для размещения вкладок справа */
}

.tabs-container {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0;
  width: 180px; /* Ширина боковой панели с вкладками */
  min-width: 180px; /* Минимальная ширина */
}

.tabs-container nav {
  display: flex;
  flex-direction: column; /* Вертикальное расположение кнопок */
  padding: 0;
  height: 100%;
}

.tab-btn {
  background-color: transparent;
  color: var(--text-color);
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0;
  font-weight: 500;
  font-size: 14px;
  border-radius: 0;
  text-align: left; /* Выравнивание текста влево */
}

.tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  background-color: var(--accent-color);
  color: white;
}

/* Стили для различных кнопок */

/* Активные состояния */
.tabs-container nav button.active {
  background-color: var(--accent-color);
}

/* Основной контейнер плеера */
.player-container {
  flex: 1;
  position: relative;
  height: 0;
  padding-bottom: 45%; /* Уменьшенная высота (было 56.25%) */
  width: calc(100% - 180px); /* Ширина с учетом боковой панели */
}

.player-container.hidden {
  display: none;
}

.player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-container {
  height: 100%;
  width: 100%;
}

.player-controls {
  display: flex;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
}

.episode-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.player-selector {
  background-color: var(--card-bg-color);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.player-list {
  list-style: none;
}

.player-list li {
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
}

.player-list li:hover, 
.player-list li.active {
  background-color: var(--accent-color);
}

.player-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 10;
  margin: 0;
  padding: 0;
}

/* Информация о аниме */
.anime-info {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-bottom: 30px;
  background-color: var(--card-bg-color);
  border-radius: 4px;
  padding: 20px;
}

.anime-poster {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.anime-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.anime-details h1 {
  font-size: 24px;
  margin-bottom: 15px;
}

.anime-meta {
  display: grid;
  grid-template-columns: 240px 1fr;
  row-gap: 10px;
  margin-bottom: 20px;
}

.meta-label {
  color: var(--text-secondary);
}

.watch-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 10px 25px;
  border-radius: 4px;
  font-weight: 500;
  margin-top: 15px;
  transition: background 0.3s;
  width: 100%;
  text-align: center;
}

.watch-button:hover {
  background-color: #e63946;
  color: white;
}

.anime-description {
  margin-top: 20px;
  line-height: 1.7;
}

/* Факты */
.facts-section {
  margin-top: 30px;
}

.facts-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.facts-list {
  list-style-position: inside;
  padding-left: 20px;
}

.facts-list li {
  margin-bottom: 10px;
}

/* Комментарии */
.comments-section {
  margin-top: 40px;
  background-color: var(--card-bg-color);
  border-radius: 4px;
  padding: 20px;
}

.comments-title {
  font-size: 20px;
  margin-bottom: 20px;
}

/* Список комментариев */
.comments-list {
  width: 100%;
}

.comment {
  background-color: var(--darker-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  display: flex;
  gap: 15px;
  transition: background 0.3s;
}

.comment:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.comment img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.comment .w-full {
  flex: 1;
}

.comment .font-medium {
  font-weight: 500;
  color: var(--accent-color);
}

.comment .status {
  font-size: 12px;
  transition: color 0.3s;
}

.comment .status[style*="color: rgb(16, 255, 58)"] {
  color: #10ff3a; /* Зеленый для "online" */
}

.comment .text-gray-500 {
  color: var(--text-secondary);
  font-size: 12px;
}

.comment p {
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0;
  word-break: break-word;
}

.comment .flex.items-center.gap-4 {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.comment button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

.comment button:hover {
  color: var(--link-hover);
}

.comment button svg {
  width: 14px;
  height: 14px;
}

.comment button span {
  font-size: 12px;
}

/* Исправление стилей для выбора аватара */
.comment-form-container .avatar-choice img {
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.comment-form-container input[type="radio"]:checked + img {
  border: 2px solid var(--red-line-color);
}

/* Эпизоды */
.season-section {
  margin-bottom: 30px;
}

.episodes-section {
  margin-bottom: 20px;
}

/* Стили для episodes-grid на ПК */
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding: 5px;
}

.episode-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 5px;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 400;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid var(--border-color);
  height: 45px; /* Фиксированная высота для единообразия */
  overflow: hidden;
}

.episode-button:hover {
  background-color: var(--accent-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Стиль для просмотренных эпизодов */
.episode-button.watched {
  position: relative;
}

.episode-button.watched::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 12px;
  color: var(--accent-color);
}

/* Стиль для активного эпизода (текущий просматриваемый) */
.episode-button.active {
  background-color: var(--accent-color);
  color: white;
  font-weight: 500;
  pointer-events: none; /* Нельзя нажать на текущий эпизод */
}

/* Стиль для наведения на просмотренный эпизод */
.episode-button.watched:hover::after {
  color: white;
}

/* Адаптивные настройки для различных размеров экрана */
@media (min-width: 1200px) {
  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

@media (min-width: 1500px) {
  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Если в сезоне более 50 эпизодов, добавляем разделители */
.episodes-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 15px 0;
}

/* Заголовок сезона с красивым оформлением */
.season-section h2.page-title {
  font-size: 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}


/* Фильмы */
.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

/* Рекомендации */
.related-section {
  margin-top: 40px;
}

.related-title {
  font-size: 20px;
  margin-bottom: 20px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.related-item {
  position: relative;
}

.related-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 4px;
  overflow: hidden;
}

.related-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-item:hover .related-poster img {
  transform: scale(1.05);
}

.related-info {
  margin-top: 8px;
}

.related-name {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
}

/* Блок описания */
.description {
  background-color: var(--card-bg-color);
  padding: 25px;
  border-radius: 8px;
  margin-top: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.description .prose {
  line-height: 1.7;
  color: var(--text-color);
}

.description h2 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 20px;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.description h3 {
  font-size: 20px;
  margin: 25px 0 15px;
  color: var(--text-color);
}

.description p {
    margin-bottom: 18px;
    font-size: 16px;
    text-align: justify;
}

.description img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    width: 455px;
    margin: 8px 0px 5px 20px;
    float: right;
    display: block;
}

.description ul, 
.description ol {
  margin-left: 20px;
  margin-bottom: 20px;
}

.description li {
  margin-bottom: 12px;
}

.description strong {
  color: var(--accent-color);
  font-weight: 600;
}

/* Футер */
.footer {
  margin-top: 50px;
  padding: 20px;
  background-color: var(--darker-bg-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-text {
  max-width: 800px;
  margin: 0 auto;
}

/* Кнопка "Наверх" */
.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: var(--accent-color);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 100;
}

.back-to-top:hover {
  background-color: #e63946;
}

/* Анимации */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 3px 10px rgba(255, 66, 79, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 66, 79, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 3px 10px rgba(255, 66, 79, 0.4);
  }
}

/* Адаптив */
@media (max-width: 768px) {
  .anime-info {
    grid-template-columns: 1fr;
  }
  .logo {
    font-size: 40px;}
  .anime-poster {
    max-width: 250px;
    margin: 0 auto;
  }
  
  .search-form {
    width: 200px;
  }
  
  .related-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .player-wrapper {
    flex-direction: column; /* На мобильных вкладки внизу */
  }
  
  .tabs-container {
    width: 100%;
  }
  
  .tabs-container nav {
    flex-direction: row;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    justify-content: flex-start;
  }
  
  .player-container {
    width: 100%;
    padding-bottom: 56.25%; /* Стандартное соотношение для мобильных */
  }
  
  .comment {
    flex-direction: column;
    gap: 10px;
  }
  
  .comment img {
    width: 36px;
    height: 36px;
  }
  
  /* Аккордеон для сезонов */
  .season-section {
    margin-bottom: 20px;
    background: var(--darker-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  
  .season-section h2 {
    margin: 0;
    padding: 15px;
    background: linear-gradient(to right, var(--darker-bg-color), var(--card-bg-color));
    font-size: 18px;
    display: flex;
    align-items: center;
    color: var(--accent-color);
  }
  
  /* Стиль для заголовка группы с красивым градиентом */
  .episodes-group-title {
    margin: 0;
    padding: 12px 15px;
    background: linear-gradient(to right, rgba(255, 66, 79, 0.1), transparent);
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid var(--accent-color);
    transition: all 0.3s;
  }
  
  /* Ховер-эффект для заголовка */
  .episodes-group-title:hover {
    background: linear-gradient(to right, rgba(255, 66, 79, 0.2), transparent);
  }
  
  /* Стиль для активной группы */
  .episodes-group:not(.collapsed) .episodes-group-title {
    background: linear-gradient(to right, rgba(255, 66, 79, 0.25), transparent);
    color: var(--accent-color);
  }
  
  /* Иконка сворачивания с анимацией */
  .episodes-group-title::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    transform: rotate(45deg);
    transition: transform 0.3s;
    margin-right: 5px;
  }
  
  .episodes-group.collapsed .episodes-group-title::after {
    transform: rotate(-135deg);
  }
  
  /* Обертка для эпизодов */
  .episodes-group {
    margin-bottom: 2px;
    overflow: hidden;
  }
  
  /* Сетка для группы эпизодов с красивыми стилями */
  .episodes-group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* По 3 в ряд */
    gap: 8px;
    padding: 15px;
    background: var(--card-bg-color);
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
  }
  
  /* Свернутая группа */
  .episodes-group.collapsed .episodes-group-grid {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
  }
  
  /* Кнопки эпизодов в группе */
  .episodes-group-grid .episode-button {
    padding: 10px 5px;
    font-size: 14px;
    text-align: center;
    background: var(--darker-bg-color);
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .episodes-group-grid .episode-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(255, 66, 79, 0.3);
  }
  
  /* Просмотренные эпизоды */
  .episodes-group-grid .episode-button.watched {
    position: relative;
  }
  
  .episodes-group-grid .episode-button.watched::after {
    content: "✓";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: var(--accent-color);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Стили для полнометражных фильмов */
  .films-section {
    background: var(--darker-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
  }
  
  .films-section h2 {
    margin: 0;
    padding: 15px;
    background: linear-gradient(to right, var(--darker-bg-color), var(--card-bg-color));
    font-size: 18px;
    display: flex;
    align-items: center;
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
  }
  
  .films-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }
  
  .films-grid .episode-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg-color);
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .films-grid .episode-button::after {
  content: "→";
  font-size: 19px;
  opacity: 0.6;
  transition: transform 0.2s;
}

.films-grid .episode-button:hover {
  background: var(--accent-color);
}

.films-grid .episode-button:hover::after {
  transform: translateX(5px);
  opacity: 1;
}

/* Кнопка "наверх" */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 3px 10px rgba(255, 66, 79, 0.4);
  z-index: 100;
  animation: pulse 2s infinite;
}
}

@media (max-width: 576px) {
  /* Переработанный контейнер с небольшим эффектом глубины */
  .anime-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--card-bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  
  /* Создаем стильный заголовок с градиентной подложкой */
  .anime-details h1 {
    text-align: center;
    font-size: 24px;
    margin: 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
  }
  
  /* Создаем карточку для постера с наложением */
  .anime-poster {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    height: 300px;
    overflow: hidden;
  }
  
  .anime-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    filter: brightness(0.85);
  }
  
  /* Эффект при прокрутке */
  .anime-info.scrolled .anime-poster img {
    transform: scale(1.05);
    filter: brightness(0.7);
  }
  
  /* Делаем карточку рейтинга внутри постера */
  .anime-poster::after {
    content: "18+";
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(230, 57, 70, 0.85);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  /* Кнопка поверх постера с эффектом размытия */
  .anime-poster .watch-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 30px;
    background: rgba(255, 66, 79, 0.9);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 3px 15px rgba(255, 66, 79, 0.4);
    transition: all 0.3s;
    border: none;
    color: white;
  }
  
  .anime-poster .watch-button:hover, 
  .anime-poster .watch-button:active {
    background: rgba(255, 66, 79, 1);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 66, 79, 0.6);
  }
  
  /* Детали в формате красивых карточек */
  .anime-details {
    padding: 20px 15px;
    position: relative;
    z-index: 1;
  }
  
  /* Стилизованная сетка метаданных */
  .anime-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 5px;
  }
  
  /* Стилизуем каждую группу метаданных */
  .anime-meta > div:nth-child(odd) {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0;
    font-size: 15px;
  }
  
  .anime-meta > div:nth-child(even) {
        background: rgb(0 0 0 / 26%);
        padding: 8px 12px;
        border-radius: 8px;
        margin-bottom: 5px;
        box-shadow: inset 0 1px 3px rgb(0 0 0 / 90%);
        font-size: 14px;
    }
  
  /* Для рейтингов добавляем особый стиль */
  .anime-meta > div:nth-child(even) span {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    background: var(--card-bg-color);
    border-radius: 15px;
    font-size: 13px;
  }
  
  /* Описание с красивой рамкой */
  .anime-description {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(to bottom, var(--card-bg-color), var(--darker-bg-color));
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
  }
  
  .anime-description::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15px;
    right: 15px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
  }
  
  .anime-description p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
  }
  
  .page-title {
    font-size: 20px;
  }
  
  .episode-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  
  .episode-controls .watch-button {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    font-size: 0; /* Скрываем текст */
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* Кнопка "Предыдущая серия" */
  .episode-controls .watch-button:first-child::before {
    content: "←";
    font-size: 18px;
  }
  
  /* Кнопка "К списку серий" */
  .episode-controls .watch-button:nth-child(2)::before {
    content: "☰";
    font-size: 18px;
  }
  
  /* Кнопка "Следующая серия" */
  .episode-controls .watch-button:last-child::before {
    content: "→";
    font-size: 18px;
  }
  
  /* Добавляем подсказку при долгом нажатии */
  .episode-controls .watch-button:first-child {
    title: "Предыдущая серия";
  }
  
  .episode-controls .watch-button:nth-child(2) {
    title: "К списку серий";
  }
  
  .episode-controls .watch-button:last-child {
    title: "Следующая серия";
  }
  
  .header-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .ava {
    flex-direction: column;
  }
  
  .search-form {
    width: 100%;
    margin: 0;
  }
  
  .search-form .search-input {
    width: 100%;
    text-align: center;
  }
  
  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .description {
    padding: 15px;
  }
  
  .description h2 {
    font-size: 20px;
  }
  
  .description h3 {
    font-size: 18px;
  }
  
  .comment button span.hidden.md\:block {
    display: none;
  }
  
  /* Для сверхмалых экранов */
  @media (max-width: 360px) {
    .episodes-group-grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 5px;
      padding: 10px;
    }
    
    .episodes-group-grid .episode-button {
      padding: 8px 5px;
      font-size: 13px;
    }
    
    .anime-poster {
      height: 240px;
    }
  }
}
@media (min-width: 769px) {
  /* Скрываем заголовки групп и применяем стили только для ПК */
  .episodes-group-title {
    display: none;
  }
  
  /* Добавляем дополнительный зазор между группами эпизодов */
  .episodes-group {
    margin-bottom: 25px;
    position: relative;
  }
  
  /* Добавляем тонкую линию-разделитель после каждой группы */
  .episodes-group::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
  }
  
  /* Последняя группа не нуждается в разделителе */
  .episodes-group:last-child::after {
    display: none;
  }
  
  /* Разворачиваем все группы на ПК */
  .episodes-group.collapsed .episodes-group-grid {
    max-height: none;
    opacity: 1;
  }
  
  /* Сетка эпизодов более компактная для ПК */
  .episodes-group-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
  }
  
  /* На больших экранах уменьшаем отступы */
  @media (min-width: 1200px) {
    .episodes-group-grid {
      grid-template-columns: repeat(8, 1fr);
    }
  }
  
  /* На очень больших экранах */
  @media (min-width: 1500px) {
    .episodes-group-grid {
      grid-template-columns: repeat(10, 1fr);
    }
  }
}

@media (min-width: 769px) {
  /* Скрываем заголовки групп и применяем стили только для ПК */
  .episodes-group-title {
    display: none;
  }
  
  /* Добавляем отступ между группами эпизодов */
  .episodes-group {
    margin-bottom: 30px;
    position: relative;
  }
  
  /* Добавляем тонкую линию-разделитель после каждой группы */
  .episodes-group::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
  }
  
  /* Последняя группа не нуждается в разделителе */
  .episodes-group:last-child::after {
    display: none;
  }
  
  /* Разворачиваем все группы на ПК */
  .episodes-group.collapsed .episodes-group-grid {
    max-height: none;
    opacity: 1;
    padding: 15px;
  }
  
  /* Сетка эпизодов: по 10 элементов в ряд, 2 ряда */
  .episodes-group-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 12px;
    padding: 10px;
  }
  
  /* Кнопки эпизодов */
  .episodes-group-grid .episode-button,
  .episode-button {
    height: 45px;
    border-radius: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Для средних экранов уменьшаем количество колонок */
  @media (min-width: 769px) and (max-width: 1200px) {
    .episodes-group-grid {
      grid-template-columns: repeat(7, 1fr);
      grid-template-rows: repeat(3, auto);
    }
  }
  
  /* Для маленьких десктопных экранов */
  @media (min-width: 769px) and (max-width: 992px) {
    .episodes-group-grid {
      grid-template-columns: repeat(5, 1fr);
      grid-template-rows: repeat(4, auto);
    }
  }
}
.mobilepr {
    padding: 20px;
    background: linear-gradient(1deg, #222529, #282c34);
    text-align: justify;
    line-height: 23px;
    border: 1px solid rgb(255 255 255 / 7%);
    letter-spacing: 0.06em !important;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 14.5px;
    position: relative;
    overflow: hidden;
}


/* Стилизуем названия устройств */
.mobilepr .device-name {
    color: var(--accent-color);
    font-weight: 500;
}

/* Делаем иконки устройств немного больше и с интересным эффектом */
.mobilepr i {
    font-size: 16px;
    margin: 0 3px;
    background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    transform: translateY(2px);
}

/* Анимация для иконок при наведении */
.mobilepr i:hover {
    transform: translateY(0) scale(1.2);
    transition: all 0.2s ease;
}
@media (max-width: 768px) {
  /* Обновление структуры комментариев */
  .comment {
    padding: 12px;
    margin-bottom: 12px;
    background: linear-gradient(to bottom, var(--card-bg-color), var(--darker-bg-color));
    border-radius: 12px;
    border-left: 3px solid var(--accent-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }
  
  /* Улучшение аватара */
  .comment img {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 66, 79, 0.5);
  }
  
  /* Красивое оформление имени пользователя */
  .comment .font-medium {
    font-size: 15px;
    background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
  }
  
  /* Блок с информацией о времени */
  .comment .status, 
  .comment .text-gray-500 {
    font-size: 11px;
    opacity: 0.8;
  }
  
  /* Текст комментария */
  .comment p {
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  /* Компактные кнопки */
  .comment .flex.items-center.gap-4 {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .comment button {
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s ease;
  }
  
  .comment button:hover,
  .comment button:active {
    background-color: rgba(255, 66, 79, 0.2);
  }
  
  /* Увеличиваем иконки */
  .comment button svg {
    width: 16px;
    height: 16px;
  }
  
  /* Выделение для индикаторов онлайн-статуса */
  .comment .status[style*="color: rgb(16, 255, 58)"] {
    color: #4dff4d !important;
    font-weight: 600;
  }
  
  /* Индикатор активного действия пользователя */
  .comment button.active {
    color: var(--accent-color);
  }
  
  /* Вложенные комментарии */
  .comment[data-level="1"],
  .comment[data-level="2"],
  .comment[data-level="3"] {
    border-left-width: 3px;
    background: linear-gradient(to right, rgba(255, 66, 79, 0.1), transparent 15%);
  }
}
.comment.long p {
  max-height: 100px;
  overflow: hidden;
  position: relative;
}

.comment.long p::after {
  content: "Показать полностью";
  position: absolute;
  bottom: 0;
  right: 0;
  color: var(--accent-color);
  background: linear-gradient(to left, var(--darker-bg-color) 70%, transparent);
  padding: 0 10px;
  cursor: pointer;
}

.comment.long.expanded p {
  max-height: none;
}

.comment.long.expanded p::after {
  display: none;
}