:root {
  color-scheme: dark;
  --accent-color: #ffdd95;
  --accent-pink: #ffbade;
  --accent-cyan: #86e3d4;
  --background-color: #242428;
  --background-color-2: #1f1e2e;
  --background-color-3: #303039;
  --panel: #2b2b33;
  --line: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --muted: #b9b9c5;
  --soft: #8f8f9b;
  --container: 1800px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background-color);
  color: var(--text);
  font-family: Poppins, Inter, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 300;
}

body.sidebar-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.container {
  width: min(var(--container), calc(100% - 30px));
  margin: 0 auto;
}

#wrapper {
  min-height: 100vh;
  padding-top: 70px;
  overflow-x: hidden;
}

#header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  height: 70px;
  background: rgba(36, 36, 40, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(var(--container), calc(100% - 24px));
  height: 70px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 42px auto minmax(260px, 400px) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

#mobile_menu,
.close-sidebar {
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

#mobile_menu {
  width: 42px;
  font-size: 0;
}

#mobile_menu::before {
  content: "";
  display: block;
  width: 22px;
  height: 14px;
  margin: 13px auto;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  box-shadow: 0 6px 0 #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-color);
  color: #111;
  font-weight: 900;
  text-transform: lowercase;
}

.brand-name {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

#search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  height: 40px;
}

#search input {
  min-width: 0;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #141414;
  padding: 0 92px 0 15px;
  outline: none;
}

#search button {
  height: 40px;
  border: 0;
  background: var(--accent-color);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.filter-icon {
  position: absolute;
  right: 78px;
  top: 7px;
  height: 26px;
  line-height: 26px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}

.search-results {
  position: absolute;
  top: 41px;
  left: 0;
  right: 72px;
  display: none;
  overflow: hidden;
  background: #2d2b44;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.38);
  z-index: 90;
}

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

.search-hit {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.search-hit:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-hit img {
  width: 50px;
  height: 70px;
  object-fit: cover;
}

.search-hit strong,
.search-hit small {
  display: block;
}

.search-hit small,
.search-empty {
  color: var(--muted);
  font-size: 12px;
}

.search-empty {
  padding: 14px;
}

#header_menu {
  height: 70px;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

#header_menu > a,
.genre-menu {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 70px;
  line-height: 70px;
  color: #e6e6ee;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0 12px;
  white-space: nowrap;
}

.genre-menu {
  flex: 0 0 auto;
  overflow: visible;
}

#header_menu > a:hover,
#header_menu > a.active,
.genre-menu:hover {
  color: var(--accent-color);
}

#header_menu > a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--accent-color);
}

.genre-dropdown {
  position: absolute;
  top: 70px;
  right: 0;
  width: 650px;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 12px;
  background: #33333d;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.35);
}

.genre-menu:hover .genre-dropdown {
  display: grid;
}

.genre-dropdown a {
  height: 30px;
  line-height: 30px;
  color: #ddd;
  padding: 0 8px;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.genre-dropdown a:hover {
  background: var(--accent-color);
  color: #111;
}

#header_right {
  position: relative;
  z-index: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.header-chip,
.login-button {
  height: 40px;
  min-width: max-content;
  border: 0;
  border-radius: 20px;
  color: #111;
  background: var(--accent-color);
  font-weight: 700;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.header-chip {
  background: #4e4e6d;
  color: #fff;
}

#sidebar_menu_bg {
  position: fixed;
  inset: 0;
  z-index: 98;
  display: none;
  background: rgba(0, 0, 0, 0.55);
}

#sidebar_menu {
  position: fixed;
  top: 0;
  left: -310px;
  bottom: 0;
  z-index: 99;
  width: 300px;
  overflow-y: auto;
  padding: 18px;
  background: #2d2c34;
  transition: left 0.2s ease;
}

body.sidebar-open #sidebar_menu {
  left: 0;
}

body.sidebar-open #sidebar_menu_bg {
  display: block;
}

.close-sidebar {
  width: 100%;
  background: #3b3a45;
  color: #fff;
  margin-bottom: 16px;
}

.sidebar-brand {
  margin-bottom: 18px;
}

.sidebar-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.sidebar-tools a,
.sidebar-nav a,
.sidebar-genres a {
  display: block;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px 10px;
  color: #ddd;
  font-weight: 600;
}

.sidebar-tools a:hover,
.sidebar-nav a:hover,
.sidebar-genres a:hover {
  color: #111;
  background: var(--accent-color);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 6px;
}

.sidebar-genres {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.sidebar-genres strong {
  grid-column: 1 / -1;
  color: var(--accent-color);
  margin-bottom: 4px;
}

#main-wrapper {
  min-height: calc(100vh - 250px);
  padding-bottom: 50px;
}

#anime-spotlight {
  position: relative;
  overflow: hidden;
  margin-bottom: 35px;
}

.spotlight-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.spotlight-scroll::-webkit-scrollbar {
  display: none;
}

.spotlight-card {
  scroll-snap-align: start;
  min-height: 520px;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(36, 36, 40, 0.96) 0%, rgba(36, 36, 40, 0.72) 46%, rgba(36, 36, 40, 0.98) 100%),
    var(--spotlight-image);
  background-size: cover;
  background-position: center;
}

.spotlight-content {
  width: min(760px, calc(100% - 30px));
  margin-left: max(15px, calc((100vw - min(var(--container), calc(100vw - 30px))) / 2));
  padding: 60px 0;
}

.spotlight-rank,
.cat-heading {
  color: var(--accent-color);
}

.spotlight-rank {
  font-weight: 700;
  font-size: 15px;
}

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

.spotlight-content h2 {
  margin: 12px 0 18px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 700;
}

.spotlight-content p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #ddd;
}

.spotlight-meta,
.detail-ticks,
.tick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
}

.tick-item {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 0 7px;
}

.tick-item:first-child {
  background: var(--accent-pink);
  color: #111;
}

.spotlight-actions,
.detail-actions,
.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-color);
  color: #111;
}

.btn-secondary {
  background: #3a3951;
  color: #fff;
}

.block_area {
  margin-bottom: 38px;
}

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

.block_area-header h2,
.side-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.viewmore,
.side-heading a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.trending-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 220px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.trending-item {
  min-height: 260px;
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--panel);
}

.trending-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  opacity: 0.72;
}

.trending-item .number {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  color: var(--accent-color);
  font-size: 34px;
  font-weight: 800;
  text-shadow: 0 4px 15px #000;
}

.trending-item strong {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 2;
  font-size: 14px;
  line-height: 1.28;
  text-shadow: 0 4px 15px #000;
}

.home-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 30px;
  align-items: start;
}

.film_list-wrap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 14px;
}

.flw-item {
  min-width: 0;
}

.film-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.film-poster::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(36, 36, 40, 0.92), rgba(36, 36, 40, 0));
}

.film-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.film-poster-ahref {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.film-poster-ahref::after {
  content: "Guide";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.film-poster:hover .film-poster-img {
  transform: scale(1.04);
}

.film-poster:hover .film-poster-ahref::after {
  opacity: 1;
}

.film-poster .tick {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 4;
}

.film-detail {
  padding-top: 8px;
}

.film-name {
  min-height: 40px;
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.fd-infor,
.mini-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.fd-infor i,
.mini-meta i,
.anif-item small i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.share-block,
.comments-box,
.seo-text,
.overview-box,
.rating-box,
.server-box,
.watch-controls {
  margin-bottom: 28px;
  background: var(--background-color-2);
  border: 1px solid var(--line);
  padding: 18px;
}

.share-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-color);
  color: #111;
  font-weight: 900;
}

.share-block strong,
.share-block span {
  display: block;
}

.share-block strong {
  font-size: 20px;
}

.share-block span {
  color: var(--muted);
}

.share-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-actions button,
.comments-box button,
.rating-box button,
.server-box button,
.filter-bar button,
.watch-controls button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: #3a3951;
  color: #fff;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}

.show-comments {
  width: 100%;
  background: var(--accent-color) !important;
  color: #111 !important;
}

.comment-tabs,
.control-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.comments-box p,
.seo-text p,
.overview-box p,
.server-box p {
  color: #d5d5df;
}

.seo-text h2,
.overview-box h2,
.rating-box strong {
  margin-top: 0;
  color: var(--accent-color);
}

.side-panel {
  margin-bottom: 20px;
  background: var(--background-color-2);
  border: 1px solid var(--line);
  padding: 16px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.anif-block-ul {
  display: grid;
  gap: 0;
}

.anif-item {
  display: grid;
  grid-template-columns: 30px 55px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 9px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.anif-item:first-child {
  border-top: 0;
}

.anif-item .rank {
  color: var(--accent-color);
  font-size: 18px;
  font-weight: 800;
}

.anif-item img {
  width: 55px;
  height: 72px;
  object-fit: cover;
}

.anif-detail strong,
.anif-detail small {
  display: block;
}

.anif-detail strong {
  font-size: 13px;
  line-height: 1.3;
}

.anif-detail small {
  margin-top: 5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-bar button.active,
.filter-bar button:hover {
  background: var(--accent-color);
  color: #111;
}

.empty-state {
  padding: 25px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
  text-align: center;
}

.detail-page {
  margin-bottom: 30px;
  background-image:
    linear-gradient(90deg, rgba(36, 36, 40, 0.98), rgba(36, 36, 40, 0.78), rgba(36, 36, 40, 0.98)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-wrap {
  padding: 36px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 22px;
}

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

.detail-main-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.detail-poster {
  width: 210px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.1;
}

.detail-copy p {
  max-width: 900px;
  color: #dedee6;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.overview-box dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  margin: 18px 0 0;
}

.overview-box dt {
  color: var(--muted);
  font-weight: 700;
}

.overview-box dd {
  margin: 0;
}

.overview-box dd a {
  display: inline-block;
  margin: 0 6px 6px 0;
  color: var(--accent-color);
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.episode-chip {
  min-height: 58px;
  display: block;
  background: #31313b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
}

.episode-chip span {
  display: block;
  color: var(--accent-color);
  font-weight: 800;
}

.episode-chip strong {
  display: block;
  margin-top: 4px;
  color: #ddd;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
}

.episode-chip:hover,
.episode-chip.active {
  background: var(--accent-color);
  color: #111;
}

.episode-chip:hover span,
.episode-chip:hover strong,
.episode-chip.active span,
.episode-chip.active strong {
  color: #111;
}

.watch-page {
  padding-top: 25px;
}

.watch-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-left {
  display: flex;
  gap: 8px;
}

.watch-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
  margin-bottom: 0;
  background: #111;
}

.watch-player {
  min-height: 520px;
  display: grid;
  place-items: center;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.86)),
    var(--watch-image);
  background-size: cover;
  background-position: center;
}

.player-copy {
  width: min(720px, calc(100% - 40px));
  text-align: center;
}

.player-copy .brand-mark {
  margin: 0 auto 16px;
}

.player-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.1;
}

.player-copy p {
  margin: 0 auto;
  max-width: 620px;
  color: #d8d8e1;
}

.episode-side {
  background: #171721;
  padding: 18px;
  max-height: 520px;
  overflow-y: auto;
}

.episode-side h2 {
  margin: 0 0 12px;
  color: var(--accent-color);
  font-size: 18px;
}

.episode-side .episode-list {
  grid-template-columns: 1fr;
}

.episode-range {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.episode-range span {
  background: #33334a;
  border-radius: 5px;
  color: #ddd;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}

.watch-actions {
  margin: 0;
  padding: 14px;
  background: var(--background-color-2);
}

.server-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.server-box p {
  margin: 0;
  flex: 1 1 380px;
}

.watch-overview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
}

.watch-overview img {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rating-box strong,
.rating-box span {
  display: block;
}

.rating-box strong {
  font-size: 32px;
}

.rating-box p {
  color: #ddd;
}

.rating-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#footer {
  margin-top: 30px;
  background: #1b1b20;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  width: min(var(--container), calc(100% - 30px));
  margin: 0 auto;
  padding: 32px 0;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.join-group {
  color: #111;
  background: var(--accent-color);
  border-radius: 8px;
  padding: 10px 14px;
}

.join-group span,
.join-group strong {
  display: block;
}

.join-group span {
  font-size: 12px;
  opacity: 0.75;
}

.footer-az {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-az strong {
  margin-right: 10px;
  color: var(--accent-color);
}

.footer-az span,
.footer-note {
  color: var(--muted);
}

.letter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.letter-row a {
  min-width: 34px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #31313a;
  color: #ddd;
  font-weight: 700;
  padding: 0 8px;
}

.letter-row a:hover {
  background: var(--accent-color);
  color: #111;
}

.footer-note {
  margin: 16px 0 0;
}

@media (max-width: 1500px) {
  .header-inner {
    grid-template-columns: 42px auto minmax(250px, 360px) minmax(0, 1fr) auto;
  }

  #header_menu > a,
  .genre-menu {
    padding: 0 8px;
    font-size: 12px;
  }

  .film_list-wrap {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: 42px auto minmax(260px, 1fr) auto;
  }

  #header_menu {
    display: none;
  }

  .home-layout,
  .detail-layout,
  .watch-stage {
    grid-template-columns: 1fr;
  }

  .episode-side {
    max-height: none;
  }

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

@media (max-width: 860px) {
  #wrapper {
    padding-top: 116px;
  }

  #header {
    height: auto;
  }

  .header-inner {
    height: auto;
    grid-template-columns: 42px 1fr auto;
    padding: 10px 0;
  }

  #search {
    grid-column: 1 / -1;
    order: 5;
  }

  #header_right .header-chip {
    display: none;
  }

  .spotlight-card {
    min-height: 430px;
  }

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

  .detail-main-card,
  .watch-overview {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 180px;
  }

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

  .watch-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-block,
  .footer-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-actions {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .container,
  .footer-inner,
  .header-inner {
    width: calc(100% - 20px);
  }

  .brand-name {
    font-size: 18px;
  }

  .login-button {
    padding: 0 11px;
  }

  .spotlight-content {
    width: calc(100% - 24px);
    margin-left: 12px;
  }

  .film_list-wrap,
  .episode-list,
  .episode-side .episode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trending-list {
    grid-auto-columns: 145px;
  }
}

/* Competitor-style home layout */
body {
  background: #070707;
}

#wrapper {
  padding-top: 126px;
}

#header {
  height: 126px;
  background: #080808;
  border-bottom: 0;
  backdrop-filter: none;
}

.header-inner {
  width: calc(100% - 60px);
  max-width: none;
  height: 126px;
  grid-template-columns: 54px 230px minmax(360px, 574px) 1fr;
  gap: 28px;
}

#mobile_menu {
  width: 54px;
  height: 54px;
}

#mobile_menu::before {
  width: 38px;
  height: 22px;
  margin: 16px auto;
  border-top-width: 4px;
  border-bottom-width: 4px;
  box-shadow: 0 10px 0 #fff;
}

.brand {
  gap: 14px;
}

.brand-mark {
  width: 84px;
  height: 84px;
  border-radius: 0;
  background: transparent;
  color: #ffdd95;
  font-size: 44px;
  line-height: 1;
  transform: skew(-8deg);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  background: #ffdd95;
}

.brand-mark::before {
  width: 20px;
  height: 76px;
  transform: rotate(28deg);
}

.brand-mark::after {
  width: 20px;
  height: 76px;
  transform: rotate(-28deg);
}

.brand-mark {
  position: relative;
}

.brand-mark {
  font-size: 0;
}

.brand-name {
  display: grid;
  gap: 0;
  color: #fff;
  font-size: 38px;
  line-height: 0.78;
  font-weight: 900;
  text-transform: lowercase;
}

.brand-name span:first-child {
  color: #ffdd95;
}

#search {
  height: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  border-radius: 999px;
  overflow: hidden;
  background: #1b1b1b;
}

#search input {
  height: 80px;
  border-radius: 999px 0 0 999px;
  background: #1b1b1b;
  color: #fff;
  padding: 0 0 0 40px;
  font-size: 25px;
}

#search input::placeholder {
  color: #9b9b9b;
}

#search button {
  position: relative;
  height: 80px;
  border-radius: 0 999px 999px 0;
  background: #1b1b1b;
  color: #fff;
  font-size: 0;
}

#search button::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 5px solid #fff;
  border-radius: 50%;
  position: absolute;
  top: 24px;
  left: 18px;
}

#search button::after {
  content: "";
  width: 17px;
  height: 5px;
  background: #fff;
  border-radius: 999px;
  position: absolute;
  top: 48px;
  left: 42px;
  transform: rotate(45deg);
}

.filter-icon,
#header_menu,
#header_right {
  display: none;
}

.search-results {
  top: 86px;
  right: 0;
  border-radius: 12px;
}

.container,
.footer-inner {
  width: calc(100% - 60px);
  max-width: none;
}

#main-wrapper {
  padding: 0 0 60px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 474px;
  gap: 22px;
  align-items: start;
}

#anime-spotlight {
  margin: 28px 0 38px;
  overflow: visible;
}

.spotlight-card {
  min-height: 480px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
  align-items: center;
  overflow: hidden;
  border-radius: 10px;
  padding: 30px 88px 30px 60px;
  background-image:
    linear-gradient(90deg, rgba(13, 13, 18, 0.96), rgba(13, 13, 18, 0.82) 46%, rgba(13, 13, 18, 0.7)),
    var(--spotlight-image);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.42);
}

.spotlight-content {
  width: auto;
  margin: 0;
  padding: 0;
}

.spotlight-rank {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 7px;
  background: #ffdd95;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  padding: 0 24px;
  text-transform: uppercase;
}

.spotlight-content h2 {
  max-width: 720px;
  margin: 70px 0 26px;
  color: #fff;
  font-size: clamp(40px, 4vw, 58px);
  line-height: 1.12;
  font-weight: 900;
}

.spotlight-content p {
  max-width: 720px;
  color: #f2f2f2;
  font-size: 25px;
  line-height: 1.52;
  font-weight: 500;
}

.spotlight-poster {
  width: 300px;
  height: 420px;
  justify-self: center;
  display: block;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.52);
}

.spotlight-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-actions {
  margin-top: 42px;
  gap: 24px;
}

.btn {
  min-height: 68px;
  border-radius: 8px;
  padding: 0 34px;
  font-size: 22px;
  font-weight: 900;
}

.btn-primary {
  background: #ffdd95;
}

.btn-secondary {
  border: 3px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.07);
}

.block_area-header {
  margin-bottom: 22px;
}

.cat-heading,
.block_area-header h2,
.side-heading h2 {
  color: #fff;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.viewmore {
  min-height: 28px;
  align-items: center;
  display: inline-flex;
  border-radius: 3px;
  background: #1c1c1c;
  color: #fff;
  padding: 0 10px;
  text-transform: uppercase;
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.release-card a {
  position: relative;
  display: block;
  min-height: 182px;
  overflow: hidden;
  border-radius: 6px;
  background: #181818;
}

.release-card img {
  width: 100%;
  height: 182px;
  object-fit: cover;
  opacity: 0.9;
}

.release-card a::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0));
}

.release-type {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  min-width: 56px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 6px 0 8px;
  background: #086de5;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.release-meta {
  position: absolute;
  left: 12px;
  bottom: 54px;
  z-index: 2;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.release-card strong,
.release-card small {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-card strong {
  bottom: 27px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.release-card small {
  bottom: 8px;
  color: #ddd;
  font-size: 13px;
}

.home-sidebar {
  margin-top: 28px;
}

.side-panel {
  margin-bottom: 0;
  border: 0;
  border-radius: 4px;
  background: #1a1a1a;
  padding: 0;
}

.side-panel + .side-panel {
  margin-top: 24px;
}

.new-series-panel h2,
.text-series-panel h2,
.side-heading {
  margin: 0;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #2b2b2b;
}

.new-series-panel h2,
.text-series-panel h2,
.side-heading h2 {
  color: #fff;
  font-size: 32px;
  font-weight: 900;
}

.series-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  min-height: 142px;
  padding: 18px 22px;
  border-bottom: 1px solid #2b2b2b;
}

.series-row img {
  width: 70px;
  height: 100px;
  object-fit: cover;
}

.series-row strong,
.series-row small,
.series-row em {
  display: block;
}

.series-row strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 900;
}

.series-row small {
  margin-top: 8px;
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
}

.series-row em {
  margin-top: 14px;
  color: #aaa;
  font-size: 18px;
  font-style: normal;
}

.text-series-panel ol {
  margin: 0;
  padding: 12px 22px 20px 42px;
}

.text-series-panel li {
  color: #d9d9d9;
  font-size: 15px;
  margin: 9px 0;
}

.side-heading a {
  display: none;
}

.anif-block-ul {
  padding: 0 22px 18px;
}

.anif-item {
  grid-template-columns: 34px 58px 1fr;
  border-top-color: #2b2b2b;
}

.anif-detail strong {
  color: #fff;
  font-size: 16px;
}

.recommendation-block,
#catalog {
  margin-top: 42px;
}

.seo-text {
  background: transparent;
  border: 0;
  padding: 0;
  color: #fff;
}

.seo-text h2 {
  color: #fff;
  font-size: 36px;
}

.seo-text p {
  max-width: 980px;
  color: #d5d5d5;
  font-size: 18px;
}

@media (max-width: 1500px) {
  .header-inner {
    grid-template-columns: 54px 230px minmax(320px, 574px) 1fr;
  }

  .home-layout {
    grid-template-columns: minmax(0, 1fr) 420px;
  }

  .spotlight-card {
    grid-template-columns: minmax(0, 1fr) 330px;
    padding: 30px 44px;
  }

  .spotlight-content h2 {
    font-size: 48px;
  }

  .spotlight-content p {
    font-size: 21px;
  }

  .spotlight-poster {
    width: 280px;
    height: 392px;
  }

  .release-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  #wrapper {
    padding-top: 116px;
  }

  #header,
  .header-inner {
    height: 116px;
  }

  .header-inner {
    grid-template-columns: 54px 210px minmax(220px, 1fr);
    gap: 18px;
  }

  .home-layout,
  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .spotlight-poster {
    display: none;
  }

  .home-sidebar {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  #wrapper {
    padding-top: 178px;
  }

  #header {
    height: 178px;
  }

  .header-inner {
    width: calc(100% - 24px);
    height: 178px;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 14px 0;
  }

  #search {
    grid-column: 1 / -1;
    height: 58px;
  }

  #search input,
  #search button {
    height: 58px;
  }

  #search input {
    padding-left: 22px;
    font-size: 20px;
  }

  #search button::before {
    top: 16px;
  }

  #search button::after {
    top: 40px;
  }

  .container,
  .footer-inner {
    width: calc(100% - 24px);
  }

  .spotlight-card {
    min-height: auto;
    padding: 30px 24px;
  }

  .spotlight-rank {
    font-size: 15px;
  }

  .spotlight-content h2 {
    margin-top: 34px;
    font-size: 36px;
  }

  .spotlight-content p {
    font-size: 17px;
  }

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

  .series-row strong {
    font-size: 18px;
  }
}

/* Scale tuning: keep the competitor-style composition, but reduce the zoomed-in feel. */
#wrapper {
  padding-top: 108px;
}

#header,
.header-inner {
  height: 108px;
}

.header-inner {
  width: calc(100% - 52px);
  grid-template-columns: 48px 202px minmax(320px, 520px) 1fr;
  gap: 24px;
}

#mobile_menu {
  width: 48px;
  height: 48px;
}

#mobile_menu::before {
  width: 34px;
  height: 20px;
  margin: 14px auto;
  border-top-width: 3px;
  border-bottom-width: 3px;
  box-shadow: 0 9px 0 #fff;
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 70px;
  height: 70px;
}

.brand-mark::before,
.brand-mark::after {
  width: 17px;
  height: 64px;
}

.brand-name {
  font-size: 32px;
}

#search {
  height: 64px;
  grid-template-columns: minmax(0, 1fr) 68px;
}

#search input,
#search button {
  height: 64px;
}

#search input {
  padding-left: 32px;
  font-size: 21px;
}

#search button::before {
  width: 18px;
  height: 18px;
  border-width: 4px;
  top: 18px;
  left: 15px;
}

#search button::after {
  width: 14px;
  height: 4px;
  top: 39px;
  left: 34px;
}

.search-results {
  top: 70px;
}

.container,
.footer-inner {
  width: calc(100% - 52px);
}

.home-layout {
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 20px;
}

#anime-spotlight {
  margin: 24px 0 32px;
}

.spotlight-card {
  min-height: 430px;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 28px 58px 28px 46px;
}

.spotlight-rank {
  min-height: 38px;
  padding: 0 20px;
  font-size: 15px;
}

.spotlight-content h2 {
  margin: 46px 0 20px;
  font-size: clamp(34px, 3vw, 46px);
}

.spotlight-content p {
  font-size: 19px;
  line-height: 1.46;
}

.spotlight-poster {
  width: 250px;
  height: 350px;
}

.spotlight-actions {
  margin-top: 32px;
  gap: 18px;
}

.btn {
  min-height: 54px;
  padding: 0 26px;
  font-size: 18px;
}

.cat-heading,
.block_area-header h2,
.side-heading h2 {
  font-size: 30px;
}

.release-grid {
  gap: 18px;
}

.release-card a {
  min-height: 154px;
}

.release-card img {
  height: 154px;
}

.release-type {
  min-width: 48px;
  height: 32px;
  font-size: 15px;
}

.release-meta {
  bottom: 48px;
  font-size: 12px;
}

.release-card strong {
  bottom: 25px;
  font-size: 14px;
}

.release-card small {
  font-size: 12px;
}

.home-sidebar {
  margin-top: 24px;
}

.new-series-panel h2,
.text-series-panel h2,
.side-heading {
  padding: 18px 18px 14px;
}

.new-series-panel h2,
.text-series-panel h2,
.side-heading h2 {
  font-size: 28px;
}

.series-row {
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 118px;
  gap: 12px;
  padding: 14px 18px;
}

.series-row img {
  width: 58px;
  height: 82px;
}

.series-row strong {
  font-size: 18px;
}

.series-row small {
  font-size: 13px;
}

.series-row em {
  margin-top: 10px;
  font-size: 15px;
}

.text-series-panel ol {
  padding: 10px 18px 18px 36px;
}

.seo-text h2 {
  font-size: 30px;
}

.seo-text p {
  font-size: 16px;
}

@media (max-width: 1500px) {
  .header-inner {
    grid-template-columns: 48px 202px minmax(300px, 520px) 1fr;
  }

  .home-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .spotlight-card {
    grid-template-columns: minmax(0, 1fr) 278px;
    padding: 26px 36px;
  }

  .spotlight-content h2 {
    font-size: 40px;
  }

  .spotlight-content p {
    font-size: 18px;
  }

  .spotlight-poster {
    width: 230px;
    height: 322px;
  }
}

@media (max-width: 1120px) {
  #wrapper {
    padding-top: 100px;
  }

  #header,
  .header-inner {
    height: 100px;
  }

  .header-inner {
    grid-template-columns: 48px 190px minmax(220px, 1fr);
    gap: 16px;
  }
}

@media (max-width: 760px) {
  #wrapper {
    padding-top: 154px;
  }

  #header,
  .header-inner {
    height: 154px;
  }

  .header-inner {
    width: calc(100% - 24px);
    grid-template-columns: 48px 1fr;
    padding: 12px 0;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  .brand-mark::before,
  .brand-mark::after {
    width: 14px;
    height: 52px;
  }

  .brand-name {
    font-size: 27px;
  }

  #search {
    height: 52px;
  }

  #search input,
  #search button {
    height: 52px;
  }

  #search input {
    font-size: 18px;
  }

  #search button::before {
    top: 14px;
  }

  #search button::after {
    top: 35px;
  }

  .spotlight-card {
    padding: 24px 18px;
  }

  .spotlight-content h2 {
    margin-top: 28px;
    font-size: 30px;
  }

  .spotlight-content p {
    font-size: 15px;
  }

  .btn {
    min-height: 48px;
    font-size: 16px;
  }

  .cat-heading,
  .block_area-header h2,
  .side-heading h2 {
    font-size: 26px;
  }
}

/* Final mobile polish for the static publish build. */
@media (max-width: 900px) {
  .home-layout,
  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .home-layout {
    gap: 0;
  }

  .home-main,
  .home-sidebar {
    min-width: 0;
  }

  .home-sidebar {
    margin-top: 28px;
  }

  .spotlight-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  #wrapper {
    padding-top: 150px;
  }

  #header,
  .header-inner {
    height: 150px;
  }

  .header-inner,
  .container,
  .footer-inner {
    width: calc(100% - 28px);
  }

  .header-inner {
    grid-template-columns: 44px 1fr;
    gap: 10px 14px;
  }

  #mobile_menu {
    width: 44px;
    height: 44px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
  }

  .brand-name {
    font-size: 25px;
  }

  #search {
    grid-column: 1 / -1;
    height: 52px;
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  #search input,
  #search button {
    height: 52px;
  }

  #search input {
    padding-left: 22px;
    font-size: 18px;
  }

  #anime-spotlight {
    margin: 20px 0 28px;
  }

  .spotlight-card {
    min-height: 0;
    padding: 22px 18px;
    background-position: center;
  }

  .spotlight-rank {
    min-height: 34px;
    padding: 0 16px;
    font-size: 14px;
  }

  .spotlight-content h2 {
    max-width: 100%;
    margin: 30px 0 16px;
    font-size: 31px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .spotlight-content p {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.45;
  }

  .spotlight-actions {
    margin-top: 24px;
    gap: 12px;
  }

  .btn {
    min-height: 48px;
    padding: 0 18px;
    font-size: 16px;
  }

  .block_area {
    margin-top: 28px;
  }

  .block_area-header {
    margin-bottom: 16px;
    align-items: center;
  }

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

  .release-card a {
    min-height: 188px;
  }

  .release-card img {
    height: 188px;
  }

  .catalog-grid,
  .film_list-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .film-poster {
    aspect-ratio: 2 / 3;
  }

  .home-sidebar {
    display: grid;
    gap: 20px;
    margin-top: 30px;
  }

  .side-panel + .side-panel {
    margin-top: 0;
  }

  .series-row {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 112px;
    padding: 14px 16px;
  }

  .series-row img {
    width: 64px;
    height: 90px;
  }

  .series-row strong {
    font-size: 18px;
    line-height: 1.25;
  }

  .anif-item {
    grid-template-columns: 34px 58px minmax(0, 1fr);
  }

  .seo-text {
    display: none;
  }
}

@media (max-width: 420px) {
  .release-grid,
  .catalog-grid,
  .film_list-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .release-card a {
    min-height: 160px;
  }

  .release-card img {
    height: 160px;
  }

  .release-card strong {
    font-size: 13px;
  }
}
