:root {
    --bg: #090b10;
    --bg-soft: #0d1016;
    --surface: #11141b;
    --surface-2: #171b24;
    --surface-3: #1d222d;
    --text: #f5f7fb;
    --text-soft: #c3c8d2;
    --muted: #858d9d;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #ef4656;
    --accent-strong: #ff5c69;
    --accent-soft: rgba(239, 70, 86, 0.14);
    --success: #66d19e;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
    --page: min(1240px, calc(100% - 48px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 82% 8%, rgba(239, 70, 86, 0.08), transparent 26rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

svg {
    display: block;
    width: 1.2em;
    height: 1.2em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 999;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid transparent;
    background: rgba(9, 11, 16, 0.78);
    backdrop-filter: blur(20px);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: rgba(9, 11, 16, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.nav-shell {
    width: var(--page);
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.05em;
}

.brand strong {
    color: var(--accent);
    font-weight: 800;
}

.brand__mark {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--text);
    box-shadow: inset -8px -8px 0 var(--accent);
}

.brand__mark::before,
.brand__mark::after,
.brand__mark i {
    content: "";
    position: absolute;
    background: var(--bg);
}

.brand__mark::before {
    left: 8px;
    top: 7px;
    width: 5px;
    height: 18px;
}

.brand__mark::after {
    left: 8px;
    top: 7px;
    width: 14px;
    height: 5px;
}

.brand__mark i {
    left: 8px;
    top: 14px;
    width: 11px;
    height: 5px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.desktop-nav a {
    position: relative;
    padding: 10px 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    right: 11px;
    bottom: 4px;
    left: 11px;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--text);
}

.desktop-nav a.is-active::after {
    transform: scaleX(1);
}

.header-search,
.mobile-search,
.inline-filter,
.episode-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search {
    width: 250px;
    margin-left: auto;
    padding: 10px 12px;
    border-radius: 13px;
}

.header-search:focus-within,
.mobile-search:focus-within,
.inline-filter:focus-within,
.episode-filter:focus-within {
    border-color: rgba(239, 70, 86, 0.62);
    background: rgba(239, 70, 86, 0.05);
}

.header-search svg,
.mobile-search svg,
.inline-filter svg,
.episode-filter svg {
    flex: 0 0 auto;
    color: var(--muted);
}

.header-search input,
.mobile-search input,
.inline-filter input,
.episode-filter input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.inline-filter input::placeholder,
.episode-filter input::placeholder {
    color: #737b8a;
}

.header-search kbd {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    color: var(--muted);
    background: var(--surface-2);
    font-family: inherit;
    font-size: 11px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 99px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-panel {
    width: var(--page);
    margin: 0 auto;
    padding: 0 0 20px;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-panel nav {
    display: grid;
    margin-top: 12px;
    border-top: 1px solid var(--line);
}

.mobile-panel nav a {
    padding: 15px 2px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-weight: 600;
}

.mobile-search {
    padding: 12px 14px;
    border-radius: 14px;
}

.page-shell {
    width: var(--page);
    min-height: calc(100vh - 310px);
    margin: 0 auto;
    padding: 46px 0 88px;
}

.api-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding: 16px 18px;
    border: 1px solid rgba(239, 70, 86, 0.26);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.api-alert strong {
    display: block;
    margin-bottom: 4px;
}

.api-alert p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}

.api-alert button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 10px;
    padding: 9px 13px;
    background: var(--text);
    color: var(--bg);
    font-weight: 700;
    cursor: pointer;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-kicker::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.button--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 13px 32px rgba(239, 70, 86, 0.22);
}

.button--primary:hover {
    background: var(--accent-strong);
}

.button--primary svg path,
.anime-card__play svg path,
.episode-row__play svg path {
    fill: currentColor;
    stroke: none;
}

.button--ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
}

.button--ghost:hover {
    border-color: rgba(239, 70, 86, 0.45);
    background: var(--accent-soft);
}

.hero-section {
    position: relative;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.68fr);
    align-items: center;
    gap: clamp(40px, 7vw, 90px);
    overflow: hidden;
    padding: clamp(38px, 6vw, 76px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.025), transparent 45%),
        var(--surface);
    box-shadow: var(--shadow);
}

.hero-section::before {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    left: -260px;
    bottom: -260px;
    border: 90px solid rgba(239, 70, 86, 0.08);
    border-radius: 50%;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 18px 0 22px;
    font-size: clamp(48px, 6vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-copy h1 span {
    display: block;
    color: var(--muted);
    font-weight: 600;
}

.hero-copy > p {
    max-width: 650px;
    margin: 0;
    color: var(--text-soft);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 31px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-top: 42px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
}

.hero-meta div {
    display: grid;
    gap: 4px;
}

.hero-meta strong {
    font-size: 16px;
}

.hero-meta span {
    color: var(--muted);
    font-size: 11px;
}

.featured-cover {
    position: relative;
    z-index: 2;
    width: min(100%, 360px);
    justify-self: end;
    border-radius: 26px;
    box-shadow: 0 40px 85px rgba(0, 0, 0, 0.48);
    transform: rotate(2.5deg);
    transition: transform 0.35s ease;
}

.featured-cover:hover {
    transform: rotate(0deg) translateY(-7px);
}

.featured-cover__glow {
    position: absolute;
    z-index: -1;
    inset: 15% -15% -10% 15%;
    border-radius: inherit;
    background: rgba(239, 70, 86, 0.26);
    filter: blur(40px);
}

.featured-cover img {
    width: 100%;
    aspect-ratio: 2 / 2.82;
    object-fit: cover;
    border-radius: 26px;
    background: var(--surface-2);
}

.featured-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    background: linear-gradient(180deg, transparent 42%, rgba(4, 5, 8, 0.95) 100%);
}

.featured-cover__content {
    position: absolute;
    z-index: 2;
    right: 22px;
    bottom: 22px;
    left: 22px;
}

.featured-cover__content > span {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 9px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.featured-cover__content h2 {
    margin: 0;
    font-size: clamp(20px, 2vw, 29px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.featured-cover__content p {
    margin: 8px 0 0;
    color: #c6cbd5;
    font-size: 12px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
    margin: 18px 0 68px;
}

.quick-links > a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.quick-links > a:hover {
    border-color: rgba(239, 70, 86, 0.4);
    background: var(--surface-2);
    transform: translateY(-3px);
}

.quick-links__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.quick-links > a > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.quick-links strong {
    font-size: 13px;
}

.quick-links small {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-links i {
    margin-left: auto;
    color: var(--muted);
    font-style: normal;
    transition: transform 0.2s ease, color 0.2s ease;
}

.quick-links a:hover i {
    color: var(--accent-strong);
    transform: translateX(3px);
}

.content-section {
    margin-top: 66px;
}

.content-section--compact {
    margin-top: 26px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(29px, 4vw, 42px);
    letter-spacing: -0.05em;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 5px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.text-link span {
    color: var(--accent);
    transition: transform 0.2s ease;
}

.text-link:hover span {
    transform: translateX(4px);
}

.result-count {
    color: var(--muted);
    font-size: 12px;
}

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

.anime-card {
    min-width: 0;
}

.anime-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    isolation: isolate;
}

.anime-card__poster img {
    width: 100%;
    aspect-ratio: 2 / 2.84;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.2, 0.75, 0.35, 1);
}

.anime-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.52));
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.anime-card__poster:hover img {
    transform: scale(1.055);
}

.anime-card__poster:hover .anime-card__shade {
    opacity: 1;
}

.anime-card__badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    overflow: hidden;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 9px;
    background: rgba(9, 11, 16, 0.78);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anime-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.anime-card__play svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

.anime-card__poster:hover .anime-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.anime-card__body {
    padding: 13px 2px 0;
}

.anime-card__body h3 {
    overflow: hidden;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anime-card__body h3 a {
    transition: color 0.2s ease;
}

.anime-card__body h3 a:hover {
    color: var(--accent-strong);
}

.anime-card__body p {
    overflow: hidden;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 280px;
    padding: 42px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.022);
    text-align: center;
}

.empty-state--wide {
    grid-column: 1 / -1;
}

.empty-state--player {
    min-height: 500px;
    background: #06070a;
}

.empty-state svg {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    color: var(--accent);
}

.empty-state h3 {
    margin: 0;
    font-size: 20px;
}

.empty-state p {
    max-width: 460px;
    margin: 9px 0 20px;
    color: var(--muted);
    line-height: 1.65;
}

.about-strip {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
    margin-top: 90px;
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.about-strip h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.about-strip > p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

.page-heading {
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding: 36px 0 39px;
    border-bottom: 1px solid var(--line);
}

.page-heading > div:first-child {
    max-width: 780px;
}

.page-heading h1 {
    margin: 15px 0 13px;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1;
    letter-spacing: -0.065em;
}

.page-heading p {
    max-width: 650px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.inline-filter {
    width: 280px;
    flex: 0 0 auto;
    padding: 7px 7px 7px 14px;
    border-radius: 14px;
}

.inline-filter button {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.result-bar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 12px;
}

.result-bar a {
    color: var(--text-soft);
    font-weight: 650;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 52px;
}

.pagination__button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.pagination__button:hover:not(.is-disabled) {
    border-color: var(--accent);
    color: var(--text);
}

.pagination__button svg {
    width: 15px;
    height: 15px;
}

.pagination__button.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pagination__current {
    color: var(--muted);
    font-size: 12px;
}

.pagination__current strong {
    color: var(--text);
}

.search-hero {
    max-width: 930px;
    margin: 34px auto 0;
    text-align: center;
}

.search-hero .section-kicker::before {
    display: none;
}

.search-hero h1 {
    margin: 20px auto 30px;
    font-size: clamp(44px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.065em;
}

.search-hero form {
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 730px;
    margin: 0 auto;
    padding: 8px 8px 8px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-hero form svg {
    flex: 0 0 auto;
    color: var(--muted);
}

.search-hero form input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.search-hero form button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
}

.search-suggestions {
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
    margin: 58px auto 0;
}

.search-suggestions a {
    display: grid;
    gap: 7px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.search-suggestions a:hover {
    border-color: rgba(239, 70, 86, 0.45);
    transform: translateY(-3px);
}

.search-suggestions strong {
    font-size: 14px;
}

.search-suggestions span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.detail-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: -46px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #090b10;
}

.detail-hero__backdrop {
    position: absolute;
    inset: 0;
    background-image: var(--detail-image);
    background-position: center 22%;
    background-size: cover;
    opacity: 0.22;
    filter: blur(8px) saturate(0.75);
    transform: scale(1.08);
}

.detail-hero__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(9, 11, 16, 0.88), rgba(9, 11, 16, 0.66) 52%, rgba(9, 11, 16, 0.82)),
        linear-gradient(0deg, var(--bg), transparent 42%);
}

.detail-hero__inner {
    position: relative;
    z-index: 2;
    width: var(--page);
    min-height: 650px;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 80px);
    margin: 0 auto;
    padding: 90px 0 68px;
}

.detail-poster {
    position: relative;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 2.84;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.detail-poster > span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(9, 11, 16, 0.84);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 11px;
    font-weight: 750;
    text-align: center;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    color: var(--muted);
    font-size: 11px;
}

.breadcrumbs a:hover {
    color: var(--text);
}

.breadcrumbs b {
    color: var(--text-soft);
    font-weight: 600;
}

.detail-copy h1 {
    max-width: 900px;
    margin: 13px 0 7px;
    font-size: clamp(43px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.detail-copy__alt {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 22px 0;
}

.detail-stats > div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 18px;
    border-right: 1px solid var(--line);
}

.detail-stats > div:last-child {
    border-right: 0;
}

.detail-stats svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.detail-stats span {
    display: grid;
    gap: 2px;
}

.detail-stats strong {
    font-size: 13px;
}

.detail-stats small {
    color: var(--muted);
    font-size: 10px;
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.genre-list span {
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 650;
}

.synopsis {
    max-width: 820px;
    margin: 0 0 27px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.82;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 44px;
    padding-top: 72px;
}

.section-heading--episodes {
    align-items: center;
}

.episode-filter {
    width: 200px;
    padding: 10px 12px;
    border-radius: 12px;
}

.episode-filter input {
    font-size: 12px;
}

.episode-list {
    display: grid;
    gap: 9px;
}

.episode-row {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.episode-row:hover {
    border-color: rgba(239, 70, 86, 0.4);
    background: var(--surface-2);
    transform: translateX(3px);
}

.episode-row[hidden] {
    display: none;
}

.episode-row__number {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.episode-row__content {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.episode-row__content strong,
.episode-row__content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.episode-row__content strong {
    font-size: 13px;
}

.episode-row__content small {
    color: var(--muted);
    font-size: 10px;
}

.episode-row__play {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

.episode-row__play svg {
    width: 15px;
    height: 15px;
}

.anime-info-card {
    align-self: start;
    position: sticky;
    top: 100px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.anime-info-card h2 {
    margin: 9px 0 20px;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.anime-info-card dl {
    margin: 0;
}

.anime-info-card dl > div {
    display: grid;
    gap: 5px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.anime-info-card dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
    text-transform: uppercase;
}

.anime-info-card dd {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.watch-header {
    max-width: 900px;
    margin: 12px 0 25px;
}

.watch-header h1 {
    margin: 11px 0 0;
    font-size: clamp(31px, 5vw, 55px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

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

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

.player-shell iframe,
.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.player-shell video {
    object-fit: contain;
}

.player-loading {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    background: #050608;
    color: var(--muted);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-loading span {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.player-loading p {
    margin: 0;
    font-size: 11px;
}

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

.server-panel {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.server-panel h2 {
    margin: 7px 0 6px;
    font-size: 20px;
}

.server-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.server-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: start;
}

.server-list button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.server-list button span {
    color: var(--muted);
    font-size: 9px;
}

.server-list button:hover,
.server-list button.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #fff;
}

.server-list button.is-active span {
    color: var(--accent-strong);
}

.watch-sidebar__card {
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.watch-sidebar__card h2 {
    margin: 10px 0 18px;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.watch-sidebar__card ol {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.download-section {
    margin-top: 68px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.download-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.download-card:hover {
    border-color: rgba(239, 70, 86, 0.45);
    background: var(--surface-2);
    transform: translateY(-3px);
}

.download-card__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
}

.download-card > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.download-card strong,
.download-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-card strong {
    font-size: 12px;
}

.download-card small {
    color: var(--muted);
    font-size: 9px;
}

.download-card__arrow {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.page-heading--schedule {
    align-items: center;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 34px;
}

.schedule-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.schedule-card > header {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(239, 70, 86, 0.11), transparent 65%);
}

.schedule-card > header > span {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.schedule-card h2 {
    margin: 0;
    font-size: 18px;
}

.schedule-card header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.schedule-card__list {
    padding: 6px 16px 12px;
}

.schedule-card__list > a {
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
}

.schedule-card__list > a:last-child {
    border-bottom: 0;
}

.schedule-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.schedule-card__list > a > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.schedule-card__list strong,
.schedule-card__list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-card__list strong {
    font-size: 11px;
    transition: color 0.2s ease;
}

.schedule-card__list small {
    color: var(--muted);
    font-size: 9px;
}

.schedule-card__list > a > svg {
    width: 15px;
    height: 15px;
    color: var(--muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.schedule-card__list > a:hover strong,
.schedule-card__list > a:hover > svg {
    color: var(--accent-strong);
}

.schedule-card__list > a:hover > svg {
    transform: translateX(3px);
}

.schedule-empty {
    margin: 0;
    padding: 24px 2px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.error-page {
    min-height: 610px;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
}

.error-page__code {
    color: var(--accent);
    font-size: clamp(90px, 18vw, 190px);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.08em;
    opacity: 0.15;
}

.error-page h1 {
    margin: 15px 0 12px;
    font-size: clamp(37px, 6vw, 65px);
    letter-spacing: -0.06em;
}

.error-page p {
    max-width: 590px;
    margin: 0 0 26px;
    color: var(--muted);
    line-height: 1.7;
}

.error-page > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #07090d;
}

.footer-shell {
    width: var(--page);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 70px;
    margin: 0 auto;
    padding: 52px 0 38px;
}

.footer-brand p {
    max-width: 380px;
    margin: 17px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-links > div {
    display: grid;
    align-content: start;
    gap: 11px;
}

.footer-links strong {
    margin-bottom: 3px;
    color: var(--text);
    font-size: 11px;
}

.footer-links a {
    color: var(--muted);
    font-size: 10px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-strong);
}

.footer-bottom {
    width: var(--page);
    margin: 0 auto;
    padding: 19px 0;
    border-top: 1px solid var(--line);
}

.footer-bottom p {
    margin: 0;
    color: #656d7c;
    font-size: 9px;
}

@media (max-width: 1120px) {
    .desktop-nav {
        display: none;
    }

    .header-search {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-section {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 45px;
    }

    .detail-content {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 30px;
    }

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

    .watch-sidebar {
        display: none;
    }
}

@media (max-width: 900px) {
    :root {
        --page: min(100% - 32px, 1240px);
    }

    .page-shell {
        padding-top: 34px;
    }

    .hero-section {
        min-height: auto;
        grid-template-columns: minmax(0, 1fr) 250px;
        padding: 40px;
    }

    .hero-copy h1 {
        font-size: clamp(42px, 7vw, 62px);
    }

    .hero-meta {
        display: none;
    }

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

    .detail-hero__inner {
        grid-template-columns: 220px minmax(0, 1fr);
        min-height: 580px;
    }

    .detail-copy h1 {
        font-size: clamp(38px, 6vw, 58px);
    }

    .detail-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .anime-info-card {
        position: static;
        order: -1;
    }

    .anime-info-card dl {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0 18px;
    }

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

@media (max-width: 720px) {
    .nav-shell {
        min-height: 68px;
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .brand {
        font-size: 19px;
    }

    .page-shell {
        padding-bottom: 64px;
    }

    .hero-section {
        display: block;
        padding: 32px 25px 28px;
        border-radius: 24px;
    }

    .hero-copy h1 {
        margin-top: 16px;
        font-size: clamp(39px, 12vw, 58px);
    }

    .hero-copy > p {
        font-size: 14px;
    }

    .featured-cover {
        width: 210px;
        margin: 35px auto 0;
        transform: rotate(1deg);
    }

    .quick-links {
        grid-template-columns: 1fr;
        margin-bottom: 52px;
    }

    .content-section {
        margin-top: 50px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .anime-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px 11px;
    }

    .about-strip {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 65px;
        padding: 28px;
    }

    .page-heading {
        min-height: auto;
        display: grid;
        padding-top: 25px;
    }

    .page-heading h1 {
        font-size: clamp(42px, 13vw, 63px);
    }

    .inline-filter {
        width: 100%;
    }

    .search-hero {
        margin-top: 22px;
    }

    .search-hero form {
        border-radius: 15px;
    }

    .search-hero form button {
        padding: 0 13px;
        font-size: 12px;
    }

    .search-suggestions {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        margin-top: -34px;
    }

    .detail-hero__inner {
        min-height: auto;
        grid-template-columns: 125px minmax(0, 1fr);
        gap: 24px;
        padding: 64px 0 48px;
    }

    .detail-copy .breadcrumbs,
    .detail-copy__alt,
    .detail-stats,
    .detail-copy .synopsis,
    .detail-copy .button {
        display: none;
    }

    .detail-copy h1 {
        font-size: clamp(29px, 8vw, 44px);
    }

    .genre-list {
        margin-bottom: 0;
    }

    .genre-list span:nth-child(n+4) {
        display: none;
    }

    .detail-content {
        padding-top: 48px;
    }

    .anime-info-card dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-heading--episodes {
        display: grid;
    }

    .episode-filter {
        width: 100%;
    }

    .watch-header .breadcrumbs {
        margin-bottom: 18px;
    }

    .player-shell {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .server-panel {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .download-grid,
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 8px;
    }

    .pagination__button {
        padding: 0 11px;
        font-size: 10px;
    }

    .pagination__current {
        font-size: 10px;
    }

    .footer-shell {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-links {
        gap: 60px;
    }
}

@media (max-width: 480px) {
    :root {
        --page: calc(100% - 24px);
    }

    .api-alert {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .featured-cover {
        width: 190px;
    }

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

    .anime-card__body h3 {
        font-size: 13px;
    }

    .section-heading {
        display: grid;
    }

    .text-link {
        justify-self: start;
    }

    .search-hero h1 {
        font-size: 42px;
    }

    .search-hero form {
        padding-left: 13px;
    }

    .search-hero form button {
        min-width: 48px;
        overflow: hidden;
        color: transparent;
    }

    .search-hero form button::after {
        content: "Cari";
        color: #fff;
    }

    .detail-hero__inner {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 18px;
    }

    .detail-poster img {
        border-radius: 15px;
    }

    .detail-poster > span {
        display: none;
    }

    .detail-copy h1 {
        font-size: 28px;
    }

    .genre-list span {
        padding: 5px 7px;
        font-size: 8px;
    }

    .anime-info-card dl {
        grid-template-columns: 1fr 1fr;
    }

    .episode-row {
        grid-template-columns: 37px minmax(0, 1fr) 32px;
        gap: 10px;
        padding: 11px;
    }

    .episode-row__number {
        width: 34px;
        height: 34px;
    }

    .episode-row__play {
        width: 30px;
        height: 30px;
    }

    .pagination__current {
        display: none;
    }

    .footer-links {
        justify-content: space-between;
        gap: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Sanka Stream API pages */
.home-secondary-section {
    margin-top: 72px;
    padding-top: 58px;
    border-top: 1px solid var(--line);
}

.genre-strip {
    display: grid;
    grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(30px, 6vw, 85px);
    align-items: center;
    margin-top: 82px;
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 7% 18%, rgba(239, 70, 86, 0.16), transparent 34%),
        var(--surface);
}

.genre-strip h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.genre-strip__links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.genre-strip__links a {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.genre-strip__links a:hover {
    border-color: rgba(239, 70, 86, 0.62);
    background: var(--accent-soft);
    color: #fff;
    transform: translateY(-2px);
}

.genre-strip__links .genre-strip__all {
    border-color: rgba(239, 70, 86, 0.38);
    color: var(--accent-strong);
}

.page-heading--genres {
    align-items: end;
}

.genre-directory {
    margin-top: 34px;
}

.genre-directory__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 0 2px;
    color: var(--muted);
    font-size: 11px;
}

.genre-directory__header p {
    margin: 0;
}

.genre-directory__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.genre-directory__grid > a {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.genre-directory__grid > a:hover {
    transform: translateY(-3px);
    border-color: rgba(239, 70, 86, 0.52);
    background: rgba(239, 70, 86, 0.065);
}

.genre-directory__grid > a > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
}

.genre-directory__grid strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.genre-directory__grid svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.genre-directory__grid > a:hover svg {
    color: var(--accent-strong);
    transform: translateX(3px);
}

.genre-list a {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.genre-list a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #fff;
}

.watch-poster-card {
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.watch-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 2.15;
    object-fit: cover;
    object-position: center 22%;
}

.episode-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.episode-navigation > a:not(.episode-navigation__series) {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.episode-navigation > a:not(.episode-navigation__series):hover {
    border-color: rgba(239, 70, 86, 0.5);
    background: var(--accent-soft);
}

.episode-navigation > a > span {
    grid-row: 1 / 3;
    align-self: center;
    color: var(--accent-strong);
    font-size: 18px;
}

.episode-navigation small {
    color: var(--muted);
    font-size: 9px;
}

.episode-navigation strong {
    overflow: hidden;
    margin-top: 3px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.episode-navigation__series {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--text-soft);
    background: var(--surface-2);
    font-size: 10px;
    font-weight: 700;
}

.episode-navigation__next {
    text-align: right;
}

.episode-navigation__next span {
    grid-column: 2;
}

.episode-navigation__next small,
.episode-navigation__next strong {
    grid-column: 1;
}

.anime-grid--catalog .anime-card__poster img {
    filter: saturate(0.75);
}

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

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

@media (max-width: 700px) {
    .genre-directory__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .episode-navigation__series {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: center;
    }

    .watch-poster-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .genre-strip {
        margin-top: 58px;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .genre-directory__header {
        display: block;
    }

    .genre-directory__header p {
        margin-top: 5px;
    }

    .genre-directory__grid {
        gap: 8px;
    }

    .genre-directory__grid > a {
        grid-template-columns: 32px minmax(0, 1fr);
        min-height: 61px;
        padding: 10px;
    }

    .genre-directory__grid > a > span {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .genre-directory__grid svg {
        display: none;
    }

    .episode-navigation > a:not(.episode-navigation__series) {
        padding: 11px;
    }
}

/* Home genre showcase and A-Z catalog */
.genre-showcase {
    margin-top: 78px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 10%, rgba(239, 70, 86, 0.13), transparent 31%),
        var(--surface);
}

.genre-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.genre-chip-list a {
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.genre-chip-list a:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 70, 86, 0.58);
    background: var(--accent-soft);
    color: #fff;
}

.catalog-section {
    margin-top: 34px;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.alphabet-filter a {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.alphabet-filter a:hover,
.alphabet-filter a.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #fff;
}

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

.catalog-list > a {
    min-width: 0;
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.catalog-list > a:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 70, 86, 0.48);
    background: rgba(239, 70, 86, 0.055);
}

.catalog-list > a > span {
    color: var(--accent-strong);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.06em;
}

.catalog-list strong {
    overflow: hidden;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-list svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.catalog-list > a:hover svg {
    color: var(--accent-strong);
    transform: translateX(2px);
}

@media (max-width: 900px) {
    .catalog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .genre-showcase {
        margin-top: 56px;
        padding: 22px 16px;
        border-radius: 18px;
    }

    .alphabet-filter {
        gap: 6px;
        padding: 10px;
    }

    .alphabet-filter a {
        min-width: 31px;
        height: 31px;
    }

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

.watch-anime-card {
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.watch-anime-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center 22%;
}

.watch-anime-card > div {
    padding: 18px;
}

.watch-anime-card h2 {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.35;
}

.watch-anime-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.episode-navigation a.is-disabled {
    opacity: 0.42;
    pointer-events: none;
}

@media (max-width: 1120px) {
    .watch-anime-card {
        display: none;
    }
}

/* Finnime v3: multi-source interface */
.desktop-nav {
    flex: 1 1 auto;
    justify-content: center;
}

.desktop-nav a {
    padding-inline: 8px;
    font-size: 12px;
}

.api-warning {
    margin: 20px 0 0;
    padding: 13px 16px;
    border: 1px solid rgba(245, 190, 75, 0.22);
    border-radius: 12px;
    background: rgba(245, 190, 75, 0.06);
    color: var(--text-soft);
    font-size: 11px;
}

.api-warning summary {
    cursor: pointer;
    color: #f5c86b;
    font-weight: 700;
}

.api-warning p {
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: -18px 0 22px;
}

.feature-strip > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.feature-strip strong,
.feature-strip span {
    display: block;
}

.feature-strip strong {
    margin-bottom: 5px;
    color: var(--text);
    font-size: 11px;
}

.feature-strip span {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

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

.source-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 26px 0 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.source-panel h2 {
    margin: 6px 0 0;
    font-size: 16px;
    letter-spacing: -0.025em;
}

.source-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.source-filter a {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    transition: 0.2s ease;
}

.source-filter a:hover,
.source-filter a.is-active {
    border-color: rgba(239, 70, 86, 0.55);
    color: #fff;
    background: var(--accent-soft);
}

.anime-card__source {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 2;
    max-width: calc(100% - 18px);
    overflow: hidden;
    padding: 5px 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(9, 11, 16, 0.75);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 8px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anime-grid--compact {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.catalog-list > a {
    grid-template-columns: 45px minmax(0, 1fr) auto 18px;
}

.catalog-list > a > small {
    max-width: 90px;
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 26px 0 70px;
}

.schedule-day {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.schedule-day__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.schedule-day__header > span {
    color: var(--accent-strong);
    font-size: 10px;
    font-weight: 800;
}

.schedule-day__header h2 {
    margin: 0;
    font-size: 17px;
}

.schedule-day__header small {
    color: var(--muted);
    font-size: 9px;
}

.schedule-day__list {
    display: grid;
}

.schedule-day__list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.schedule-day__list > a:last-child {
    border-bottom: 0;
}

.schedule-day__list > a:hover {
    background: rgba(239, 70, 86, 0.055);
}

.schedule-day__list div {
    min-width: 0;
}

.schedule-day__list strong,
.schedule-day__list small {
    display: block;
}

.schedule-day__list strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-day__list small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.schedule-day__list > a > span {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 8px;
    font-weight: 700;
}

.server-list button small {
    margin-left: auto;
    color: var(--accent-strong);
    font-size: 8px;
    font-weight: 700;
}

@media (max-width: 1320px) and (min-width: 1121px) {
    .nav-shell {
        gap: 18px;
    }

    .header-search {
        display: none;
    }
}

@media (max-width: 1020px) {
    .feature-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quick-links--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .source-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .source-filter {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: thin;
    }

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

    .feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    .feature-strip,
    .quick-links--four {
        grid-template-columns: 1fr;
    }

    .feature-strip > div:nth-child(n+4) {
        display: none;
    }

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

    .catalog-list > a {
        grid-template-columns: 38px minmax(0, 1fr) 16px;
    }

    .catalog-list > a > small {
        display: none;
    }
}

/* Finnime Complete: clean public UI and automatic mirror controls */
.feature-strip--features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-empty {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 9px;
    padding: 28px;
    background: rgba(5, 6, 8, 0.96);
    text-align: center;
}

.player-empty[hidden] {
    display: none;
}

.player-empty strong {
    font-size: 17px;
}

.player-empty p {
    max-width: 390px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.player-empty button,
.server-refresh {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(239, 70, 86, 0.5);
    border-radius: 10px;
    background: var(--accent-soft);
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.player-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.player-toolbar button,
.player-toolbar a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text-soft);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.player-toolbar button:hover,
.player-toolbar a:hover {
    border-color: rgba(239, 70, 86, 0.48);
    background: var(--accent-soft);
    color: #fff;
}

.player-toolbar a.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.player-toolbar svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.server-panel {
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) auto;
    align-items: start;
}

.server-panel__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.server-count {
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.server-refresh:disabled {
    opacity: 0.55;
    cursor: wait;
}

.server-refresh.is-loading::after {
    content: '';
    width: 10px;
    height: 10px;
    display: inline-block;
    margin-left: 7px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: spin 0.8s linear infinite;
}

.server-list {
    grid-column: 2 / -1;
}

.server-list button {
    min-width: 132px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    text-align: left;
}

.server-list button strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-list button small {
    margin-left: 0;
    padding: 3px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.server-list button.is-active small {
    color: #fff;
    background: rgba(239, 70, 86, 0.18);
}

.server-status {
    grid-column: 2 / -1;
    min-height: 16px;
    color: var(--muted) !important;
    font-size: 9px !important;
}

.download-card__arrow {
    color: var(--muted);
    font-size: 22px;
    text-align: center;
}

@media (max-width: 1020px) {
    .feature-strip--features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .server-panel {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .server-panel > div:first-child {
        grid-column: 1;
    }

    .server-list,
    .server-status {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .player-toolbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .player-toolbar button,
    .player-toolbar a {
        min-width: 0;
        padding-inline: 8px;
    }

    .server-panel {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 16px;
    }

    .server-panel > div:first-child,
    .server-panel__actions,
    .server-list,
    .server-status {
        grid-column: 1;
    }

    .server-panel__actions {
        justify-content: space-between;
    }

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

    .server-list button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .feature-strip--features {
        grid-template-columns: 1fr;
    }

    .feature-strip--features > div:nth-child(n+4) {
        display: block;
    }

    .player-shell {
        border-radius: 15px;
    }

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

    .player-toolbar a {
        grid-column: 1 / -1;
    }

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