:root {
  --bg: #000;
  --panel: #040404;
  --panel-line: #2a2a2a;
  --muted: #a4a7ae;
  --text: #f2f2f2;
  --chip: #1f1f23;
  --chip-line: #2e2e35;
  --active-ep: #4f472f;
  --fs-xs: clamp(0.75rem, 0.72rem + 0.2vw, 0.8125rem);
  --fs-sm: clamp(0.8125rem, 0.78rem + 0.3vw, 0.9375rem);
  --fs-base: clamp(0.9375rem, 0.9rem + 0.25vw, 1rem);
  --fs-lg: clamp(1rem, 0.95rem + 0.45vw, 1.125rem);
  --fs-xl: clamp(1.125rem, 1.02rem + 0.8vw, 1.5rem);
  --fs-2xl: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  overflow-x: clip;
}

/* content is now shown immediately to allow skeleton loaders to work */
.watch-body.watch-hydrating .watch-left,
.watch-body.watch-hydrating .upnext-panel,
.watch-body.watch-hydrating .more-like-this {
  opacity: 1;
}

.watch-body:not(.watch-hydrating) .watch-left,
.watch-body:not(.watch-hydrating) .upnext-panel,
.watch-body:not(.watch-hydrating) .more-like-this {
  opacity: 1;
}


a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: relative;
  z-index: 30;
  height: 64px;
  padding: 1px 10px 0;
  display: flex;
  align-items: center;
}

.topbar .topbar-inner {
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .topbar-left,
.topbar .topbar-actions {
  display: flex;
  align-items: center;
}

.topbar .topbar-actions {
  gap: 8px;
}

.topbar-brand-btn {
  height: 46px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
}

.topbar-logo,
.logo {
  width: 146px;
  height: 33px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.topbar-action-link,
.topbar-action-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  text-decoration: none;
}

.topbar-action-link i,
.topbar-action-link svg,
.topbar-action-btn i,
.topbar-action-btn svg {
  width: 21px;
  height: 21px;
}

.pc-header {
  display: none;
}

.watch-page {
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 16px;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 500px at 20% -30%, rgba(0, 255, 255, 0.08), transparent 60%),
    radial-gradient(1200px 500px at 100% -30%, rgba(25, 255, 126, 0.08), transparent 60%),
    #000;
}

.watch-topbar {
  height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.crumb-home,
.crumb-sep {
  color: #c2c5cc;
}

.crumb-link,
.crumb-current {
  white-space: nowrap;
  font-size: var(--fs-xl);
  line-height: 1;
}

.crumb-link {
  color: #bfc3cb;
}

.crumb-current {
  color: #fff;
  font-weight: 500;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #f4f4f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.icon-btn i,
.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--chip-line);
  background: var(--chip);
}

.icon-btn.small.is-active {
  background: #1a202a;
  border-color: #374152;
}

[data-role="refresh-episodes"].is-active i,
[data-role="refresh-episodes"].is-active svg {
  animation: refresh-spin 0.8s linear infinite;
}

[data-role="mobile-refresh-episodes"].is-active i,
[data-role="mobile-refresh-episodes"].is-active svg {
  animation: refresh-spin 0.8s linear infinite;
}

@keyframes refresh-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.flex-center {
  display: inline-flex;
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.h-full {
  height: 100%;
}

.rounded-md {
  border-radius: 8px;
}

.bg-white\/10 {
  background: rgba(255, 255, 255, 0.1);
}

.search-chip {
  width: min(352px, 100%);
  max-width: 100%;
  flex: 1 1 220px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: var(--chip);
  color: var(--muted);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: var(--fs-sm);
}

.search-chip i,
.search-chip svg {
  width: 16px;
  height: 16px;
}

.watch-layout {
  max-width: 1650px;
  margin: 0 auto;
  padding: 8px 24px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 18px;
}

.watch-left,
.watch-right {
  min-width: 0;
}

.watch-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Tight wrapper that only wraps the player — ambilight aura is scoped here */
.player-ambilight-container {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: visible;
  /* let aura bleed outside */
  width: 100%;
}

.ambilight-aura {
  position: absolute;
  inset: -50px;
  z-index: 0;
  pointer-events: none;
  border-radius: 24px;
  overflow: hidden;
  filter: blur(65px) saturate(1.7) brightness(0.8);
  opacity: 0.55;
}

.player-wrap {
  position: relative;
  z-index: 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  border: 0;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.player-back-btn {
  display: none;
}

.player-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.episode-title {
  margin: 14px 0 10px;
  font-size: var(--fs-2xl);
  line-height: 1.15;
  font-weight: 600;
}

.episode-title-row {
  margin: 14px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.episode-title-row .episode-title {
  margin: 0;
  min-width: 0;
  flex: 0 1 auto;
  max-width: calc(100% - 58px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-more-btn {
  display: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-sm);
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.episode-meta-line,
.mobile-comments-card,
.mobile-filter-tabs,
.mobile-episode-toolbar,
.ep-summary {
  display: none;
}

.watch-meta-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.anime-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.anime-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}

.anime-name {
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: 1.15;
}

.anime-users {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 3px;
}

.list-btn {
  height: 36px;
  border-radius: 999px;
  border: 0;
  padding: 0 14px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  background: #f7f7f7;
  color: #111;
  margin-left: 8px;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.list-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.episode-actions {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--chip-line);
  background: var(--chip);
  color: #f2f2f3;
  padding: 0 12px;
  font: inherit;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.pill-btn i,
.pill-btn svg {
  width: 16px;
  height: 16px;
}

.server-popover {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  z-index: 40;
}

.server-popover.is-down {
  top: calc(100% + 8px);
  bottom: auto;
}

.server-popover.is-up {
  top: auto;
  bottom: calc(100% + 8px);
}

.server-popover[hidden] {
  display: none;
}

.server-sheet-backdrop {
  display: none;
}

.server-popover-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 16, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.server-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2px;
  gap: 2px;
}

.server-type-btn {
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f4f4f5;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.server-type-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.server-type-btn.is-active {
  background: #fff;
  color: #0b0b0b;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.server-item {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f3f3f3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.server-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.server-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c9cdd6;
  position: relative;
}

.server-item.is-active .server-icon {
  color: #ffffff;
}

.server-item.is-active .server-icon::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  position: absolute;
}

.server-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.server-name {
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: capitalize;
}

.server-desc {
  font-size: var(--fs-xs);
  color: #9ca3af;
}

.hover\:bg-white\/15:hover {
  background: rgba(255, 255, 255, 0.15);
}

[data-role="server-popover-trigger"][aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.episode-desc {
  margin-top: 12px;
  background: #241601;
  border-radius: 14px;
  padding: 12px 12px 14px;
}

.detail-divider {
  height: 1px;
  margin: 12px 0;
  background: #4a3720;
}

.desc-meta {
  margin: 0 0 5px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #f7f4ef;
}

.detail-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.info-tab {
  height: 22px;
  border-radius: 999px;
  border: 1px solid #5f4d2f;
  background: #302109;
  color: #f2dfb8;
  padding: 0 9px;
  font-size: var(--fs-xs);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.episode-snippet {
  margin: 0;
  font-size: var(--fs-base);
  line-height: 1.38;
  color: #ece8e1;
}

.anime-info-grid {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.detail-poster {
  width: 122px;
  height: 176px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.detail-stats {
  display: grid;
  gap: 14px;
  align-content: stretch;
}

.detail-stat {
  display: grid;
  gap: 2px;
}

.detail-stat span {
  color: #c1baae;
  font-size: var(--fs-sm);
  font-weight: 500;
}

.detail-stat strong {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.detail-title {
  margin: 10px 0 6px;
  font-size: var(--fs-lg);
  line-height: 1.16;
  font-weight: 600;
}

.detail-long {
  margin: 0;
  font-size: var(--fs-base);
  line-height: 1.42;
  color: #ddd3c4;
}

.detail-source {
  margin: 14px 0 10px;
  font-size: var(--fs-sm);
  color: #c2b9aa;
}

.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.genre-chip {
  height: 28px;
  border-radius: 999px;
  background: #efb01f;
  color: #1e1204;
  padding: 0 12px;
  font-size: var(--fs-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.desc-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.show-less-btn {
  border: 0;
  background: transparent;
  color: #f2f2f2;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.info-sheet-close {
  display: none;
}

.info-sheet-backdrop {
  display: none;
}

.episode-desc.is-collapsed .detail-divider,
.episode-desc.is-collapsed .anime-info-grid,
.episode-desc.is-collapsed .detail-title,
.episode-desc.is-collapsed .detail-long,
.episode-desc.is-collapsed .detail-source,
.episode-desc.is-collapsed .genre-chips {
  display: none;
}

.episode-desc.is-collapsed .desc-footer {
  margin-top: 8px;
}

.upnext-panel {
  border-radius: 16px;
  border: 1px solid var(--panel-line);
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.upnext-panel.is-collapsed .upnext-tools,
.upnext-panel.is-collapsed .episode-list {
  display: none;
}

.upnext-head {
  padding: 16px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.upnext-head h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
}

.upnext-head p {
  margin: 2px 0 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.upnext-tools {
  padding: 0 16px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 36px);
  gap: 8px;
}

.upnext-list-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.upnext-list-toggle svg {
  width: 20px;
  height: 20px;
}

.upnext-list-toggle .icon-title {
  display: none;
}

.upnext-list-toggle.is-active .icon-thumb {
  display: none;
}

.upnext-list-toggle.is-active .icon-title {
  display: block;
}

.upnext-list-toggle.is-active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.sort-toggle-btn {
  width: 44px;
  position: relative;
  overflow: hidden;
}

.sort-toggle-btn .sort-anim {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: opacity 220ms ease, transform 220ms ease;
}

.sort-toggle-btn .sort-arrow {
  font-size: 14px;
  line-height: 1;
}

.sort-toggle-btn .sort-text.stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  line-height: 0.9;
  gap: 1px;
}

.sort-toggle-btn .sort-asc {
  opacity: 1;
  transform: translateY(0);
}

.sort-toggle-btn .sort-desc {
  opacity: 0;
  transform: translateY(6px);
}

.sort-toggle-btn.is-desc .sort-asc {
  opacity: 0;
  transform: translateY(-6px);
}

.sort-toggle-btn.is-desc .sort-desc {
  opacity: 1;
  transform: translateY(0);
}

.episode-search input {
  width: 100%;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--chip-line);
  background: var(--chip);
  color: #e8ebef;
  color-scheme: dark;
  padding: 0 12px;
  font: inherit;
  font-size: var(--fs-sm);
}

.episode-search input::placeholder {
  color: #7f8592;
}

.episode-search input:focus,
.episode-search input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: var(--chip-line);
}

.episode-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
}

.episode-list::-webkit-scrollbar {
  width: 8px;
}

.episode-list::-webkit-scrollbar-track {
  background: transparent;
}

.episode-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

.episode-empty {
  padding: 16px;
  font-size: var(--fs-sm);
  color: #9ba2af;
  border-top: 1px solid var(--panel-line);
}

.episode-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 12px;
  border-top: 1px solid var(--panel-line);
  transition: background-color 180ms ease;
}

.episode-item.active {
  background: var(--ep-accent, var(--active-ep));
}

.episode-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.episode-item.active:hover {
  background: var(--ep-accent, var(--active-ep));
}

.upnext-panel.is-compact .episode-item {
  grid-template-columns: minmax(0, 1fr);
}

.upnext-panel.is-compact .ep-thumb-wrap {
  display: none;
}

.upnext-panel.is-compact .ep-info h3 {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upnext-panel.is-compact .ep-info {
  min-width: 0;
}

.ep-thumb-wrap {
  width: 116px;
  height: 65px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #1b1b1b;
}

.ep-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-thumb-wrap span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  height: 22px;
  border-radius: 8px;
  background: #101010ca;
  color: #fff;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}

.ep-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ep-info h3 {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.35;
}

.more-like-this {
  margin-top: 18px;
}

.more-like-this h2 {
  margin: 0 0 14px;
  font-size: var(--fs-xl);
  font-weight: 600;
}

.similar-wrap {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
}

.similar-scroller {
  width: 100%;
  max-height: none;
  overflow: visible;
  padding-right: 0;
  display: grid;
  gap: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.similar-scroller::-webkit-scrollbar {
  display: none;
}

.similar-item {
  position: relative;
  display: block;
  width: 100%;
  height: 116px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1013;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.similar-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  filter: brightness(1.06);
}

.similar-banner {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.similar-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.similar-overlay {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 0 12px 0 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.82) 60%, rgba(0, 0, 0, 0.68) 100%);
}

.similar-poster {
  height: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #111319;
  flex-shrink: 0;
  align-self: stretch;
  justify-self: start;
}

.similar-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.similar-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.similar-meta h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-tags {
  display: inline-flex;
  gap: 10px;
  font-size: var(--fs-xs);
  color: #a4a9b3;
  line-height: 1;
  text-transform: uppercase;
}

@media (max-width: 1200px) {

  .crumb-link,
  .crumb-current {
    font-size: var(--fs-lg);
  }

  .watch-layout {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }

  .episode-actions {
    margin-left: 0;
  }

  .watch-topbar {
    padding: 0 16px;
  }

  .search-chip {
    width: min(320px, 100%);
  }

  .watch-page {
    font-size: 15px;
  }

  .episode-title {
    font-size: var(--fs-xl);
  }

  .anime-name {
    font-size: var(--fs-xl);
  }

  .anime-avatar {
    width: 34px;
    height: 34px;
  }

  .list-btn,
  .pill-btn {
    height: 34px;
    font-size: var(--fs-sm);
    padding: 0 12px;
  }

  .icon-btn.small {
    width: 30px;
    height: 30px;
  }

  .upnext-tools {
    grid-template-columns: minmax(0, 1fr) repeat(3, 30px);
  }

  .upnext-list-toggle {
    width: 30px;
    height: 30px;
  }

  .sort-toggle-btn {
    width: 40px;
  }

  .upnext-head h2 {
    font-size: var(--fs-base);
  }

  .upnext-head p {
    font-size: var(--fs-sm);
  }

  .episode-search input {
    height: 34px;
    font-size: var(--fs-sm);
  }

  .ep-info h3 {
    font-size: var(--fs-sm);
  }

  .more-like-this h2 {
    font-size: var(--fs-xl);
  }

  .similar-meta h3 {
    font-size: var(--fs-lg);
  }

  .similar-tags {
    font-size: var(--fs-xs);
  }
}

@media (max-width: 760px) {

  html,
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  body::-webkit-scrollbar {
    display: none;
  }

  .watch-page {
    --mobile-player-height: min(calc(100vw * 9 / 16), 56vh);
    background: #000;
  }

  .topbar {
    display: none;
  }

  .watch-layout {
    padding: 0 0 14px;
    gap: 0;
  }

  .player-wrap {
    border-radius: 0;
    border: 0;
    aspect-ratio: 16 / 10;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--mobile-player-height);
    z-index: 20;
    background: #000;
  }

  /* Match container height to fixed player so no gap in document flow */
  .player-ambilight-container {
    height: var(--mobile-player-height);
    aspect-ratio: unset;
    overflow: hidden;
  }

  /* Hide ambilight glow on mobile */
  .ambilight-aura {
    display: none;
  }

  .player-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 30;
    /* Keep above ArtPlayer (z-index: 3) and other overlays */
    border: 0;
    padding: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transform: scale(0.9);
    transform-origin: top left;
  }

  .watch-left {
    display: grid;
    gap: 0;
    padding-top: 0;
  }

  .episode-title {
    font-size: var(--fs-xl);
    line-height: 1.15;
    margin: 10px 14px 0;
  }

  .episode-title-row {
    margin: 10px 14px 0;
    gap: 5px;
  }

  .episode-title-row .episode-title {
    margin: 0;
    max-width: calc(100% - 52px);
  }

  .episode-more-btn {
    display: inline-flex;
    font-size: var(--fs-sm);
  }

  .episode-meta-line {
    display: block;
    margin: 8px 20px 0;
    color: #a6acb7;
    font-size: var(--fs-base);
    line-height: 1.2;
  }

  .watch-meta-row {
    margin: 10px 14px 0;
    gap: 8px;
    align-items: center;
  }

  .anime-name {
    font-size: var(--fs-lg);
    line-height: 1.15;
    max-width: 52vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .anime-users {
    display: block;
    font-size: var(--fs-sm);
    margin-top: 2px;
    color: #a3a8b2;
  }

  .anime-avatar {
    width: 42px;
    height: 42px;
  }

  .list-btn {
    margin-left: auto;
    height: 32px;
    padding: 0 11px;
    font-size: var(--fs-xs);
    font-weight: 500;
    background: #f4f5f6;
    border-radius: 999px;
  }

  .episode-actions {
    margin-left: 0;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .episode-actions::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    height: 32px;
    width: auto;
    min-width: 4.4rem;
    flex: 0 0 auto;
    justify-content: center;
    gap: 5px;
    border: 1px solid #1f2229;
    background: #13151a;
    font-size: var(--fs-sm);
    border-radius: 999px;
    padding: 0 0.72rem;
  }

  .pill-btn i,
  .pill-btn svg {
    width: 12px;
    height: 12px;
  }

  .server-popover {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    transform: none;
    z-index: 122;
    padding: 0 10px 10px;
  }

  .server-popover.is-down,
  .server-popover.is-up {
    top: auto;
    bottom: 0;
  }

  .server-popover.is-mobile-open {
    display: block;
  }

  .server-popover .server-popover-inner {
    position: relative;
    border-radius: 18px;
    border: 1px solid #20242e;
    background: rgba(10, 12, 16, 0.5);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.5);
    padding-top: 18px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    animation: info-sheet-up 220ms ease;
  }

  .server-popover .server-popover-inner::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
  }

  .server-sheet-backdrop.is-visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 121;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
  }

  body.server-sheet-open {
    overflow: hidden;
    touch-action: none;
  }

  .mobile-comments-card {
    display: block;
    margin: 10px 14px 0;
    border-radius: 14px;
    border: 1px solid var(--panel-line);
    background: var(--panel);
    padding: 12px;
  }

  .mobile-comments-head {
    font-size: var(--fs-lg);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
  }

  .mobile-comments-head span {
    color: #9ba3af;
    font-size: var(--fs-sm);
    margin-left: 8px;
    font-weight: 500;
  }

  .mobile-comments-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dfe4ec;
    font-size: var(--fs-sm);
  }

  .mobile-comments-item img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
  }

  .mobile-comments-item p {
    margin: 0;
  }

  .episode-desc {
    display: none;
  }

  .episode-desc.is-mobile-open {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 121;
    margin: 0;
    width: 100vw;
    max-height: 62vh;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    border: 0;
    background: rgba(18, 20, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.5);
    animation: info-sheet-up 220ms ease;
    will-change: transform, opacity;
  }

  .episode-desc.is-mobile-open::before {
    display: none;
  }

  .info-sheet-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .episode-desc.is-mobile-open .detail-tabs {
    gap: 4px;
    margin: 0 30px 6px 0;
  }

  .episode-desc.is-mobile-open .info-tab {
    height: 20px;
    padding: 0 8px;
    font-size: var(--fs-xs);
  }

  .episode-desc.is-mobile-open .episode-snippet {
    font-size: var(--fs-sm);
    line-height: 1.32;
  }

  .episode-desc.is-mobile-open .detail-divider {
    margin: 8px 0;
  }

  .episode-desc.is-mobile-open .anime-info-grid {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .episode-desc.is-mobile-open .detail-poster {
    width: 88px;
    height: 128px;
  }

  .episode-desc.is-mobile-open .detail-stats {
    gap: 8px;
  }

  .episode-desc.is-mobile-open .detail-stat span {
    font-size: var(--fs-xs);
  }

  .episode-desc.is-mobile-open .detail-stat strong {
    font-size: var(--fs-base);
  }

  .episode-desc.is-mobile-open .detail-title {
    margin: 8px 0 4px;
    font-size: var(--fs-base);
  }

  .episode-desc.is-mobile-open .detail-long,
  .episode-desc.is-mobile-open .detail-source {
    font-size: var(--fs-sm);
    line-height: 1.32;
  }

  .episode-desc.is-mobile-open .genre-chips {
    gap: 6px;
  }

  .episode-desc.is-mobile-open .genre-chip {
    height: 24px;
    padding: 0 9px;
    font-size: var(--fs-xs);
  }

  .episode-desc.is-mobile-open .desc-footer {
    margin-top: 8px;
  }

  .episode-desc.is-mobile-open .show-less-btn {
    font-size: var(--fs-sm);
  }

  .info-sheet-backdrop {
    display: none;
  }

  .info-sheet-backdrop.is-visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
  }

  body.info-sheet-open {
    overflow: hidden;
    touch-action: none;
  }

  @keyframes info-sheet-up {
    from {
      transform: translateY(16px);
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .watch-right {
    gap: 0;
    margin-top: 12px;
  }

  .mobile-filter-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 20px 14px;
    scrollbar-width: none;
  }

  .mobile-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-filter-tab {
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: #12141a;
    color: #e2e6ee;
    font: inherit;
    font-size: var(--fs-sm);
    padding: 0 14px;
    white-space: nowrap;
  }

  .mobile-filter-tab.is-active {
    background: #f2f3f4;
    color: #0f1117;
  }

  .mobile-episode-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 14px 8px;
  }

  .mobile-episode-toolbar>span {
    height: 30px;
    border-radius: 9px;
    background: #12141a;
    color: #cdd3df;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: var(--fs-xs);
  }

  .mobile-episode-toolbar-actions {
    display: flex;
    gap: 6px;
  }

  .mobile-episode-toolbar .icon-btn.small {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border-color: #232834;
    background: #12141a;
    font-size: var(--fs-xs);
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
  }

  .mobile-episode-toolbar .icon-btn.small i,
  .mobile-episode-toolbar .icon-btn.small svg {
    width: 12px;
    height: 12px;
  }

  [data-role="mobile-sort-episodes"].is-toggling {
    transform: scale(0.92);
    background: #1a1f2a;
    border-color: #313a4a;
  }

  [data-role="mobile-sort-episodes"].is-toggling i,
  [data-role="mobile-sort-episodes"].is-toggling svg {
    animation: mobile-sort-spin 260ms ease;
  }

  @keyframes mobile-sort-spin {
    0% {
      transform: rotate(0deg);
    }

    55% {
      transform: rotate(120deg);
    }

    100% {
      transform: rotate(180deg);
    }
  }

  .sort-toggle-btn {
    width: 30px;
  }

  .sort-toggle-btn .sort-anim {
    font-size: var(--fs-xs);
  }

  .upnext-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .upnext-head,
  .upnext-tools {
    display: none;
  }

  .episode-list {
    padding: 0 14px;
    gap: 6px;
    overflow: visible;
  }

  .episode-item {
    border: 0;
    border-radius: 12px;
    padding: 5px;
    gap: 6px;
    grid-template-columns: 33% minmax(0, 1fr);
    background: #101218;
    overflow: hidden;
    transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  }

  .episode-item.active {
    background: var(--ep-accent, var(--active-ep));
  }

  .episode-item:hover {
    background: #2b3140;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  }

  .episode-item.active:hover {
    background: var(--ep-accent, var(--active-ep));
  }

  .ep-thumb-wrap {
    width: 100%;
    height: 100%;
    min-height: 90px;
    border-radius: 9px;
    overflow: hidden;
  }

  .ep-thumb-wrap span {
    left: 6px;
    bottom: 6px;
    height: 20px;
    border-radius: 7px;
    font-size: var(--fs-xs);
    padding: 0 7px;
    background: rgba(16, 18, 24, 0.85);
  }

  .ep-info {
    padding: 8px 9px;
    gap: 5px;
    justify-content: flex-start;
  }

  .ep-info h3 {
    font-size: var(--fs-xs);
    line-height: 1.25;
    font-weight: 500;
  }

  .episode-item .ep-summary {
    display: -webkit-box !important;
    visibility: visible;
    opacity: 1;
    max-height: calc(1.3em * 2);
    margin: 0;
    color: #ccd2dc;
    font-size: var(--fs-xs);
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .more-like-this {
    display: none;
  }
}

@media (max-width: 420px) {
  .watch-layout {
    padding-bottom: 10px;
  }

  .list-btn {
    height: 30px;
    padding: 0 10px;
  }

  .pill-btn {
    height: 30px;
    min-width: 4.1rem;
    padding: 0 0.62rem;
  }

  .mobile-filter-tab {
    height: 34px;
    padding: 0 12px;
  }

  .mobile-episode-toolbar .icon-btn.small,
  .sort-toggle-btn {
    width: 28px;
    height: 28px;
  }

  .episode-actions {
    gap: 5px;
  }

  .episode-item {
    grid-template-columns: 39% minmax(0, 1fr);
  }

  .ep-thumb-wrap {
    min-height: 82px;
  }
}

@media (min-width: 761px) {
  .topbar {
    display: none;
  }

  .pc-header {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 74px;
    padding: 2px 44px 0;
    user-select: none;
  }

  .pc-header-left,
  .pc-header-right {
    display: flex;
    align-items: center;
  }

  .pc-header-left {
    gap: 10px;
    min-width: 0;
  }

  .pc-header-right {
    gap: 12px;
  }

  .pc-header-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: background-color 0.22s ease;
  }

  .pc-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .pc-header-btn i,
  .pc-header-btn svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.9;
  }

  .pc-brand {
    display: inline-flex;
    align-items: center;
  }

  .pc-brand .logo {
    width: 186px;
    height: 37px;
  }

  .pc-searchbar {
    width: min(380px, 42vw);
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(122, 124, 135, 0.22);
    color: rgba(234, 237, 242, 0.75);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
  }

  .pc-searchbar i,
  .pc-searchbar svg {
    width: 16px;
    height: 16px;
    color: rgba(234, 237, 242, 0.82);
    flex-shrink: 0;
  }
}