:root {
  --bg: #0b0d12;
  --bg2: #0f1320;
  --panel: #121725;
  --border: #1b2133;
  --text: #e6e9ef;
  --muted: #a5adcb;
  --primary: #3b82f6;
  --hover: #2f68ff;
  --radius: 14px;
}

/* === Общий стиль === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, Arial, sans-serif;
}

/* === Шапка === */
.mx-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  animation: fadeDown 0.6s ease;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mx-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.2s, transform 0.2s;
}

.brand:hover {
  color: var(--primary);
  transform: scale(1.05);
}

.nav__link {
  color: var(--text);
  opacity: 0.9;
  margin-right: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--primary);
}

/* === Контейнеры === */
.mx-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.mx-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 16px;
  margin-top: 40px;
  color: var(--muted);
}

.mx-title {
  font-size: 28px;
  margin: 6px 0 16px;
}

.mx-subtitle {
  font-size: 20px;
  margin: 24px 0 12px;
}

/* === Каталог / Манга === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.tile__cover img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.tile__info {
  padding: 10px 12px;
}

.tile__title a {
  text-decoration: none;
  color: #aab4ff;
  /* можешь поменять на нужный оттенок */
  transition: color 0.3s ease;
}
.tile__title a:hover {
  color: #5c7aff;
  text-shadow: 0 0 10px rgba(92, 122, 255, 0.5);
}

.tile__meta {
  color: var(--muted);
  font-size: 13px;
}

/* === Кнопки в стиле MangaDex === */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

/* Основная синяя кнопка */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--hover));
  color: #fff;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--hover), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.45);
}

/* Прозрачная (войти, выйти, профиль) */
.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-2px);
}

/* === Выпадающее меню профиля === */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #e5e7eb;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.dropdown-toggle:hover {
  color: var(--primary);
}

.user-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.chevron {
  transition: transform 0.2s ease;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 120%;
  background-color: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-width: 150px;
  display: none;
  flex-direction: column;
  padding: 0.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

.dropdown-menu a {
  color: #d1d5db;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: block;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Контент / ридер / адаптив === */
.details,
.reader__content,
.reader__sidebar-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.details__cover {
  width: 220px;
  height: 310px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.reader {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.reader__sidebar {
  position: sticky;
  top: 70px;
  height: calc(100vh - 80px);
}

.reader__sidebar-inner {
  padding: 12px;
  height: 100%;
  overflow: auto;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-link.is-active {
  border-color: var(--hover);
  background: rgba(59, 130, 246, 0.12);
}

@media (max-width: 900px) {
  .reader {
    grid-template-columns: 1fr;
  }

  .reader__sidebar {
    position: relative;
    height: auto;
  }
}

/* === Страница тайтла (детали манги) === */
.details {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-top: 20px;
}

.details__cover {
  width: 260px;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.details__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.details__info h2 {
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.details__meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.details__desc {
  color: var(--text);
  opacity: 0.95;
  line-height: 1.5;
}

.btn--continue {
  display: inline-block;
  text-align: center;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}

.btn--continue:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
}

/* === Список глав === */
.chapters {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapters__item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.chapters__item:hover {
  background: rgba(59, 130, 246, 0.08);
  transform: translateX(4px);
}

.chapters__link {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.chapters__link:hover {
  color: var(--primary);
}

/* === Адаптивность для мобильных === */
@media (max-width: 768px) {
  .details {
    flex-direction: column;
    align-items: center;
  }

  .details__cover {
    width: 80%;
    height: auto;
  }

  .details__info {
    text-align: center;
    align-items: center;
  }
}

.details__cover-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn--continue {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 10px 0;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.btn--continue:hover {
  background: var(--hover);
  transform: translateY(-1px);
}

.details__cover-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 260px;
  /* чтобы ширина совпадала с обложкой */
}

/* === Меню жанров в шапке === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  min-width: 160px;
  padding: 8px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 999;
  animation: fadeIn 0.15s ease;
}

.dropdown-menu a {
  color: var(--text);
  padding: 8px 14px;
  display: block;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

/* Мягкая анимация */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.profile-bio {
  margin-top: 20px;
}

.profile-bio h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

/* === Отдельный блок избранного === */
.favorites-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 40px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.favorites-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

/* Сетка карточек как в каталоге */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

/* Карточки */
.favorites-grid .tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.favorites-grid .tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.favorites-grid .tile__cover img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.favorites-grid .tile__info {
  padding: 10px 12px;
}

.favorites-grid .tile__title {
  font-size: 16px;
  font-weight: 600;
}

.favorites-grid .tile__meta {
  color: var(--muted);
  font-size: 13px;
}

/* === Теги жанров под автором === */
.details__genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

/* === Теги жанров под автором (кликабельные) === */
.details__genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--hover);
  color: var(--primary);
  transform: translateY(-1px);
}

/* === Страница чтения манги === */
.reader__pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.reader-page {
  max-width: 100%;
  width: 900px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1000px) {
  .reader-page {
    width: 95%;
  }
} 

/* === Поиск === */
.search-container {
  position: relative;
  display: inline-block;
}

.btn-search {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 10px;
  transition: color 0.2s;
}

.btn-search:hover {
  color: var(--primary);
}

.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
  z-index: 1000;
}

.search-box {
  display: flex;
  background: var(--panel);
  border-radius: 10px;
  padding: 10px;
  gap: 10px;
  width: 500px;
  border: 1px solid var(--border);
}

#search-input {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

#close-search {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}

.search-results {
  margin-top: 10px;
  width: 500px;
  background: var(--panel);
  border-radius: 10px;
  overflow-y: auto;
  max-height: 400px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-item img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

/* === LIVE SEARCH под строкой === */
.search-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  z-index: 1000;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#search-input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

#search-input:focus {
  outline: 2px solid var(--primary);
}

#close-search {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-y: auto;
  max-height: 400px;
  display: none;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.2s ease;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.search-item img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.search-item div {
  display: flex;
  flex-direction: column;
}

.search-item strong {
  font-size: 1rem;
  color: var(--text);
}

.search-item small {
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Поиск (стиль MangaLib-подобный) === */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.is-visible {
  display: flex;
  opacity: 1;
}

.search-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  width: 600px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.25s ease;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
}

.search-close {
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-close:hover {
  color: var(--primary);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 600px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
}

.search-item img {
  width: 45px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.search-item:hover {
  background: rgba(59, 130, 246, 0.12);
}

.no-results {
  padding: 12px;
  text-align: center;
  color: var(--muted);
}

@keyframes slideDown {
  from {
    transform: translateY(-15px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* === Поиск (стиль MangaLib-подобный) === */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 120px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-overlay.is-visible {
  display: flex;
  opacity: 1;
}

.search-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  width: 600px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.25s ease;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
}

.search-close {
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-close:hover {
  color: var(--primary);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 600px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
}

.search-item img {
  width: 45px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.search-item:hover {
  background: rgba(59, 130, 246, 0.12);
}

.no-results {
  padding: 12px;
  text-align: center;
  color: var(--muted);
}

@keyframes slideDown {
  from {
    transform: translateY(-15px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3a6df0;
  box-shadow: 0 0 6px rgba(58, 109, 240, 0.5);
  vertical-align: middle;
}

/* === 🌐 ГЛОБАЛЬНЫЕ НАСТРОЙКИ === */
@media (max-width: 768px) {
  :root {
    --radius: 10px;
  }

  body {
    font-size: 15px;
    margin: 0;
    padding: 0 10px;
    overflow-x: hidden;
  }

  .mx-container {
    padding: 10px;
  }

  /* --- Шапка --- */
  .mx-header__inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    font-size: 1.5rem;
  }

  .nav__link {
    margin: 0 6px;
    font-size: 0.95rem;
  }

  /* Кнопки профиля и жанров */
  .dropdown-menu {
    position: static;
    width: 100%;
    border-radius: 10px;
    box-shadow: none;
  }

  .dropdown-toggle {
    font-size: 0.95rem;
  }

  /* Кнопки */
  .btn,
  .btn-primary,
  .btn--ghost {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
  }

  /* --- Каталог манги --- */
  .grid,
  .manga-grid,
  .favorites-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }

  .tile {
    border-radius: var(--radius);
    overflow: hidden;
  }

  .tile__cover img {
    height: 230px;
  }

  .tile__title {
    font-size: 0.95rem;
    text-align: center;
  }

  .tile__meta {
    text-align: center;
    font-size: 0.8rem;
  }

  /* --- Детали манги --- */
  .details {
    flex-direction: column;
    align-items: center;
    padding: 16px;
  }

  .details__cover {
    width: 80%;
    max-width: 250px;
    height: auto;
  }

  .details__info {
    text-align: center;
    margin-top: 14px;
  }

  .details__info h2 {
    font-size: 1.4rem;
  }

  .details__meta {
    font-size: 0.9rem;
  }

  .details__desc {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .details__genres {
    justify-content: center;
  }

  /* --- Список глав --- */
  .chapters {
    gap: 6px;
  }

  .chapters__item {
    font-size: 0.95rem;
  }

  /* --- Читалка --- */
  .reader {
    grid-template-columns: 1fr;
  }

  .reader__pages {
    gap: 10px;
    padding: 0;
  }

  .reader-page {
    width: 100%;
    border-radius: 8px;
  }

  /* --- Профиль --- */
  .profile {
    width: 100%;
    padding: 16px;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
  }

  .profile-info h2 {
    font-size: 1.3rem;
  }

  .profile-bio h3 {
    font-size: 1.1rem;
  }

  /* --- Авторизация и регистрация --- */
  .auth-box {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 14px;
  }

  .auth-box form label {
    font-size: 0.9rem;
  }

  .auth-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
  }

  .auth-tabs {
    flex-direction: row;
    justify-content: space-around;
    font-size: 0.95rem;
  }

  /* --- Избранное --- */
  .favorites-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  /* --- Подвал --- */
  .mx-footer {
    font-size: 13px;
    padding: 12px 8px;
  }
}

/* === 📱 ЭКСТРА — МАЛЕНЬКИЕ ЭКРАНЫ (телефоны до 480px) === */
@media (max-width: 480px) {
  .brand {
    font-size: 1.2rem;
  }

  .tile__cover img {
    height: 180px;
  }

  .details__info h2 {
    font-size: 1.2rem;
  }

  .auth-box {
    padding: 16px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }
}


/* ==== FOOTER ==== */
.site-footer {
  background-color: #0d0f14;
  color: #ccc;
  border-top: 1px solid #1c1f26;
  padding: 30px 20px;
  margin-top: 40px;
}

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

.footer-left {
  flex: 1 1 60%;
}

.footer-left p {
  margin: 5px 0;
}

.footer-left a {
  color: #4c8ef7;
  text-decoration: none;
}

.footer-left a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.footer-links a {
  color: #ddd;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.2s ease;
}

.footer-links a:hover {
  border-bottom: 1px solid #4c8ef7;
  color: #fff;
}

.footer-copy {
  color: #777;
  font-size: 13px;
  margin-top: 10px;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo {
  width: 50px;
  height: auto;
  opacity: 0.9;
}

/* 📱 Мобильная адаптация */
@media (max-width: 700px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-right {
    margin-top: 15px;
  }

  .footer-links {
    justify-content: center;
  }
}

.doc-page {
  max-width: 900px;
  margin: 50px auto;
  background-color: #11151c;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  color: #e0e0e0;
}

.doc-page h1 {
  color: #4c8ef7;
  font-size: 28px;
  margin-bottom: 20px;
}

.doc-page h2 {
  color: #8fb4ff;
  font-size: 20px;
  margin-top: 25px;
}

.doc-page a {
  color: #4c8ef7;
  text-decoration: none;
}

.doc-page a:hover {
  text-decoration: underline;
}

.doc-page ul {
  list-style: disc;
  padding-left: 20px;
}