:root {
  --bg: #08080c;
  --bg-card: #12121a;
  --bg-hover: #1a1a26;
  --bg-input: #14141e;
  --text: #f0f0f5;
  --text-muted: #8a8a9a;
  --text-dim: #505060;
  --accent: #e63946;
  --accent-hover: #d32f3f;
  --border: #1e1e2a;
  --border-hover: #2a2a3a;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1280px;
  --nav-height: 60px;
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(230, 57, 70, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(230, 57, 70, 0.03) 0%, transparent 50%);
}

::selection {
  background: var(--accent);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

input::placeholder {
  color: var(--text-dim);
}

input:focus,
select:focus {
  border-color: var(--accent);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  position: relative;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    opacity var(--transition),
    transform var(--transition);
}

.nav-logo:hover,
.nav-logo:active {
  opacity: 0.92;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition:
    color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.12);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: background var(--transition);
}

.nav-toggle:hover,
.nav-toggle.open {
  background: var(--bg-hover);
}

.nav-toggle svg {
  display: block;
}

.nav-search-section {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  border-radius: var(--radius);
  color: #e3e3e3;
  flex-shrink: 0;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.nav-search-toggle:hover,
.nav-search-toggle.open {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.16);
}

.nav-search-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.nav-search-wrap {
  position: relative;
  width: 280px;
  transition: width 0.25s ease;
}

.nav-search-wrap:focus-within {
  width: 320px;
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.nav-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.nav-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  box-shadow: none;
}

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

.nav-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--transition),
    transform var(--transition);
}

.nav-search button:hover {
  background: var(--accent-hover);
}

.nav-search button:active {
  transform: scale(0.97);
}

.search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: rgba(16, 16, 24, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  z-index: 300;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

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

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.search-suggestion:hover,
.search-suggestion.active {
  background: var(--bg-hover);
}

.search-suggestion img {
  width: 38px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg-card);
}

.search-suggestion-info {
  overflow: hidden;
  flex: 1;
}

.search-suggestion-title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.search-suggestion-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-suggestions-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .nav-container {
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .nav-toggle {
    display: flex;
    order: 1;
  }

  .nav-logo {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  .nav-logo-img {
    height: 30px;
  }

  .nav-search-section {
    order: 3;
  }

  .nav-search-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 16, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px 14px 16px;
    gap: 4px;
    z-index: 190;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }

  .nav-links.open {
    display: flex;
    animation: navSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 14.5px;
    width: 100%;
    border-radius: var(--radius);
    border-left: 3px solid transparent;
  }

  .nav-links a:hover {
    background: var(--bg-hover);
    color: var(--text);
  }

  .nav-links a.active {
    background: var(--accent);
    color: var(--text);
    border-left-color: transparent;
  }

  .nav-search-wrap {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    width: 100% !important;
    margin: 0;
    padding: 12px 14px;
    background: rgba(10, 10, 16, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 185;
  }

  .nav-search-wrap.open {
    display: block;
    animation: navSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-search {
    width: 100%;
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 3px;
  }

  .nav-search input {
    flex: 1;
    width: 100%;
    padding: 8px 12px;
    font-size: 14.5px;
  }

  .nav-search button {
    padding: 8px 16px;
    font-size: 14px;
  }

  .search-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 14px;
    right: 14px;
    width: auto;
    max-height: calc(70vh - var(--nav-height));
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75);
  }
}

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 24px) 24px 48px;
}

.section {
  margin-bottom: 40px;
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

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

.section-title {
  font-size: 18px;
  font-weight: 600;
}

.section-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.section-link:hover {
  color: var(--accent-hover);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
}

.card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-hover);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-score {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.card-format {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.card-ep {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.card-dub {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}

.card-body {
  padding: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episodes-title {
  font-size: 16px;
  font-weight: 600;
}

.ep-range-selector {
  margin-bottom: 14px;
}

.ep-range-dropdown {
  position: relative;
  display: inline-block;
  z-index: 20;
}

.ep-range-dropdown.open {
  z-index: 60;
}

.ep-range-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 148px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  user-select: none;
}

.ep-range-dropdown-trigger:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.ep-range-dropdown-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.ep-range-dropdown-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
  background: var(--bg-hover);
}

.ep-range-dropdown-value {
  white-space: nowrap;
}

.ep-range-dropdown-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.ep-range-dropdown.open .ep-range-dropdown-chevron,
.ep-range-dropdown-trigger[aria-expanded="true"] .ep-range-dropdown-chevron {
  transform: rotate(180deg);
}

.ep-range-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  width: max-content;
  max-width: 260px;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(18, 18, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 6px;
  display: none;
  z-index: 70;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.ep-range-dropdown-menu.open {
  display: block;
  animation: epDropdownIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes epDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ep-range-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

.ep-range-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}

.ep-range-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
  white-space: nowrap;
}

.ep-range-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.ep-range-dropdown-item:focus-visible {
  outline: none;
  background: var(--bg-hover);
  color: var(--text);
}

.ep-range-dropdown-item-active {
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.ep-range-dropdown-item-active:hover {
  background: rgba(230, 57, 70, 0.18);
  color: var(--accent);
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
}

.ep-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.ep-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.ep-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ep-btn-watched {
  color: var(--accent);
  border-color: var(--accent);
}

.ep-btn-current {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--bg-hover);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-danger:hover {
  background: var(--accent);
  color: var(--text);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-pill);
}

.player-container {
  max-width: 900px;
  margin: 0 auto;
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-below-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.autonext-toggle {
  white-space: nowrap;
}

.autonext-toggle .autonext-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-dim);
  transition: background var(--transition);
}

.autonext-toggle.on .autonext-dot {
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.watch-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius);
  text-align: center;
}

.watch-countdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #60a5fa;
}

.watch-countdown-timer {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.player-wrapper .loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.player-info > div:first-child {
  min-width: 0;
}

.player-title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.player-episode {
  font-size: 14px;
  color: var(--text-muted);
}

.player-nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.player-source-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.player-source-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.player-source-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.player-source-btn-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(230, 57, 70, 0.08);
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  margin-bottom: 16px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--bg-hover);
}

.page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.page-btn-active {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.history-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.history-thumb {
  width: 60px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.history-ep {
  font-size: 13px;
  color: var(--text-muted);
}

.history-time {
  font-size: 12px;
  color: var(--text-dim);
}

.history-actions {
  flex-shrink: 0;
}

.continue-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.about {
  max-width: 720px;
  margin: 0 auto;
}

.about-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.about-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.about-connect {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.about-discord {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.about-discord-banner {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.about-discord-icon {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  background: var(--bg-card);
}

.about-discord-body {
  padding: 44px 24px 24px;
  text-align: center;
}

.about-discord-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}

.about-dev-header {
  text-align: center;
  margin-bottom: 12px;
}

.about-dev-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent);
  border: 1px solid rgba(230, 57, 70, 0.25);
  letter-spacing: 0.3px;
}

.about-discord-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.about-sep {
  opacity: 0.5;
}

.about-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.about-discord-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-discord .btn {
  display: flex;
  width: fit-content;
  margin: 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
}

.about-discord .btn:hover,
.about-discord .btn:active {
  background: var(--accent);
  box-shadow: none;
  transform: none;
}

.about-card-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.about-row {
  flex: 1;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  min-width: 0;
}

.about-row svg,
.about-row img {
  flex-shrink: 0;
}

.about-row img {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  object-fit: cover;
}

.about-social-logo {
  filter: brightness(0) invert(1);
}

.about-card-text {
  min-width: 0;
}

.about-link-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.about-link-text {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.about-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  text-align: center;
  grid-column: 1 / -1;
}

.about-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 50%;
  min-width: 280px;
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  text-align: center;
}

.about-platform-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.about-platform-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.about-platform-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 340px;
}

.about-platform-cta {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

.about-platform-cta:hover,
.about-platform-cta:active {
  background: var(--accent);
  box-shadow: none;
  transform: none;
}

.continue-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 4px;
}

.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.scroll-row::-webkit-scrollbar {
  height: 4px;
}

.scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}

.scroll-row .card {
  min-width: 160px;
  max-width: 160px;
  flex-shrink: 0;
}

.embed-error {
  padding: 10px 14px;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
}

.next-ep-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.next-ep-info {
  flex: 1;
  min-width: 0;
}

.next-ep-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #60a5fa;
  font-weight: 600;
  margin-bottom: 2px;
}

.next-ep-title {
  font-size: 14px;
  color: var(--text);
}

.next-ep-title strong {
  color: #60a5fa;
}

.next-ep-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.player-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 32px 24px;
  background: var(--bg);
}

.unavailable-icon {
  color: var(--text-dim);
  margin-bottom: 16px;
  opacity: 0.8;
}

.unavailable-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.unavailable-countdown {
  font-size: 22px;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.unavailable-text {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
}

.player-lang-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}

.lang-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn-active {
  background: var(--accent);
  color: var(--text);
}

.player-provider-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}

.provider-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.provider-btn:hover {
  color: var(--text);
}

.provider-btn-active {
  background: var(--accent);
  color: var(--text);
}

.mapping-request {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mapping-request-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.mapping-request-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.mapping-request-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mapping-request-form input {
  flex: 1;
  min-width: 180px;
  font-size: 12.5px;
}

.mapping-status {
  font-size: 12px;
  color: var(--text-muted);
}

.mapping-note {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: #93c5fd;
  line-height: 1.5;
}

.player-url-input {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.player-url-input input {
  flex: 1;
  font-size: 13px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.watchlist-progress {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.wl-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: var(--radius-pill);
  font-size: 10px;
  padding: 3px 8px;
  z-index: 2;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.wl-remove-btn:hover {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.detail-hero {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: calc((var(--nav-height) + 24px) * -1);
  padding-top: var(--nav-height);
  min-height: 420px;
  overflow: hidden;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.25;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.9) 70%,
    var(--bg) 100%
  );
}

.detail-hero-content {
  position: relative;
  padding: 32px 24px;
  display: flex;
  gap: 24px;
  align-items: flex-end;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.detail-hero-cover {
  width: 160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.detail-hero-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.detail-hero-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
}

.detail-hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.detail-hero-alt-title {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.detail-hero-tags span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.detail-hero-tags .tag-accent {
  color: var(--accent);
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.08);
}

.detail-hero-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 640px;
  margin-bottom: 16px;
}

.detail-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-body {
  padding-bottom: 40px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.detail-stat {
  flex: 1;
  min-width: 100px;
  padding: 14px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.detail-stat:last-child {
  border-right: none;
}

.detail-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 600;
}

.detail-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.detail-stat-value.accent {
  color: var(--accent);
}

.detail-stat-value.green {
  color: #4ade80;
}

.detail-stat-value.blue {
  color: #60a5fa;
}

.detail-section {
  margin-bottom: 32px;
  overflow: visible;
}

.episodes-section {
  margin-top: 24px;
  overflow: visible;
}

.detail-section-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-synopsis {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

.detail-synopsis.expandable {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.detail-synopsis.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.ep-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.ep-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-hover);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.ep-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-pill);
  transition: width 0.5s ease;
}

.ep-progress-text {
  font-weight: 500;
}

.ep-btn-aired {
  color: var(--text-muted);
  border-color: var(--border);
}

.ep-btn-aired:hover {
  border-color: var(--accent);
  color: var(--text);
}

.ep-btn-upcoming {
  color: var(--text-dim);
  border-color: transparent;
  background: var(--bg);
  cursor: default;
  opacity: 0.5;
}

.ep-btn-upcoming:hover {
  border-color: transparent;
  color: var(--text-dim);
  transform: none;
  box-shadow: none;
}

.ep-btn-today {
  border-color: #4ade80;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.06);
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%,
  100% {
    border-color: #4ade80;
  }
  50% {
    border-color: rgba(74, 222, 128, 0.3);
  }
}

.ep-air-date {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 2px;
  line-height: 1.2;
}

.ep-air-date.upcoming-date {
  color: #60a5fa;
}

.ep-air-date.today-date {
  color: #4ade80;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.status-badge.finished {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.15);
}

.status-badge.airing {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.15);
}

.status-badge.upcoming {
  color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.15);
}

.status-badge.dim {
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
}

.related-section .scroll-row .card {
  min-width: 150px;
  max-width: 150px;
}

.related-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}

.hero-slideshow {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: calc((var(--nav-height) + 24px) * -1);
  padding-top: var(--nav-height);
  height: 460px;
  overflow: hidden;
  margin-bottom: 40px;
  touch-action: pan-y;
  content-visibility: auto;
  contain-intrinsic-size: auto 460px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  opacity: 0.85;
  transition: transform 7s ease;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1.06);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.35) 0%,
    rgba(10, 10, 10, 0.88) 65%,
    var(--bg) 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.hero-rank {
  font-size: 150px;
  font-weight: 800;
  line-height: 0.75;
  font-style: italic;
  letter-spacing: -6px;
  color: var(--accent);
  opacity: 0.9;
  flex-shrink: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: -10px;
}

.hero-slide-main {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.hero-slide-cover {
  width: 130px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.hero-slide-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.hero-slide-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 6px;
}

.hero-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4ade80;
  margin-bottom: 8px;
}

.hero-slide-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.hero-slide-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.hero-slide-tags span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  white-space: nowrap;
}

.hero-slide-tags .tag-accent {
  color: var(--accent);
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.08);
}

.hero-slide-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 620px;
  margin-bottom: 10px;
}

.hero-slide-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.hero-slide-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.hero-slideshow:hover .hero-arrow {
  opacity: 1;
}

.hero-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

.hero-arrow.prev {
  left: 16px;
}

.hero-arrow.next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: var(--radius-pill);
}

@media (max-width: 768px) {
  .hero-slideshow {
    width: calc(100% + 24px);
    margin-left: -12px;
    margin-top: calc((var(--nav-height) + 16px) * -1);
    padding-top: 0;
    height: 420px;
  }

  .hero-slide {
    align-items: flex-start;
  }

  .hero-slide-content {
    height: 100%;
    padding: 24px 16px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }

  .hero-rank {
    position: absolute;
    top: 24px;
    left: 16px;
    z-index: 3;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    font-style: normal;
    letter-spacing: 0;
    margin: 0;
    opacity: 1;
    color: #fff;
    background: var(--accent);
    padding: 5px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    text-shadow: none;
  }

  .hero-slide-overlay {
    background: linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.42) 0%,
      rgba(10, 10, 10, 0.6) 60%,
      var(--bg) 100%
    );
  }

  .hero-slide-main {
    width: 100%;
    gap: 16px;
    align-items: center;
  }

  .hero-slide-cover {
    width: 92px;
  }

  .hero-slide-info {
    min-width: 0;
  }

  .hero-slide-badge {
    height: 15px;
    overflow: hidden;
  }

  .hero-slide-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    font-size: 18px;
    margin-bottom: 8px;
  }

  .hero-slide-tags {
    flex-wrap: wrap;
    overflow: hidden;
    min-height: 22px;
    max-height: 66px;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 8px;
  }

  .hero-slide-desc {
    height: 39px;
    font-size: 12px;
    margin-bottom: 8px;
  }

  .hero-slide-meta {
    font-size: 11px;
    margin-bottom: 10px;
    overflow-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .hero-slide-actions {
    gap: 8px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    bottom: 12px;
  }

  .detail-hero {
    width: calc(100% + 24px);
    margin-left: -12px;
    min-height: 360px;
  }

  .detail-hero-content {
    padding: 24px 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-hero-cover {
    width: 100px;
    border-radius: var(--radius);
  }

  .detail-hero-title {
    font-size: 22px;
  }

  .detail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-stat {
    min-width: 0;
    padding: 12px 10px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .detail-stat:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .detail-stat:last-child {
    border-bottom: none;
  }

  .detail-stat-label {
    font-size: 9px;
  }

  .detail-stat-value {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 0 12px;
  }

  .main {
    padding: calc(var(--nav-height) + 16px) 12px 32px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .player-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .continue-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-btn {
    padding: 5px 12px;
    font-size: 12px;
  }

  .provider-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}

@media (min-width: 769px) {
  .about-connect {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .card-body {
    padding: 6px;
  }

  .card-title {
    font-size: 12px;
  }

  .btn {
    padding: 6px 14px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
  }
}

@media (hover: none) {
  .nav,
  .nav-links {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav {
    background: rgba(8, 8, 12, 0.97);
  }

  .nav-links {
    background: rgba(18, 18, 26, 0.98);
  }

  .card-score,
  .card-ep,
  .related-badge,
  .wl-remove-btn,
  .hero-arrow {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(8, 8, 12, 0.92);
  }

  .card:hover,
  .card:active {
    transform: none;
    box-shadow: none;
    background: var(--bg-card);
    border-color: var(--border);
  }

  .card:hover .card-image img {
    transform: none;
  }

  .btn:hover,
  .btn-primary:hover,
  .btn-outline:hover {
    transform: none;
  }

  .btn-outline:hover {
    border-color: var(--border);
    color: var(--text-muted);
    background: transparent;
  }

  .btn-danger:hover {
    transform: none;
    background: transparent;
    color: var(--accent);
  }

  .ep-btn:hover {
    transform: none;
  }

  .ep-btn-aired:hover {
    border-color: var(--border);
    color: var(--text-muted);
  }

  .hero-slide-bg {
    transition: none;
  }

  .hero-slide.active .hero-slide-bg {
    transform: none;
  }

  .history-item:hover {
    background: var(--bg-card);
    border-color: var(--border);
  }

  .nav-links a:hover {
    background: transparent;
    color: var(--text-muted);
  }

  .page-btn:hover {
    background: var(--bg-card);
    color: var(--text-muted);
    border-color: var(--border);
  }

  .player-source-btn:hover {
    border-color: var(--border);
    color: var(--text-muted);
  }

  .lang-btn:hover {
    color: var(--text-muted);
  }

  .provider-btn:hover {
    color: var(--text-muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide-bg,
  .hero-slide-badge::before,
  .ep-btn-today,
  .card,
  .btn,
  .ep-btn,
  .hero-arrow,
  .hero-dot {
    animation: none !important;
    transition: none !important;
  }

  .hero-slide.active .hero-slide-bg {
    transform: none;
  }
}

.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 8, 12, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notice-card {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.notice-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.notice-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.notice-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.brave-notice {
  margin-top: 18px;
  padding: 18px;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(252, 80, 37, 0.14) 0%, transparent 55%),
    linear-gradient(
      135deg,
      rgba(252, 80, 37, 0.08) 0%,
      rgba(255, 26, 57, 0.06) 50%,
      rgba(18, 18, 26, 0.95) 100%
    );
  border: 1px solid rgba(255, 84, 48, 0.18);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brave-notice::before {
  content: "";
  position: absolute;
  top: -32px;
  right: -28px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(252, 80, 37, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.brave-notice-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
  position: relative;
}

.brave-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.brave-notice-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.2px;
}

.brave-notice-title span {
  background: linear-gradient(90deg, #ff4b2b 0%, #ff1a39 45%, #fb542b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brave-notice-desc {
  font-size: 12.8px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  margin-top: 4px;
  position: relative;
}

.brave-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.brave-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    filter 0.2s ease;
  border: 1px solid transparent;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  letter-spacing: -0.1px;
  min-width: 0;
}

.brave-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  filter: brightness(1.04);
}

.brave-link:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.brave-link:focus-visible {
  outline: 2px solid #fb542b;
  outline-offset: 2px;
}

.brave-link-windows {
  background: #0078d4;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 2px 10px rgba(0, 120, 212, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.15);
}

.brave-link-windows:hover {
  background: #0a6dc2;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 8px 22px rgba(0, 120, 212, 0.38),
    0 1px 2px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.brave-link-apple {
  background: #000;
  color: #fff;
  border-color: #2a2a30;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

.brave-link-apple:hover {
  background: #1c1c1e;
  border-color: #3a3a40;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.brave-link-play {
  background: #ffffff;
  color: #1f2430;
  border-color: #e6e8eb;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.brave-link-play:hover {
  background: #f8fafc;
  border-color: #d6dae0;
  color: #111827;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.brave-link svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: block;
}

.brave-link-play svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .brave-links {
    flex-direction: column;
  }
  .brave-link {
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
  }
}

.skeleton {
  background: var(--bg-hover);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.skeleton-card .card-image.skeleton {
  aspect-ratio: 3 / 4;
  border-radius: 0;
  background: var(--bg-hover);
}

.skeleton-card .card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-hero {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: calc((var(--nav-height) + 24px) * -1);
  padding-top: var(--nav-height);
  height: 460px;
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--bg);
}

.skeleton-hero .hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 1;
  visibility: visible;
}

.skeleton-hero .hero-slide-bg.skeleton {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background: var(--bg-hover);
  border-radius: 0;
}

.skeleton-hero .hero-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.skeleton-hero .hero-rank.skeleton {
  width: 80px;
  height: 120px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-hero .hero-slide-cover.skeleton {
  width: 130px;
  height: 173px;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .skeleton-hero {
    width: calc(100% + 24px);
    margin-left: -12px;
    margin-top: calc((var(--nav-height) + 16px) * -1);
    padding-top: 0;
    height: 420px;
  }

  .skeleton-hero .hero-slide-content {
    height: 100%;
    padding: 24px 16px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }

  .skeleton-hero .hero-rank.skeleton {
    position: absolute;
    top: 24px;
    left: 16px;
    width: 60px;
    height: 32px;
    border-radius: 12px;
  }

  .skeleton-hero .hero-slide-cover.skeleton {
    width: 92px;
    height: 123px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none !important;
  }
}

.skeleton-detail-hero {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: calc((var(--nav-height) + 24px) * -1);
  padding-top: var(--nav-height);
  min-height: 420px;
  overflow: hidden;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
}

.skeleton-detail-hero .detail-hero-content {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

.skeleton-detail-cover {
  width: 160px;
  height: 213px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.skeleton-stats {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.skeleton-stats .skeleton-stat {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  border-right: 1px solid var(--border);
}

.skeleton-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.skeleton-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.skeleton-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.skeleton-episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.skeleton-about {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 768px) {
  .skeleton-detail-hero {
    width: calc(100% + 24px);
    margin-left: -12px;
    min-height: 360px;
  }

  .skeleton-detail-hero .detail-hero-content {
    padding: 24px 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .skeleton-detail-cover {
    width: 100px;
    height: 133px;
  }

  .skeleton-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .skeleton-stats .skeleton-stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* ---- Delayed content locker (silent 2-min timer, direct og_load) ---- */
.locker-blocked{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;font-size:14px;color:var(--text-muted);background:#000}
