:root {
    color-scheme: dark;
    --bg: #0d1017;
    --panel: #171c26;
    --panel-soft: #121721;
    --text: #f3f5f8;
    --muted: #97a0b2;
    --line: #29303e;
    --accent: #b8f36c;
    --accent-dark: #17260a;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

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

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

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
    opacity: 0.45;
}

button,
select {
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
}

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

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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.35;
}

h2 {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.6px;
}

h3 {
    font-size: 17px;
    font-weight: 600;
}

p {
    margin-bottom: 16px;
}

.container {
    width: calc(100% - 80px);
    max-width: 1360px;
    margin-inline: auto;
}

.icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
    vertical-align: -4px;
}

.site-header {
    border-bottom: 1px solid #202631;
    background: #0f131b;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 88px;
}

.brand {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 1px;
    margin: 0;
    white-space: nowrap;
}

.brand a {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: 8px;
}

.search-form {
    display: flex;
    width: 350px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 24px;
    margin-left: auto;
    background: #1a202b;
    overflow: hidden;
}

.search-form input {
    min-width: 0;
    flex: 1;
    padding: 8px 18px;
    background: transparent;
    border: 0;
    color: var(--text);
    font-size: 14px;
}

.search-form input::placeholder {
    color: #9099aa;
}

.search-form button {
    border: 0;
    background: transparent;
    padding: 0 16px;
}

.header-action {
    font-size: 14px;
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
    color: #c4cad5;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 35px;
    min-height: 58px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 0 17px;
    position: relative;
    white-space: nowrap;
    color: #adb5c4;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent);
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
    bottom: 0;
    left: 20%;
    right: 20%;
}

.hero {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 28px;
    height: auto;
    aspect-ratio: 2.45;
    min-height: 460px;
    max-height: 560px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 18px;
    background: #222936;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-position: 65% 40%;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 14, 22, 0.98) 0%, rgba(8, 14, 22, 0.8) 29%, rgba(8, 14, 22, 0.08) 80%), linear-gradient(0deg, rgba(8, 14, 22, 0.65), transparent 60%);
}

.hero-copy {
    position: absolute;
    left: 4.5%;
    top: 50%;
    transform: translateY(-54%);
    width: 44%;
    max-width: 550px;
}

.eyebrow {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-copy h2 {
    font-size: clamp(36px, 4vw, 58px);
    letter-spacing: 2px;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.hero-meta {
    font-size: 14px;
    color: #ced4df;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-synopsis {
    color: #b8c0ce;
    line-height: 1.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 26px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    border-radius: 8px;
    border: 1px solid transparent;
    min-height: 45px;
    padding: 10px 23px;
    font-size: 15px;
    font-weight: 600;
    transition: filter 0.2s, background 0.2s;
    text-align: center;
}

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

.primary:hover {
    color: #172109;
    filter: brightness(1.08);
}

.secondary {
    background: #202735;
    color: var(--text);
    border-color: #343d4e;
}

.glass {
    background: #ffffff14;
    border-color: #ffffff35;
    color: white;
    backdrop-filter: blur(10px);
}

.hero-caption {
    position: absolute;
    right: 4%;
    bottom: 82px;
    text-align: right;
    font-family: Georgia, serif;
    font-size: 24px;
    text-shadow: 0 2px 12px #000;
    max-width: 40%;
}

.hero-caption span {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    margin-top: 6px;
}

.hero-controls {
    position: absolute;
    z-index: 2;
    bottom: 22px;
    left: 4.5%;
    right: 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-controls > div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-controls button {
    border-radius: 50%;
    height: 34px;
    width: 34px;
    border-color: #ffffff33;
    background: #10162099;
    padding: 0;
}

.hero-controls button.dot {
    width: 8px;
    height: 8px;
    background: #ffffff55;
    border: 0;
}

.hero-controls button.dot.active {
    width: 26px;
    border-radius: 5px;
    background: var(--accent);
}

.discovery-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    color: #c4cad4;
    margin: 22px 0 45px;
    padding: 15px 20px;
    border: 1px solid #232b37;
    border-radius: 10px;
    font-size: 14px;
}

.discovery-strip > span:first-child {
    color: var(--accent);
    padding-right: 22px;
    border-right: 1px solid var(--line);
}

.strip-note {
    margin-left: auto;
    color: #768095;
    letter-spacing: 3px;
    font-size: 12px;
}

.content-section {
    margin-block: 48px;
}

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

.section-head h2,
.content-section > h2 {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 7px;
}

.section-head h2 .icon,
.content-section > h2 .icon {
    color: var(--accent);
    width: 24px;
    height: 24px;
}

.section-head p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.more {
    color: var(--muted);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 26px 20px;
}

.card {
    min-width: 0;
}

.poster {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #252d3c;
    isolation: isolate;
}

.poster::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, #070a11cc);
    pointer-events: none;
    z-index: 0;
}

.poster img {
    width: 100%;
    height: 100%;
    aspect-ratio: 2 / 3;
    transition: transform 0.35s ease;
    color: #aeb8ca;
    font-size: 14px;
    text-align: center;
}

.card a:hover img {
    transform: scale(1.045);
}

.quality {
    position: absolute;
    top: 9px;
    left: 9px;
    background: #0d111ccc;
    border: 1px solid #ffffff26;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    color: #edf0f5;
}

.poster-status {
    position: absolute;
    bottom: 9px;
    right: 11px;
    color: #e1e6ef;
    font-size: 12px;
    z-index: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #18220d;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.card a:hover .card-play,
.card a:focus-visible .card-play {
    opacity: 1;
}

.card h3 {
    margin: 13px 0 6px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 16px;
}

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

.meta span {
    float: right;
    color: #9bad82;
    font-size: 12px;
}

.card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.7;
    height: 44px;
    color: #8a95a8;
    margin: 8px 0 0;
}

.home-page main > .content-section .card-description {
    display: none;
}

.editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: linear-gradient(115deg, #172937, #151d2a);
    padding: 34px 48px;
    border: 1px solid #2a3f50;
    border-radius: 16px;
    align-items: center;
    gap: 60px;
}

.editorial h2 {
    font-size: 38px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.editorial p:not(.eyebrow) {
    color: var(--muted);
}

.editorial-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 410px;
    justify-self: end;
    width: 100%;
    gap: 20px;
}

.editorial-cards .poster {
    max-height: 245px;
}

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

.rank-panel {
    padding: 23px;
    background: var(--panel-soft);
    border: 1px solid #252d3a;
    border-radius: 12px;
}

.rank-panel > h3 {
    border-bottom: 1px solid #2c3441;
    padding-bottom: 15px;
    color: #c8d8bd;
}

.rank-row {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 13px 0;
    min-width: 0;
}

.rank-row > div {
    min-width: 0;
}

.rank-number {
    font-family: Georgia, serif;
    font-size: 29px;
    font-style: italic;
    color: var(--accent);
    flex: 0 0 auto;
}

.rank-row h3 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.rank-row p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 0;
}

.rank-row > .icon {
    width: 17px;
    margin-left: auto;
    color: #69778d;
}

.update-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 45px;
    border-block: 1px solid var(--line);
    padding: 30px 0;
}

.update-section p:not(.eyebrow) {
    color: var(--muted);
    font-size: 14px;
}

.update-row {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #202835;
}

.update-row span,
.update-row small {
    color: var(--muted);
    font-size: 13px;
}

.update-row small {
    margin-left: auto;
}

.about-section {
    padding: 20px 0;
    max-width: 900px;
}

.about-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.about-section > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 2;
}

.mobile-banner {
    background: #1a2424;
    border: 1px solid #34413c;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    gap: 26px;
    align-items: center;
    margin-top: 60px;
    margin-bottom: 45px;
}

.mobile-emblem {
    display: grid;
    place-items: center;
    width: 75px;
    height: 90px;
    border: 1px solid #60764c;
    border-radius: 18px;
    background: #b8f36c12;
    flex: 0 0 auto;
}

.mobile-emblem .icon {
    width: 45px;
    height: 45px;
    color: var(--accent);
}

.mobile-banner .eyebrow {
    margin-bottom: 8px;
    font-size: 12px;
}

.mobile-banner h2 {
    font-size: 23px;
    margin-bottom: 8px;
}

.mobile-banner p:not(.eyebrow) {
    font-size: 13px;
    color: #a4b1ad;
    margin-bottom: 0;
    max-width: 620px;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.mobile-actions .button {
    font-size: 14px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 15px 0 32px;
}

.footer-top p {
    color: #858fa1;
    font-size: 13px;
    margin-top: 22px;
}

.footer-top nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    font-size: 14px;
    color: #9fa9ba;
    align-content: center;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0 30px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: #7e889b;
}

.breadcrumbs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: #9ca6b6;
    font-size: 14px;
    margin: 28px 0;
}

.breadcrumbs span {
    color: #546176;
}

.page-heading {
    margin: 36px 0;
    max-width: 830px;
}

.page-heading h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.page-heading p:not(.eyebrow) {
    color: var(--muted);
}

.page-heading .eyebrow {
    margin-bottom: 10px;
}

.category-feature {
    border: 1px solid #2d3949;
    background: #171e2a;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 14px;
    overflow: hidden;
}

.category-feature > div {
    padding: 28px 36px;
}

.category-feature > img {
    width: 100%;
    height: 100%;
    max-height: 270px;
    aspect-ratio: 16 / 9;
}

.category-feature p:not(.eyebrow) {
    color: var(--muted);
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-block: 15px;
    border-block: 1px solid var(--line);
    margin: 15px 0;
}

.filters button {
    border: 1px solid transparent;
    background: transparent;
    padding: 6px 18px;
    border-radius: 6px;
    color: #b4bdcd;
    min-height: 40px;
    font-size: 14px;
}

.filters button.active {
    color: var(--accent);
    border-color: #71984970;
    background: #b8f36c10;
}

.sort-label {
    font-size: 14px;
    color: var(--muted);
}

select {
    padding: 8px;
    margin-left: 12px;
    border-radius: 6px;
    max-width: 100%;
}

.result-count {
    font-size: 14px;
    color: var(--muted);
    margin-block: 20px;
}

.list-end {
    text-align: center;
    padding: 30px 0;
    margin-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: #8793a8;
}

.list-end a {
    color: var(--accent);
}

.detail-hero {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 44px;
    padding: 28px;
    background: linear-gradient(120deg, #1e2936, #141923);
    border: 1px solid #2b3745;
    border-radius: 16px;
}

.detail-poster img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    background: #2b3648;
    border-radius: 10px;
}

.detail-hero h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.detail-hero .eyebrow {
    margin-bottom: 10px;
}

.alias {
    color: #a6b1c2;
}

.details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 25px;
    font-size: 14px;
    margin-block: 22px;
}

.details div {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.details dt {
    color: #8e9aaf;
    flex: 0 0 auto;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.small-note {
    color: #96a2b7;
    font-size: 13px;
    margin: 16px 0 0;
}

.episodes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.episode {
    padding: 10px 22px;
    background: #1d2533;
    border: 1px solid #303c4f;
    border-radius: 7px;
    font-size: 14px;
}

.episode:hover,
.episode.active {
    color: var(--accent);
    background: #253222;
    border-color: #69864c;
}

.prose {
    line-height: 2;
}

.prose p {
    color: #aeb9ca;
}

.stills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.stills img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: #263143;
}

.adjacent {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}

.ranking-item {
    display: grid;
    grid-template-columns: 40px 100px 1fr auto;
    gap: 25px;
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 25px;
    margin: 18px 0;
}

.ranking-item img {
    border-radius: 7px;
    aspect-ratio: 2 / 3;
}

.ranking-item h2 {
    font-size: 23px;
    margin-bottom: 10px;
}

.ranking-item p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.tag {
    font-size: 12px;
    color: var(--accent);
}

.info-prose {
    max-width: 920px;
    padding: 35px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
}

.info-prose a:not(.button) {
    color: var(--accent);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 20px);
    padding: 14px 22px;
    width: max-content;
    max-width: calc(100% - 32px);
    background: #e0eacb;
    color: #1b2811;
    border-radius: 10px;
    box-shadow: 0 8px 40px #0008;
    opacity: 0;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 50;
}

.toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

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

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

[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
