* {
  box-sizing: border-box;
}

body {
  background: #0b0b0f;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* HEADER */
header {
  background: #120820;
  border-bottom: 1px solid rgba(129, 92, 255, 0.2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.48);
  padding: 8px max(16px, calc((100vw - 1080px) / 2));
  position: relative;
  width: 100%;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-auto-rows: minmax(0, auto);
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  transition: box-shadow 0.28s;
}

.header-hidden {
  transform: translateY(-120%);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  grid-column: 1;
  padding: 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  max-height: 44px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.tagline {
  display: none;
}

.site-logo:hover img {
  transform: scale(1.02);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 4;
  justify-self: end;
}

.user-greeting {
  color: #c9efff;
  font-weight: 600;
  font-size: 0.96em;
}

.auth-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
  border-radius: 5px;
  background: #1d1d24;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  font-weight: 700;
  white-space: nowrap;
}

.auth-btn:hover {
  background: #24243a;
  transform: translateY(-1px);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 7px 10px;
  min-width: 126px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.theme-toggle-track {
  width: 40px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  flex-shrink: 0;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #69c7ff;
  transition: left 0.2s ease, background 0.2s ease;
}

.theme-toggle-btn.light .theme-toggle-thumb {
  left: calc(100% - 18px);
  background: #ffd166;
}

.theme-toggle-btn .theme-toggle-label {
  font-size: 0.86em;
  font-weight: 700;
}

.auth-btn.small {
  padding: 8px 14px;
  font-size: 0.95em;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2000;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal-content {
  position: relative;
  width: min(520px, calc(100% - 40px));
  background: rgba(10, 10, 18, 0.98);
  border: 1px solid rgba(105, 199, 255, 0.22);
  border-radius: 22px;
  padding: 30px 28px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(105, 199, 255, 0.22);
  background: rgba(20, 20, 34, 0.96);
  color: #fff;
  outline: none;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.auth-submit {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #69c7ff, #8edbff);
  color: #0d0d0d;
  font-weight: 700;
  cursor: pointer;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.75;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: #c9efff;
  font-size: 0.9em;
  line-height: 1.4;
  text-align: center;
}

.auth-message.success {
  color: #9ff0c2;
}

.auth-message.error {
  color: #c9efff;
}

.auth-switch {
  margin: 0;
  color: #ddd;
  font-size: 0.95em;
  text-align: center;
}

.auth-switch a {
  color: #8edbff;
}

.comment-login-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid rgba(105, 199, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 16px;
  color: #eee;
}

.comment-user {
  color: #ccc;
  font-size: 0.92em;
  margin-top: 4px;
}

/* NAVEGACIÓN */
.social-strip {
  width: 100%;
  background: rgba(12, 12, 15, 0.96);
  border-bottom: 1px solid rgba(105, 199, 255, 0.16);
  padding: 8px 16px;
}

.social-strip-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-strip p {
  margin: 0;
  color: #f1d7d7;
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.4;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  transform: translateY(-1px);
  background: rgba(105, 199, 255, 0.16);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link svg path,
.social-link svg rect,
.social-link svg circle {
  vector-effect: non-scaling-stroke;
}

.social-instagram { color: #ff9ad5; }
.social-telegram { color: #80d5ff; }
.social-youtube { color: #72d0ff; }
.social-tiktok { color: #f7f7f7; }
.social-discord { color: #aeb8ff; }
.social-facebook { color: #9ec3ff; }
.social-x { color: #f5f5f5; }

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0;
  grid-column: 2;
  justify-self: center;
  padding: 0;
}

.nav-link {
  color: #dfddff;
  text-decoration: none;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 4px;
  background: transparent;
  transition: 0.18s ease;
  border: 1px solid transparent;
  font-size: 0.78rem;
  line-height: 1;
}

.nav-link:hover,
.nav-link.active {
  background: #23133d;
  color: #fff;
  border-color: rgba(129, 92, 255, 0.36);
  transform: none;
  box-shadow: none;
}

/* PANEL LATERAL: ANIMES RECIENTES */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.recent-panel {
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  padding: 10px;
  box-shadow: none;
}

.recent-panel .recent-title {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  color: #fff;
  border-left: 3px solid #f1b500;
  padding-left: 7px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, transform 0.12s ease;
  border: 0;
  background: #101014;
}

.recent-item:hover {
  background: #1e1e25;
  transform: none;
}

.recent-item img {
  width: 66px;
  height: 46px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: #222;
}

.recent-info h4 {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  max-width: 170px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.recent-info .meta {
  margin-top: 4px;
  font-size: 0.7rem;
  color: #a9a9b4;
}

.recent-status {
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-left: 6px;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .directory-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .directory-filter-search,
  .directory-filter-actions {
    grid-column: 1 / -1;
  }
  .directory-filter-actions {
    justify-content: flex-start;
  }
  .recent-panel {
    order: 2;
    margin-top: 18px;
  }
}

/* BÚSQUEDA */
.search-container {
  display: flex;
  justify-content: center;
  position: relative;
  margin: 0;
  grid-column: 3;
  align-items: center;
  justify-self: end;
  width: 270px;
  min-width: 220px;
}

.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(129, 92, 255, 0.42);
  border-radius: 999px;
  background: #101014;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: 0.3s;
}

body.light-theme {
  background: #f1f3f6;
  color: #101113;
}

body.light-theme header,
body.light-theme .social-strip,
body.light-theme .banner-carousel,
body.light-theme .modal-content,
body.light-theme .main,
body.light-theme footer {
  background: #ffffff;
  color: #101113;
}

body.light-theme header {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

body.light-theme .social-strip {
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-link {
  color: #111;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-link:hover,
body.light-theme .nav-link.active {
  background: #69c7ff;
  color: #000;
  border-color: #69c7ff;
}

body.light-theme .search-input {
  background: #f4f6fb;
  color: #111;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .search-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

body.light-theme .search-results {
  background: #ffffff;
  color: #111;
  border-color: rgba(105, 199, 255, 0.2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.light-theme .social-link {
  background: rgba(240, 243, 250, 0.9);
  color: #111;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .social-strip p {
  color: #2a2f38;
}

body.light-theme .auth-btn,
body.light-theme .theme-toggle-btn {
  background: rgba(105, 199, 255, 0.18);
  color: #111;
}

body.light-theme .banner-carousel {
  background: #f7f9fc;
}

body.light-theme .directory-filter-form {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .directory-filter-form label,
body.light-theme .directory-filter-meta {
  color: #4a5568;
}

body.light-theme .directory-filter-form input,
body.light-theme .directory-filter-form select {
  background: #f4f6fb;
  color: #111;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .directory-filter-clear {
  color: #2b5f83;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 100%;
  min-width: 320px;
  max-width: min(420px, calc(100vw - 24px));
  background: #1b1b25;
  border-radius: 4px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
  max-height: min(520px, calc(100vh - 120px));
  overflow-y: auto;
  display: none;
  z-index: 1001;
  border: 1px solid rgba(129, 92, 255, 0.28);
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

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

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 3px;
  background: #444;
  flex-shrink: 0;
}

.search-result-info h4 {
  margin: 0 0 5px 0;
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
}

.search-result-info p {
  margin: 0 0 3px 0;
  color: #9c9ca8;
  font-size: 11px;
  line-height: 1.25;
}

.search-result-info .episode {
  color: #69c7ff;
  font-weight: bold;
  font-size: 11px;
}

/* BANNER CARRUSEL */
.banner-carousel {
  width: 100%;
  max-width: 1080px;
  height: 255px;
  overflow: hidden;
  background: #15151a;
  position: relative;
  margin: 16px auto 14px;
  border-radius: 2px;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 10;
}

.carousel-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0.05) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.04));
  z-index: 2;
}

.carousel-art {
  position: absolute;
  inset: 0;
  width: 100%;
  display: block;
  z-index: 1;
}

.carousel-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
}

.carousel-content {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  top: auto;
  transform: none;
  z-index: 3;
  max-width: 70%;
  color: #fff;
}

.carousel-content .genre {
  display: inline-block;
  background: #2292ff;
  color: #fff;
  padding: 4px 8px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 10px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.carousel-content h2 {
  margin: 0 0 7px 0;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  max-width: 90%;
}

.carousel-content p {
  margin: 0 0 10px 0;
  font-size: 0.78rem;
  color: #e4e4e8;
  line-height: 1.35;
  max-width: 95%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-content .meta {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.72rem;
}

.carousel-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #101014;
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.carousel-watch::after {
  content: '▶';
  margin-left: 8px;
  font-size: 0.75em;
}

.carousel-watch:hover {
  background: #2292ff;
  transform: none;
  box-shadow: 0 10px 22px rgba(34, 146, 255, 0.22);
}

.carousel-content .meta span {
  color: #bdefff;
}

.carousel-content .meta strong {
  color: #69c7ff;
  font-weight: 700;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16, 16, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 34px;
  height: 54px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  z-index: 15;
}

.carousel-btn:hover {
  background: #2292ff;
  color: #fff;
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

.carousel-indicators {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: auto;
  left: auto;
  transform: none;
  display: flex;
  gap: 5px;
  z-index: 15;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(105, 199, 255, 0.4);
  cursor: pointer;
  transition: 0.3s;
}

.carousel-dot.active {
  background: #fff;
  border-color: #fff;
  transform: none;
}

/* MAIN */
main {
  padding: 8px 14px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

main h2 {
  text-align: left;
  font-size: 1rem;
  margin: 0 0 12px 0;
  color: #fff;
  text-shadow: none;
  border-left: 3px solid #f1b500;
  padding-left: 8px;
}

.directory-filter-panel:empty {
  display: none;
}

.directory-filter-panel {
  margin: 0 0 14px;
}

.directory-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(118px, 1fr)) minmax(92px, 0.7fr) minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.directory-filter-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #aeb4c4;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.directory-filter-search {
  min-width: 0;
}

.directory-filter-form input,
.directory-filter-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(105, 199, 255, 0.18);
  border-radius: 3px;
  background: #101014;
  color: #fff;
  padding: 0 10px;
  font-size: 0.84rem;
  outline: none;
}

.directory-filter-form input:focus,
.directory-filter-form select:focus {
  border-color: rgba(241, 181, 0, 0.72);
  box-shadow: 0 0 0 2px rgba(241, 181, 0, 0.12);
}

.directory-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.directory-filter-submit,
.directory-filter-clear {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.directory-filter-submit {
  border: 0;
  background: #f1b500;
  color: #151515;
  padding: 0 14px;
  cursor: pointer;
}

.directory-filter-clear {
  color: #c8d2e6;
  padding: 0 4px;
}

.directory-filter-meta {
  margin-top: 8px;
  color: #a8a8b3;
  font-size: 0.78rem;
}

/* GRID DE ANIMES */
.anime-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 12px 10px;
  padding: 0;
}

.anime-card {
  background: transparent !important;
  border-radius: 2px;
  overflow: visible;
  transition: 0.16s ease;
  cursor: pointer;
  position: relative;
  color: inherit;
  text-decoration: none;
}

.anime-card:hover {
  transform: translateY(-2px);
}

.anime-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: #1b1b21;
}

.anime-card img {
  width: 100%;
  aspect-ratio: 1.48 / 1;
  height: auto;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  background: #1b1b21;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.anime-card .episode-badge {
  position: absolute;
  left: 4px;
  right: auto;
  bottom: 4px;
  top: auto;
  background: #1677ff;
  color: #fff;
  padding: 3px 6px;
  border-radius: 2px;
  font-weight: bold;
  font-size: 0.68rem;
  box-shadow: none;
  z-index: 2;
}

.anime-card .status-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  left: auto;
  background: #111118;
  color: #81e6a9;
  padding: 3px 6px;
  border-radius: 2px;
  font-weight: bold;
  font-size: 0.62rem;
  border: 1px solid rgba(129, 230, 169, 0.38);
}

.anime-card .latino-badge {
  position: absolute;
  bottom: 4px;
  left: auto;
  top: auto;
  right: 4px;
  background: #f1b500;
  color: #161616;
  padding: 3px 6px;
  border-radius: 2px;
  font-weight: bold;
  font-size: 0.62rem;
  border: 0;
  z-index: 10;
}

.anime-info {
  padding: 6px 0 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.anime-info h3 {
  margin: 0 0 4px 0;
  font-size: 0.78rem;
  color: #fff;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  line-height: 1.2;
  cursor: help;
}

.anime-info .meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #a8a8b3;
  margin-bottom: 5px;
  gap: 4px;
}

.anime-info .year {
  color: #69b7ff;
  font-weight: 600;
}

.anime-info .genres {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.genre-tag {
  background: rgba(105, 199, 255, 0.2);
  color: #bdefff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  border: 0.5px solid rgba(105, 199, 255, 0.4);
}

.anime-info .description {
  font-size: 12px;
  color: #aaa;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 32px 0 8px;
}

.pagination-btn,
.pagination-gap {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
}

.pagination-btn {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(105, 199, 255, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
  background: #69c7ff;
  border-color: #69c7ff;
  color: #111;
  transform: translateY(-1px);
}

.pagination-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pagination-gap {
  color: #bdbdc8;
}

/* DETALLE DE ANIME */
.anime-detail {
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 0 20px;
}

.anime-detail h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.2;
  text-shadow: none;
}

.watch-head {
  margin: 0 0 14px;
}

.watch-head span,
.watch-head p {
  display: block;
  color: #b9b9c6;
  font-size: 0.9rem;
}

.watch-head span {
  margin-bottom: 5px;
  color: #8edbff;
  font-weight: 800;
  text-transform: uppercase;
}

.watch-head p {
  margin: 6px 0 0;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.watch-player-column,
.watch-sidebar {
  min-width: 0;
}

.watch-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 82px;
}

.anime-detail-header {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-bottom: 30px;
  align-items: start;
}

.anime-detail-poster img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.anime-detail-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.anime-detail-meta {
  background: rgba(105, 199, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid #69c7ff;
}

.anime-detail-meta p {
  margin: 8px 0;
  color: #ccc;
}

.anime-detail-meta strong {
  color: #69c7ff;
}

.anime-profile {
  max-width: 980px;
  margin: 0 auto;
}

.anime-profile-hero {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border-radius: 2px;
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.anime-profile-poster {
  position: relative;
}

.anime-profile-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: block;
  object-fit: cover;
  border-radius: 2px;
  background: #111;
  box-shadow: none;
}

.anime-profile-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-top: 8px;
  border-radius: 2px;
  background: #1779e8;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.anime-profile-copy h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.15;
}

.anime-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 10px;
}

.anime-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  color: #d7d7df;
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.anime-profile-meta b,
.anime-profile-meta strong {
  color: #5dbdff;
}

.anime-profile-copy p {
  max-width: 820px;
  margin: 0 0 12px;
  color: #d9d9e2;
  line-height: 1.45;
  font-size: 0.82rem;
}

.anime-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.profile-watch-btn {
  min-height: 58px;
  border: 0;
  border-radius: 3px;
  padding: 8px 12px;
  background: #1779e8;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
  text-align: center;
}

.profile-watch-btn span,
.profile-watch-btn strong {
  display: block;
}

.profile-watch-btn span {
  font-size: 0.68rem;
  opacity: 0.9;
}

.profile-watch-btn strong {
  margin-top: 2px;
  font-size: 0.88rem;
}

.anime-profile-episodes {
  margin-top: 14px;
  padding: 0;
  border-radius: 2px;
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-section-head h2 {
  margin: 0;
  text-align: left;
  font-size: 0.9rem;
  color: #fff;
}

.profile-section-head span {
  color: #c8c8d2;
  font-size: 0.76rem;
}

.anime-profile-synopsis {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 2px;
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.anime-profile-synopsis h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 0.9rem;
  text-align: left;
  border-left: 3px solid #f1b500;
  padding-left: 8px;
}

.anime-profile-synopsis p {
  margin: 0;
  color: #d8d8df;
  font-size: 0.82rem;
  line-height: 1.55;
}

.profile-episode-table-head,
.profile-episode-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 190px;
  align-items: center;
}

.profile-episode-table-head {
  min-height: 34px;
  padding: 0 14px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  background: #101014;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-episode-list {
  display: block;
}

.profile-episode-row {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 0;
  color: #fff;
  text-decoration: none;
  background: #17171b;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.profile-episode-row:hover {
  transform: none;
  background: #1f2633;
}

.profile-episode-row img {
  display: none;
  width: 84px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.profile-episode-row strong,
.profile-episode-row small {
  display: block;
}

.profile-episode-row strong {
  font-size: 0.78rem;
  color: #fff;
}

.profile-episode-row span {
  color: #e6e6eb;
  font-size: 0.78rem;
}

.profile-episode-row em {
  display: block;
  color: #d0d0d8;
  font-size: 0.76rem;
  font-style: normal;
  text-align: right;
}

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(105, 199, 255, 0.2);
}

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

.video-ad-click-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.video-ad-click-layer.hidden {
  display: none;
}

.watch-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.watch-toolbar button,
.watch-toolbar a {
  min-height: 40px;
  border: 1px solid rgba(105, 199, 255, 0.32);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.watch-toolbar button:hover:not(:disabled),
.watch-toolbar a:hover {
  transform: translateY(-1px);
  border-color: #69c7ff;
}

.watch-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.watch-nav-btn,
.watch-list-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
}

.watch-nav-btn {
  background: rgba(18, 18, 31, 0.92);
}

.watch-list-toggle {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #69c7ff, #7bd4ff);
  box-shadow: 0 12px 28px rgba(105, 199, 255, 0.22);
}

.report-chapter {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.08);
}

.watch-nav-btn span,
.watch-list-toggle span {
  font-size: 1.35rem;
  line-height: 1;
}

.episode-list-panel {
  margin: 0;
  border: 1px solid rgba(105, 199, 255, 0.18);
  border-radius: 8px;
  background: rgba(12, 12, 22, 0.94);
  overflow: hidden;
}

.episode-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(105, 199, 255, 0.14);
}

.episode-list-header h2 {
  margin: 0;
  color: #69c7ff;
  font-size: 1.05rem;
}

.episode-list-header span {
  color: #c9c9d4;
  font-size: 0.88rem;
}

.episode-list {
  display: grid;
  grid-template-columns: 1fr;
  max-height: 370px;
  overflow: auto;
}

.episode-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.episode-row:hover,
.episode-row.active {
  background: rgba(105, 199, 255, 0.14);
}

.episode-row.active {
  box-shadow: inset 3px 0 0 #69c7ff;
}

.episode-row img {
  width: 70px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.episode-row span,
.episode-row strong,
.episode-row small {
  display: block;
}

.episode-row strong {
  color: #fff;
  font-size: 0.95rem;
}

.episode-row small {
  color: #c8c8d0;
  margin-top: 4px;
  font-size: 0.8rem;
}

.now-watching {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(105, 199, 255, 0.12);
}

.now-watching img {
  width: 84px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.now-watching span,
.now-watching strong {
  display: block;
}

.now-watching span {
  color: #bdbdc8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.now-watching strong {
  margin-top: 2px;
  color: #fff;
}

.now-watching small {
  display: block;
  margin-top: 3px;
  color: #bdbdc8;
  font-size: 0.8rem;
}

.watch-page {
  max-width: 1306px;
  padding: 18px 0 24px;
}

.watch-page .watch-layout {
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 16px;
}

.watch-page .watch-player-column {
  display: grid;
  gap: 10px;
}

.watch-breadcrumb,
.watch-head,
.watch-episode-card,
.watch-recent-panel {
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.watch-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
  padding: 10px 14px;
  color: #e9e9ef;
  font-size: 0.82rem;
  font-weight: 800;
}

.watch-breadcrumb a,
.watch-breadcrumb strong {
  color: #fff;
  text-decoration: none;
}

.watch-breadcrumb span {
  color: #bdbdc8;
}

.watch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  margin: 0;
  padding: 17px 14px 13px;
}

.watch-head h1 {
  font-size: 1.28rem;
  line-height: 1.25;
}

.watch-head p {
  margin: 6px 0 0;
  color: #bdbdc8;
  font-size: 0.84rem;
}

.watch-head p a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.watch-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.watch-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.watch-share-btn.fb {
  background: #1d63d6;
}

.watch-share-btn.tw {
  background: #1da1f2;
}

.watch-share-btn.wa {
  background: #13c55d;
}

.watch-share-btn.tg {
  background: #229ed9;
}

.watch-video-frame {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.watch-video-frame .video-ad-click-layer {
  color: transparent;
  opacity: 0;
}

.watch-page .watch-server-section {
  margin: 0;
  padding: 12px 14px;
  border-radius: 2px;
  background: #17171b;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.watch-page .watch-server-section h2 {
  color: #fff;
  font-size: 0.85rem;
}

.watch-page .server-btn {
  min-height: 34px;
  border-radius: 4px;
  background: #20202a;
  font-size: 0.8rem;
}

.watch-page .watch-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.watch-page .watch-toolbar button,
.watch-page .watch-toolbar a {
  min-height: 38px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.watch-page .watch-list-toggle,
.watch-page .report-chapter {
  grid-column: auto;
}

.watch-page .server-help {
  border-radius: 4px;
  background: #1d1d25;
}

.watch-episode-card {
  overflow: hidden;
}

.watch-anime-summary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 17px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.watch-anime-summary img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
}

.watch-anime-summary h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.watch-anime-summary p {
  margin: 8px 0 0;
  color: #d7d7de;
  font-size: 0.84rem;
  font-style: italic;
}

.watch-anime-summary strong {
  color: #ffcb35;
}

.watch-page .episode-list-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.watch-page .episode-list {
  max-height: 430px;
}

.watch-page .episode-row {
  position: relative;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  min-height: 90px;
  padding: 10px 12px;
  background: #17171b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.watch-page .episode-row:hover {
  background: #202026;
}

.watch-page .episode-row.active {
  background: #222229;
  box-shadow: none;
}

.watch-page .episode-row.active::before {
  content: "▶";
  position: absolute;
  left: 46px;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 0.8rem;
  transform: translateY(-50%);
}

.watch-page .episode-row img {
  width: 100px;
  border-radius: 0;
}

.watch-page .episode-row.active img {
  opacity: 0.52;
}

.watch-page .episode-row strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.watch-page .episode-row small {
  color: #d3d3db;
  font-size: 0.78rem;
}

.watch-recent-panel {
  padding: 12px;
}

.watch-recent-panel .recent-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.28rem;
}

.watch-recent-panel .recent-list {
  max-height: none;
}

.watch-recent-panel .recent-item {
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 66px;
  padding: 7px 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.watch-recent-panel .recent-item img {
  width: 76px;
  border-radius: 0;
}

.watch-page .download-section,
.watch-page .comments-section,
.watch-page .recommended-section {
  border-radius: 2px;
  background: #17171b;
}

.anime-detail > p {
  text-align: center;
  font-size: 1.05em;
  margin: 25px 0;
  color: #ccc;
  line-height: 1.6;
}

.server-section.hidden {
  display: none;
}

.watch-server-section {
  margin: 0 0 8px;
}

.server-section h2,
.chapter-section h2 {
  font-size: 1.5em;
  color: #69c7ff;
  margin: 30px 0 15px 0;
}

.watch-server-section h2 {
  text-align: left;
  margin: 0 0 8px;
  color: #cfcfda;
  font-size: 0.94rem;
  text-shadow: none;
  text-transform: uppercase;
}

.server-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.watch-server-section .server-list {
  justify-content: flex-start;
}

.server-help {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #b8b8c4;
  font-size: 0.86rem;
  text-align: left;
}

.server-btn {
  min-height: 36px;
  border: 1px solid rgba(105, 199, 255, 0.35);
  border-radius: 8px;
  padding: 0 13px;
  background: #1e1e2e;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.server-btn:hover,
.server-btn.active {
  border-color: #69c7ff;
  background: rgba(105, 199, 255, 0.16);
}

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

.chapter-list button,
.chapter-list a {
  background: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%);
  color: #fff;
  border: 1px solid rgba(105, 199, 255, 0.3);
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
}

.chapter-list button:hover,
.chapter-list a:hover {
  border-color: #69c7ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(105, 199, 255, 0.4);
}

.chapter-list button.active,
.chapter-list a.active {
  border-color: #69c7ff;
  box-shadow: 0 0 0 2px rgba(105, 199, 255, 0.35);
}

.chapter-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.chapter-btn span,
.chapter-btn small {
  display: block;
  padding: 0 12px;
}

.chapter-btn span {
  padding-top: 10px;
  color: #fff;
  font-weight: 700;
}

.chapter-btn small {
  padding-top: 4px;
  padding-bottom: 12px;
  color: #bdbdbd;
  font-size: 0.82rem;
}

.download-section {
  margin-top: 24px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(105, 199, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(105, 199, 255, 0.12), transparent 42%),
    rgba(15, 15, 28, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.download-section.hidden {
  display: none;
}

.download-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.download-head span {
  display: block;
  margin-bottom: 3px;
  color: #b8b8c4;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.download-head h2 {
  margin: 0;
  color: #69c7ff;
  font-size: 1.35rem;
}

.download-head small {
  color: #d7d7df;
  font-weight: 700;
}

.download-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.download-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.download-link:hover {
  transform: translateY(-1px);
  border-color: rgba(105, 199, 255, 0.72);
  background: rgba(105, 199, 255, 0.14);
}

.download-quality {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: #1677d8;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.download-link strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comments-section {
  margin-top: 30px;
  padding: 24px;
  background: rgba(15, 15, 28, 0.95);
  border-radius: 18px;
  border: 1px solid rgba(105, 199, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.comments-section h2 {
  margin: 0 0 18px 0;
  color: #69c7ff;
  font-size: 1.65em;
}

.recommended-section {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(15, 15, 28, 0.78);
  border: 1px solid rgba(105, 199, 255, 0.12);
}

.recommended-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.recommended-head h2 {
  margin: 0;
  color: #69c7ff;
  font-size: 1.35rem;
  text-shadow: 0 2px 8px rgba(105, 199, 255, 0.24);
}

.recommended-head span {
  color: #b8b8c4;
  font-size: 0.9rem;
}

.recommended-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.recommended-card {
  border-radius: 8px;
}

.recommended-card .anime-info {
  padding: 10px;
}

.recommended-card .anime-info h3 {
  font-size: 0.92rem;
}

.recommended-card .anime-info .description {
  display: none;
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-form textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(105, 199, 255, 0.25);
  background: rgba(20, 20, 34, 0.95);
  color: #f5f5f7;
  padding: 16px;
  font-size: 0.98em;
  resize: vertical;
  min-height: 100px;
}

.comment-form button {
  width: fit-content;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #69c7ff, #8edbff);
  color: #0c0c0c;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(105, 199, 255, 0.25);
}

.comments-list {
  display: grid;
  gap: 14px;
}

.comment-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(105, 199, 255, 0.14);
}

.comment-card p {
  margin: 0 0 8px 0;
  color: #e7e7e7;
  line-height: 1.6;
}

.comment-card span {
  display: inline-block;
  font-size: 0.82em;
  color: #aaa;
}

.comment-empty {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #ddd;
  border: 1px dashed rgba(105, 199, 255, 0.15);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  color: #666;
  border-top: 1px solid #333;
  margin-top: 40px;
}

footer .footer-note {
  margin: 8px 0 0;
  font-size: 0.88em;
  color: #999;
  line-height: 1.5;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    grid-template-columns: auto 1fr auto;
    gap: 8px 12px;
    padding: 7px 14px;
  }

  .site-logo img {
    max-height: 48px;
  }

  .user-actions {
    grid-column: 3;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .search-container {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  .search-results {
    left: 0;
    right: auto;
    min-width: min(320px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }

  .banner-carousel {
    width: calc(100% - 24px);
    height: 230px;
    margin-top: 18px;
  }

  .carousel-content {
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 48px);
  }

  .carousel-art {
    inset: 0;
    width: 100%;
    opacity: 1;
  }

  .carousel-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .carousel-content h2 {
    font-size: 1.15rem;
  }

  .carousel-content p {
    font-size: 0.9em;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .carousel-prev {
    left: 15px;
  }

  .carousel-next {
    right: 15px;
  }

  header h1 {
    font-size: 2em;
  }

  .main-nav {
    gap: 8px;
  }

  .nav-link {
    flex: 0 0 auto;
    padding: 7px 11px;
    font-size: 13px;
  }

  .anime-list {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
  }

  .anime-card img {
    aspect-ratio: 1.48 / 1;
    height: auto;
  }

  .anime-detail-header {
    grid-template-columns: 1fr;
  }

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .watch-sidebar {
    position: static;
  }

  .anime-profile-hero {
    grid-template-columns: 170px 1fr;
    padding: 14px;
  }

  .anime-detail h1 {
    font-size: 1.8em;
  }

  .watch-toolbar {
    grid-template-columns: 1fr;
  }

  .episode-list {
    grid-template-columns: 1fr;
    max-height: 420px;
  }

  .recommended-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-episode-table-head,
  .profile-episode-row {
    grid-template-columns: 64px minmax(0, 1fr) 150px;
  }

  .now-watching {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px 10px;
  }

  .header-top {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .site-logo img {
    max-height: 38px;
  }

  .user-actions {
    grid-column: auto;
    justify-self: end;
    gap: 6px;
    margin-left: auto;
    max-width: calc(100vw - 130px);
    min-width: 0;
    overflow: hidden;
    flex-shrink: 1;
  }

  .auth-btn {
    padding: 7px 9px;
    font-size: 11px;
    min-width: 0;
  }

  #login-btn {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .theme-toggle-btn {
    min-width: 0;
    padding: 6px 8px;
    gap: 6px;
  }

  .theme-toggle-label {
    display: none;
  }

  .theme-toggle-track {
    width: 34px;
    height: 18px;
  }

  .theme-toggle-thumb {
    width: 14px;
    height: 14px;
  }

  body.light-theme .theme-toggle-thumb {
    transform: translateX(16px);
  }

  .main-nav {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .search-container {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
  }

  .search-results {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .banner-carousel {
    width: calc(100% - 20px);
    height: 210px;
  }

  .carousel-content {
    left: 12px;
    bottom: 12px;
    max-width: calc(100% - 36px);
  }

  .carousel-content h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
  }

  .carousel-content p {
    display: none;
  }

  .carousel-content .meta {
    display: none;
  }

  .carousel-watch {
    min-width: 118px;
    height: 40px;
    padding: 0 18px;
    font-size: 0.9em;
  }

  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .carousel-indicators {
    bottom: 15px;
    gap: 8px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  header h1 {
    font-size: 1.5em;
  }

  .tagline {
    font-size: 0.8em;
  }

  .main-nav {
    gap: 5px;
  }

  .nav-link {
    padding: 6px 9px;
    font-size: 12px;
  }

  .search-input {
    max-width: none;
    font-size: 13px;
    padding: 9px 12px;
  }

  main h2 {
    font-size: 1rem;
  }

  .directory-filter-form {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 9px;
  }

  .directory-filter-search,
  .directory-filter-actions {
    grid-column: auto;
  }

  .directory-filter-actions {
    align-items: stretch;
  }

  .directory-filter-form input,
  .directory-filter-form select,
  .directory-filter-submit,
  .directory-filter-clear {
    height: 40px;
    font-size: 0.82rem;
  }

  .directory-filter-submit,
  .directory-filter-clear {
    flex: 1;
  }

  .anime-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }

  .anime-card img {
    aspect-ratio: 1.48 / 1;
    height: auto;
  }

  .pagination {
    gap: 6px;
  }

  .pagination-btn,
  .pagination-gap {
    min-width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .anime-profile-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .anime-profile-poster {
    max-width: 190px;
    width: 100%;
    margin: 0 auto;
  }

  .anime-profile-copy h1 {
    font-size: 1.12rem;
    text-align: left;
  }

  .anime-profile-tags,
  .anime-profile-meta {
    justify-content: flex-start;
  }

  .anime-profile-copy p {
    font-size: 0.8rem;
  }

  .anime-profile-actions {
    grid-template-columns: 1fr;
  }

  .anime-profile-episodes {
    padding: 0;
  }

  .profile-section-head {
    align-items: center;
    flex-direction: row;
  }

  .profile-episode-table-head,
  .profile-episode-row {
    grid-template-columns: 42px minmax(0, 1fr) 84px;
    gap: 6px;
    padding: 0 8px;
  }

  .profile-episode-row img {
    display: none;
  }

  .profile-episode-row strong {
    font-size: 0.74rem;
  }

  .profile-episode-row span,
  .profile-episode-row em {
    font-size: 0.7rem;
  }

  .recommended-section {
    padding: 14px;
  }

  .recommended-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .recommended-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .watch-nav-btn,
  .watch-list-toggle {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .episode-row {
    grid-template-columns: 74px 1fr;
  }

  .episode-row img {
    width: 74px;
  }
}

.admin-page {
  --admin-accent: #69c7ff;
  --admin-accent-soft: rgba(105, 199, 255, 0.16);
  --admin-accent-mid: rgba(105, 199, 255, 0.28);
  --admin-accent-strong: #8edbff;
  --admin-accent-deep: #0f6fba;
  background:
    radial-gradient(circle at top left, rgba(105, 199, 255, 0.16), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(96, 165, 250, 0.09), transparent 30%),
    linear-gradient(135deg, #070a10 0%, #111827 100%);
}

.admin-main {
  width: min(1180px, calc(100% - 28px));
  margin: 18px auto 44px;
}

.admin-page header {
  border-bottom-color: rgba(105, 199, 255, 0.18);
}

.admin-page .auth-btn {
  background: rgba(105, 199, 255, 0.14);
  color: #e4f6ff;
  border: 1px solid rgba(105, 199, 255, 0.18);
}

.admin-page .auth-btn:hover {
  background: rgba(105, 199, 255, 0.24);
}

.admin-panel {
  border: 1px solid rgba(105, 199, 255, 0.2);
  background: rgba(8, 13, 22, 0.86);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.admin-section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.admin-section h2 {
  margin: 0 0 12px;
  color: var(--admin-accent-strong);
  font-size: 1.05rem;
  line-height: 1.2;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-section-head h2 {
  margin-bottom: 0;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-head h1,
.admin-panel h1 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.admin-head p {
  margin: 0;
  color: #b8b8b8;
}

.admin-form {
  display: grid;
  gap: 8px;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-form label {
  color: #ddd;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 9px;
}

.admin-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.86rem;
}

.admin-checks input {
  width: auto;
  min-height: auto;
  accent-color: var(--admin-accent-deep);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(105, 199, 255, 0.24);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  resize: vertical;
  font-size: 0.92rem;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.admin-search:focus,
.bulk-title-select:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(105, 199, 255, 0.13);
}

.carousel-banner-preview {
  margin-top: 8px;
  border-radius: 6px;
  overflow: hidden;
  max-width: 300px;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(105, 199, 255, 0.24);
}

.carousel-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.carousel-banner-preview.hidden {
  display: none;
}

.admin-form .admin-checks input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.admin-form button,
.admin-delete,
.admin-secondary {
  width: fit-content;
  min-height: 36px;
  border: none;
  border-radius: 6px;
  padding: 8px 13px;
  background: linear-gradient(135deg, #45b8ff, #8edbff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(37, 149, 224, 0.2);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-form button:hover:not(:disabled),
.admin-delete:hover:not(:disabled),
.admin-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 149, 224, 0.28);
}

.admin-delete {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(105, 199, 255, 0.22);
  background: rgba(105, 199, 255, 0.12);
  box-shadow: none;
}

.admin-secondary {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(105, 199, 255, 0.2);
  background: rgba(105, 199, 255, 0.1);
  color: #dff4ff;
  box-shadow: none;
}

.admin-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.admin-message {
  min-height: 20px;
  margin: 10px 0;
  color: #ccc;
}

.admin-message.success {
  color: #74f2a5;
}

.admin-message.error {
  color: #ffcf8a;
}

.admin-help {
  margin: -2px 0 0;
  color: #b8b8b8;
  font-size: 0.92rem;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.admin-search {
  width: min(360px, 100%);
  min-height: 38px;
  border: 1px solid rgba(105, 199, 255, 0.24);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
}

.admin-anime-picker {
  position: relative;
}

.admin-anime-picker input {
  width: 100%;
}

.anime-picker-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(105, 199, 255, 0.3);
  border-radius: 8px;
  background: #111119;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48);
}

.anime-picker-results button {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  padding: 11px 13px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.anime-picker-results button:hover {
  background: rgba(105, 199, 255, 0.16);
}

.anime-picker-results button:last-child {
  border-bottom: 0;
}

.anime-picker-results strong,
.anime-picker-results small {
  display: block;
}

.anime-picker-results small {
  margin-top: 3px;
  color: #aaa;
  font-size: 0.82rem;
}

.admin-selected-row {
  background: rgba(105, 199, 255, 0.09);
}

.admin-selected-row td:first-child {
  border-left: 3px solid var(--admin-accent);
}

#sitemap-output {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(105, 199, 255, 0.24);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--admin-accent-strong);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.admin-table a {
  color: #d8e7ff;
  word-break: break-all;
}

.admin-table td:last-child {
  min-width: 150px;
}

.admin-table td:last-child button {
  margin: 2px;
}

.admin-link-button {
  max-width: 320px;
  line-height: 1.25;
}

.bulk-import-preview {
  color: #ddd;
}

.bulk-import-table {
  margin-top: 8px;
}

.bulk-import-errors {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 207, 138, 0.32);
  border-radius: 8px;
  background: rgba(255, 207, 138, 0.08);
  color: #ffcf8a;
}

.bulk-import-errors p {
  margin: 0 0 6px;
}

.bulk-import-errors p:last-child {
  margin-bottom: 0;
}

.bulk-warning {
  color: #ffd48a;
}

.bulk-title-select {
  width: min(320px, 100%);
  min-height: 38px;
  border: 1px solid rgba(105, 199, 255, 0.24);
  background: #171717;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}

.admin-link-button {
  border: none;
  background: transparent;
  color: #d8e7ff;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.admin-link-button:hover {
  color: var(--admin-accent-strong);
  text-decoration: underline;
}

.admin-cover-preview {
  display: block;
  width: 72px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 5px;
  background: #111;
}

.carousel-admin-table {
  min-width: 760px;
}

.carousel-admin-table td:nth-child(4) {
  max-width: 220px;
  word-break: break-word;
}

.admin-image-preview {
  display: block;
  width: 96px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reports-table {
  min-width: 860px;
}

.report-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.report-status.open {
  background: rgba(105, 199, 255, 0.16);
  color: #c9efff;
}

.report-status.resolved {
  background: rgba(116, 242, 165, 0.14);
  color: #9df7bd;
}

#chapter-form {
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

#chapter-form > label {
  margin: 0;
}

#chapter-form > input,
#chapter-form > select,
#chapter-form > .admin-anime-picker,
#chapter-form > .admin-checks {
  grid-column: 2;
}

#clear-cover-image,
#save-chapter,
#cancel-chapter-edit {
  grid-column: 2;
  justify-self: start;
}

#chapter-form > .admin-checks {
  align-self: start;
}

#bulk-import-input {
  min-height: 132px;
  overflow: auto;
  white-space: pre;
  overflow-wrap: normal;
  font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 640px) {
  .admin-head {
    display: grid;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  #chapter-form {
    grid-template-columns: 1fr;
  }

  #chapter-form > input,
  #chapter-form > select,
  #chapter-form > .admin-anime-picker,
  #chapter-form > .admin-checks,
  #clear-cover-image,
  #save-chapter,
  #cancel-chapter-edit {
    grid-column: 1;
  }

  .admin-panel {
    padding: 14px;
  }

  .admin-section {
    padding: 12px;
  }
}

/* Mobile public layout hardening */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  header {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px 10px;
  }

  .header-top {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .site-logo img {
    max-height: 38px;
  }

  .user-actions {
    grid-column: auto;
    justify-self: end;
    gap: 6px;
    margin-left: auto;
    max-width: calc(100vw - 130px);
  }

  .auth-btn {
    padding: 7px 9px;
    font-size: 11px;
  }

  .theme-toggle-btn {
    min-width: 0;
    padding: 6px 8px;
    gap: 6px;
  }

  .theme-toggle-label {
    display: none;
  }

  .theme-toggle-track {
    width: 34px;
    height: 18px;
  }

  .theme-toggle-thumb {
    width: 14px;
    height: 14px;
  }

  body.light-theme .theme-toggle-thumb {
    transform: translateX(16px);
  }

  .main-nav {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .search-container {
    grid-column: 1;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
  }

  main {
    padding: 8px 10px 24px;
  }

  main h2 {
    font-size: 1rem;
  }

  .directory-filter-form {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 9px;
  }

  .directory-filter-search,
  .directory-filter-actions {
    grid-column: auto;
  }

  .directory-filter-actions {
    align-items: stretch;
    justify-content: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .directory-filter-form input,
  .directory-filter-form select,
  .directory-filter-submit,
  .directory-filter-clear {
    height: 40px;
    font-size: 0.82rem;
  }

  .directory-filter-submit,
  .directory-filter-clear {
    width: 100%;
  }

  .directory-filter-clear {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  #login-btn {
    max-width: 64px;
  }
}

@media (max-width: 640px) {
  #login-btn {
    display: none;
  }

  .banner-carousel {
    display: none;
  }

  .carousel-content {
    max-width: calc(100% - 28px);
    right: 14px;
  }

  .carousel-content h2 {
    max-width: 100%;
    word-break: break-word;
  }

  .anime-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .anime-card img {
    aspect-ratio: 1.48 / 1;
  }

  .anime-info h3 {
    font-size: 0.88rem;
  }

  .anime-info .meta {
    font-size: 0.72rem;
  }

  .genre-tag {
    padding: 3px 6px;
    font-size: 9px;
  }

  footer {
    padding: 16px 10px;
    overflow-wrap: anywhere;
  }
}
