/* Homepage: cinematic hero, horizontal collections, and a quieter dark palette. */
.catalog-home {
    --bg: #111112;
    --bg2: #1b1b1e;
    --text: #f6f4f1;
    --mute: #9c9c9f;
    --line: #ffffff18;
    background: var(--bg);
}

.catalog-home .topbar {
    position: absolute;
    inset: 0 0 auto;
    z-index: 10;
    height: 88px;
    padding: 0 5vw;
    border: 0;
    background: linear-gradient(#090a0cdb, transparent);
}

.catalog-home .logo {
    font-size: 27px;
}
.catalog-home .brand-mark {
    background: #e03540;
}
.catalog-home .nav a {
    font-size: 13px;
}
.catalog-home .search {
    background: #ffffff0b;
    border: 1px solid #ffffff30;
}
.catalog-home .account-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero artwork has a solid fallback when the example remote image is unavailable. */
.catalog-hero {
    position: relative;
    min-height: 690px;
    height: min(790px, 90vh);
    display: flex;
    align-items: center;
    background: #19303b;
    isolation: isolate;
}

.catalog-hero-image,
.catalog-hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.catalog-hero-image {
    object-position: 60% 48%;
    filter: saturate(0.55) brightness(0.7);
}
.catalog-hero-shade {
    background:
        linear-gradient(0deg, #111112 0%, transparent 40%),
        linear-gradient(90deg, #0b0e12f5 0%, #0b1014b8 35%, #0b10142b 75%);
}

.catalog-hero-copy {
    width: min(650px, 60vw);
    margin: 65px 0 40px 5vw;
}
.catalog-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 4px;
    font-weight: 600;
}
.catalog-kicker b {
    font: 800 35px var(--font-h);
    color: #ed3e48;
    letter-spacing: -3px;
}
.catalog-featured-label {
    margin-top: 30px;
    color: #e2dfdb;
    font-size: 12px;
}
.catalog-featured-label span {
    display: inline-block;
    margin-right: 9px;
    padding: 4px 6px;
    border-radius: 3px;
    background: #db323e;
    font-size: 9px;
    font-weight: 800;
}
.catalog-hero h1 {
    font: 800 clamp(44px, 5.1vw, 76px)/1.02 var(--font-h);
    letter-spacing: -3px;
    max-width: 620px;
    margin: 18px 0 22px;
    text-wrap: balance;
}
.catalog-hero-meta {
    display: flex;
    gap: 14px;
    color: #c4c4c7;
    font-size: 12px;
}
.catalog-hero-meta span + span::before {
    content: "·";
    margin-right: 14px;
    color: #6f7076;
}
.catalog-synopsis {
    max-width: 475px;
    font-size: 15px;
    line-height: 1.8;
    color: #c7c8cc;
    margin: 22px 0 27px;
}
.catalog-hero-actions {
    display: flex;
    gap: 10px;
}
.catalog-watch {
    background: #f3f1ed;
    color: #121214;
    gap: 10px;
    border-radius: 5px;
    font-size: 13px;
    padding: 13px 23px;
}
.catalog-watch:hover {
    background: #d9d6d0;
}
.catalog-detail {
    background: #ffffff1b;
    color: #f4f3f1;
    border: 1px solid #ffffff1a;
    border-radius: 5px;
    gap: 10px;
    font-size: 13px;
}
.catalog-detail:hover {
    background: #ffffff2d;
}
.catalog-hero-note {
    font-size: 11px;
    color: #9c9ca2;
    margin-top: 18px;
}
.catalog-hero-index {
    position: absolute;
    right: 5vw;
    bottom: 125px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #86878e;
    font-size: 10px;
}
.catalog-hero-index span {
    color: white;
    font-size: 14px;
}
.catalog-hero-index i {
    display: block;
    width: 70px;
    height: 2px;
    background: #ffffff30;
    margin-left: 7px;
}
.catalog-hero-index i::before {
    content: "";
    display: block;
    width: 25px;
    height: 2px;
    background: #e43b46;
}

/* Rows remain scrollable with touch, keyboard, or their arrow buttons. */
.catalog-content {
    position: relative;
    margin-top: -56px;
    padding: 0 5vw 45px;
}
.catalog-genre-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
    padding: 16px 0 25px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}
.catalog-genre-nav a {
    flex-shrink: 0;
    padding: 8px 17px;
    border: 1px solid #ffffff22;
    border-radius: 30px;
    font-size: 11px;
    color: #b5b4b9;
    transition: background 0.2s;
}
.catalog-genre-nav a:hover {
    color: #fff;
    border-color: #ffffff65;
}
.catalog-genre-nav a.selected {
    background: #ece9e4;
    border-color: #ece9e4;
    color: #141416;
}
.catalog-genre-nav > span {
    margin-left: auto;
    font-size: 10px;
    color: #7f7e86;
    white-space: nowrap;
}
.catalog-section {
    margin-bottom: 38px;
    min-width: 0;
}
.catalog-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.catalog-section-head h2 {
    font: 600 23px/1.2 var(--font-h);
    letter-spacing: -0.6px;
}
.catalog-section-head p {
    font-size: 11px;
    color: #929198;
    margin-top: 8px;
}
.catalog-slider {
    position: relative;
    min-width: 0;
}

.slider-arrow {
    position: absolute;
    top: calc(50% - 27px);
    transform: translateY(-50%);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 70px;
    border: 1px solid #ffffff35;
    border-radius: 7px;
    background: #0d0d11e8;
    color: #eeeaf1;
    box-shadow: 0 5px 20px #0007;
    font-size: 17px;
}

.slider-arrow:hover {
    background: #29252fe8;
    border-color: #ffffff80;
}

.slider-arrow-prev {
    left: -21px;
}

.slider-arrow-next {
    right: -21px;
}

@media (max-width: 720px) {
    .slider-arrow {
        width: 30px;
        height: 52px;
        font-size: 13px;
    }

    .slider-arrow-prev {
        left: -12px;
    }

    .slider-arrow-next {
        right: -12px;
    }
}
.catalog-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 64px) / 5);
    gap: 16px;
    overflow-x: auto;
    padding: 3px 0 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #4a474e transparent;
}
.catalog-card {
    display: block;
    min-width: 0;
    scroll-snap-align: start;
}
.catalog-art {
    position: relative;
    aspect-ratio: 4 / 5;
    isolation: isolate;
    overflow: hidden;
    border-radius: 7px;
    background: linear-gradient(145deg, hsl(var(--poster-color) 20% 29%), #17191f);
    border: 1px solid #ffffff0c;
}
.catalog-art::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, #080b12f5, #080b1240 50%, #080b1230);
}
.catalog-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.6) brightness(0.85);
    z-index: -2;
    transition: transform 0.4s;
}
.catalog-card:hover img {
    transform: scale(1.06);
}
.catalog-original {
    position: absolute;
    top: 12px;
    left: 13px;
    font: 800 23px var(--font-h);
    color: #f34b53;
}
.catalog-original small {
    color: #e6e3df;
    font: 600 7px var(--font-b);
    vertical-align: middle;
    letter-spacing: 2px;
    margin-left: 5px;
}
.catalog-vip {
    position: absolute;
    top: 15px;
    right: 12px;
    font-size: 8px;
    border: 1px solid #e8b96870;
    color: #e8b968;
    padding: 2px 5px;
    border-radius: 3px;
}
.catalog-art-title {
    position: absolute;
    bottom: 38px;
    left: 17px;
    right: 14px;
    font: 800 clamp(20px, 1.8vw, 29px)/1.03 var(--font-h);
    letter-spacing: -0.8px;
    text-wrap: balance;
}
.catalog-episode {
    position: absolute;
    bottom: 14px;
    left: 17px;
    color: #c8c5c9;
    font-size: 9px;
    letter-spacing: 0.3px;
}
.catalog-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 42px;
    height: 42px;
    border: 1px solid #ffffff75;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #11111150;
    backdrop-filter: blur(6px);
    padding-left: 3px;
    font-size: 13px;
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity 0.2s,
        transform 0.2s;
}
.catalog-card:hover .catalog-play,
.catalog-card:focus-visible .catalog-play {
    opacity: 1;
    transform: translateY(0);
}
.catalog-card h3 {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
    margin: 10px 0 3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.catalog-card > p {
    color: #828188;
    font-size: 10px;
}
.catalog-card > p span {
    margin: 0 5px;
}
.catalog-rank {
    position: absolute;
    right: 8px;
    bottom: -7px;
    font: 800 92px/1 var(--font-h);
    color: #ffffff12;
    -webkit-text-stroke: 1px #ffffff65;
    z-index: -1;
}
.catalog-divider {
    padding: 25px 0 26px;
    margin: 6px 0 10px;
    border-top: 1px solid var(--line);
}
.catalog-divider > span,
.catalog-section-label {
    font-size: 8px;
    color: #dc6a71;
    letter-spacing: 2.5px;
    font-weight: 600;
}
.catalog-divider h2 {
    font: 600 29px var(--font-h);
    letter-spacing: -0.8px;
    margin: 9px 0 7px;
}
.catalog-divider p {
    color: #929198;
    font-size: 12px;
}
.catalog-sample-note {
    color: #6f6d76;
    font-size: 10px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}
.catalog-search-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 16px;
}
.catalog-reset {
    font-size: 11px;
    color: #bfbec6;
}
.catalog-empty {
    color: #aaa5af;
    padding: 40px 0;
}
.catalog-section-label {
    display: block;
    margin-bottom: 8px;
}
.continue-name {
    color: #85828b;
    font-size: 16px;
}
.continue-empty {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff03;
}
.continue-empty > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #ffffff24;
    border-radius: 50%;
    color: #e9515b;
    font-size: 14px;
}
.continue-empty h3 {
    font-size: 14px;
    margin-bottom: 5px;
}
.continue-empty p {
    color: #929198;
    font-size: 12px;
}
.continue-empty a {
    margin-left: auto;
    font-size: 12px;
    color: #dfd9d7;
}
.catalog-home .foot {
    background: #0d0d0f;
    border-color: var(--line);
    margin-top: 0;
}
.history-status {
    color: #e8b968;
    font-size: 12px;
    margin: 12px 5vw;
}

@media (min-width: 1600px) {
    .catalog-row {
        grid-auto-columns: calc((100% - 80px) / 6);
    }
    .catalog-search-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .catalog-home .topbar {
        padding: 0 4vw;
    }
    .catalog-hero-copy {
        width: 70vw;
        margin-left: 4vw;
    }
    .catalog-content {
        padding-left: 4vw;
        padding-right: 4vw;
    }
    .catalog-genre-nav > span {
        display: none;
    }
    .catalog-row {
        grid-auto-columns: calc((100% - 42px) / 3.5);
        gap: 14px;
    }
    .catalog-search-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .catalog-art-title {
        font-size: 24px;
    }
}

@media (max-width: 720px) {
    .catalog-home .topbar {
        height: 74px;
        position: relative;
        background: #101114;
        padding: 0 5vw;
        flex-wrap: wrap;
        gap: 8px;
    }
    .catalog-home .logo {
        font-size: 22px;
    }
    .catalog-home .tools {
        gap: 10px;
    }
    .catalog-home .search {
        display: block;
        position: absolute;
        top: 85px;
        left: 5vw;
        width: 90vw;
        z-index: 3;
        background: #11151dbb;
    }
    .catalog-home .search input {
        width: 100%;
    }
    .catalog-hero {
        min-height: 610px;
        height: auto;
    }
    .catalog-hero-copy {
        width: 90%;
        margin: 95px 5vw 105px;
    }
    .catalog-hero h1 {
        font-size: 46px;
        letter-spacing: -2px;
        max-width: 450px;
    }
    .catalog-synopsis {
        font-size: 13px;
        max-width: 360px;
    }
    .catalog-featured-label {
        margin-top: 22px;
    }
    .catalog-hero-index {
        display: none;
    }
    .catalog-content {
        margin-top: -65px;
        padding-left: 5vw;
        padding-right: 5vw;
    }
    .catalog-genre-nav {
        gap: 7px;
        margin-bottom: 27px;
    }
    .catalog-genre-nav a {
        font-size: 10px;
        padding: 7px 13px;
    }
    .catalog-row {
        grid-auto-columns: 43%;
        gap: 12px;
    }
    .catalog-section-head h2 {
        font-size: 20px;
    }
    .catalog-section-head p {
        max-width: 265px;
        line-height: 1.6;
    }
    .catalog-art-title {
        font-size: 23px;
    }
    .catalog-section {
        margin-bottom: 28px;
    }
    .catalog-original small {
        font-size: 6px;
    }
    .catalog-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 12px;
    }
    .catalog-hero-actions .btn {
        padding: 12px 16px;
        font-size: 12px;
    }
    .catalog-divider h2 {
        font-size: 25px;
    }
    .continue-empty {
        flex-wrap: wrap;
        padding: 18px;
        gap: 13px;
    }
    .continue-empty > div {
        flex: 1;
    }
    .continue-empty a {
        margin-left: 57px;
    }
    .continue-name {
        display: block;
        font-size: 13px;
        margin-top: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-card img,
    .catalog-play {
        transition: none;
    }
}
