:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-panel: rgba(41, 37, 36, 0.82);
    --line: rgba(217, 119, 6, 0.32);
    --text: #fef3c7;
    --text-soft: rgba(254, 243, 199, 0.72);
    --muted: rgba(245, 158, 11, 0.72);
    --accent: #f59e0b;
    --accent-deep: #b45309;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.17), transparent 34rem),
        linear-gradient(180deg, #0c0a09 0%, #1c1917 48%, #0c0a09 100%);
}

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

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

img.is-missing {
    opacity: 0;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    width: min(var(--container), calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-logo__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 50%;
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.34);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    white-space: nowrap;
}

.site-nav a,
.mobile-nav a {
    color: var(--text-soft);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.mobile-nav a:hover {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(41, 37, 36, 0.9);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav.is-open {
    display: grid;
}

.mobile-nav a {
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 12px;
    background: rgba(41, 37, 36, 0.66);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #0c0a09;
}

.hero__slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-position: center right;
    background-size: cover;
    transform: scale(1.02);
    transition: opacity 0.75s ease, visibility 0.75s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-slide__content {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding-top: 52px;
    max-width: 760px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #d97706, #b45309);
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(180, 83, 9, 0.24);
}

.hero h1,
.detail-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    color: #ffffff;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-slide__desc,
.detail-copy__line {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(18px, 2.1vw, 23px);
    line-height: 1.65;
}

.hero-slide__meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-slide__meta span,
.detail-meta span,
.detail-tags span,
.movie-card__tags span,
.inline-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(41, 37, 36, 0.7);
}

.hero-slide__actions,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button,
.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 900;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button--primary,
.search-form button {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.button--ghost {
    color: #fef3c7;
    border: 1px solid var(--line);
    background: rgba(41, 37, 36, 0.74);
}

.hero__shade {
    position: absolute;
    inset: auto 0 0;
    height: 190px;
    background: linear-gradient(180deg, transparent, #0c0a09);
    pointer-events: none;
}

.hero__dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero__dots button {
    width: 46px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(254, 243, 199, 0.32);
    cursor: pointer;
}

.hero__dots button.is-active {
    background: #fbbf24;
}

.page-shell {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

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

.search-panel,
.content-section,
.detail-content,
.player-section,
.category-card,
.page-title {
    border: 1px solid rgba(245, 158, 11, 0.17);
    background: linear-gradient(180deg, rgba(41, 37, 36, 0.78), rgba(28, 25, 23, 0.78));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-panel {
    padding: 22px;
    margin-bottom: 38px;
}

.search-form__label {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.search-form__row {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    min-height: 48px;
    color: var(--text);
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    background: rgba(12, 10, 9, 0.72);
    outline: none;
}

.search-form input {
    padding: 0 18px;
}

.search-form select {
    padding: 0 14px;
}

.filter-empty {
    margin: 14px 0 0;
    color: #fecaca;
}

.content-section {
    padding: 28px;
    margin-bottom: 42px;
}

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

.section-heading h2,
.page-title h1,
.detail-content h2,
.player-section h2 {
    margin: 10px 0 0;
    color: #ffffff;
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-link {
    color: #fbbf24;
    font-weight: 900;
}

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

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

.movie-grid--related {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.14);
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.62);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(245, 158, 11, 0.24), transparent 52%),
        linear-gradient(150deg, #292524, #0c0a09);
}

.movie-card__poster img,
.rank-item__thumb img,
.detail-poster img,
.category-card__covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.06);
}

.movie-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: #fbbf24;
}

.movie-card__body {
    padding: 14px;
}

.movie-card__title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card__meta,
.movie-card__desc,
.rank-item p,
.page-title p,
.category-card p,
.detail-content p,
.site-footer p {
    color: var(--text-soft);
    line-height: 1.72;
}

.movie-card__meta {
    min-height: 42px;
    margin: 9px 0;
    font-size: 13px;
}

.movie-card__desc {
    display: -webkit-box;
    min-height: 64px;
    margin: 0 0 12px;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card__tags,
.inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.category-grid,
.category-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.category-tile {
    min-height: 132px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at right top, rgba(245, 158, 11, 0.24), transparent 60%),
        rgba(12, 10, 9, 0.58);
}

.category-tile span,
.category-card h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 50px 68px 1fr;
    gap: 13px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(245, 158, 11, 0.14);
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.56);
}

.rank-item__number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #111827;
    font-weight: 900;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
}

.rank-item__thumb {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(150deg, #292524, #0c0a09);
}

.rank-item__title {
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-item p,
.rank-item span {
    margin: 6px 0 0;
    font-size: 13px;
}

.rank-item span {
    color: var(--muted);
}

.page-title {
    padding: 34px;
    margin-bottom: 28px;
}

.page-title p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--text-soft);
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

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

.category-card {
    overflow: hidden;
}

.category-card__covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 220px;
    background: linear-gradient(150deg, #292524, #0c0a09);
}

.category-card__body {
    padding: 24px;
}

.category-card h2 {
    margin: 0 0 10px;
}

.detail-hero {
    min-height: 620px;
    display: flex;
    align-items: center;
    background-position: center right;
    background-size: cover;
    border-bottom: 1px solid var(--line);
}

.detail-hero__inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
}

.detail-hero__grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 26px;
    background: linear-gradient(150deg, #292524, #0c0a09);
    box-shadow: var(--shadow);
}

.detail-copy__line {
    max-width: 780px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
}

.player-section {
    padding: 28px;
}

.video-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 22px;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.1), transparent 52%),
        #000000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.video-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.video-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle at center, rgba(12, 10, 9, 0.12), rgba(12, 10, 9, 0.82));
    cursor: pointer;
}

.video-play span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    color: #111827;
    font-size: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.38);
}

.video-play strong {
    font-size: 18px;
}

.video-stage.is-playing .video-play {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    padding: 34px;
}

.detail-content section + section {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid rgba(245, 158, 11, 0.16);
}

.detail-content h2 {
    margin-bottom: 14px;
    font-size: 28px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.info-list div {
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.14);
    border-radius: 16px;
    background: rgba(12, 10, 9, 0.5);
}

.info-list dt {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.info-list dd {
    margin: 0;
    color: #ffffff;
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #0c0a09, #050505);
}

.site-footer__inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fbbf24;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: var(--text-soft);
}

.footer-links a:hover {
    color: #ffffff;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .site-nav {
        gap: 12px;
        font-size: 14px;
    }

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 620px;
    }

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

    .movie-grid,
    .movie-grid--compact,
    .movie-grid--related {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .category-card-grid,
    .rank-grid,
    .rank-list,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .detail-hero__grid {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 700px) {
    .site-logo {
        font-size: 20px;
    }

    .hero,
    .detail-hero {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        min-height: 620px;
        display: none;
    }

    .hero-slide.is-active {
        display: flex;
    }

    .hero h1,
    .detail-copy h1 {
        font-size: 44px;
        line-height: 1;
    }

    .content-section,
    .search-panel,
    .detail-content,
    .player-section,
    .page-title {
        padding: 20px;
        border-radius: 18px;
    }

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

    .movie-grid,
    .movie-grid--compact,
    .movie-grid--related {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .detail-hero__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-poster {
        width: min(240px, 72vw);
    }

    .info-list,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card__covers {
        height: 170px;
    }

    .rank-item {
        grid-template-columns: 42px 58px 1fr;
        gap: 10px;
    }
}

@media (max-width: 430px) {
    .movie-grid,
    .movie-grid--compact,
    .movie-grid--related {
        grid-template-columns: 1fr;
    }

    .hero-slide__content {
        padding-top: 30px;
    }
}
