:root {
    color-scheme: light;
    --mist-50: #f8f9fa;
    --mist-100: #f1f3f5;
    --mist-200: #e9ecef;
    --mist-300: #dee2e6;
    --mist-500: #adb5bd;
    --mist-600: #868e96;
    --mist-700: #495057;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --red-50: #fef2f2;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --orange-600: #ea580c;
    --white: #ffffff;
    --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 22px 60px rgba(15, 23, 42, 0.14);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--mist-50);
    color: var(--slate-800);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(233, 236, 239, 0.88);
    backdrop-filter: blur(18px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--orange-600));
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.26);
}

.brand__text {
    font-size: 22px;
    color: transparent;
    background: linear-gradient(90deg, var(--red-600), var(--orange-600));
    -webkit-background-clip: text;
    background-clip: text;
}

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

.nav-link,
.mobile-link {
    border-radius: 999px;
    color: var(--slate-700);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 13px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--red-600);
    background: var(--red-50);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--mist-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--slate-800);
}

.mobile-nav {
    display: none;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mobile-link {
    padding: 11px 12px;
    font-size: 14px;
}

.main {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--slate-900);
    color: var(--white);
}

.hero__track {
    position: relative;
    min-height: 620px;
}

.hero__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 48px;
    align-items: center;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(239, 68, 68, 0.38), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(127, 29, 29, 0.82) 52%, rgba(234, 88, 12, 0.58));
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, var(--mist-50));
}

.hero__content,
.hero__visual,
.hero__controls {
    position: relative;
    z-index: 2;
}

.hero__eyebrow,
.section-eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red-600);
    background: var(--red-50);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 750;
}

.hero__eyebrow {
    color: #fee2e2;
    background: rgba(255, 255, 255, 0.18);
}

.hero h1,
.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero h2 {
    font-size: clamp(34px, 5vw, 64px);
}

.hero__summary {
    max-width: 660px;
    margin: 0 0 24px;
    color: var(--mist-100);
    font-size: 18px;
}

.hero__meta,
.detail-meta,
.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero__meta span,
.detail-meta span,
.card-meta-row span,
.movie-card__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.18);
    color: currentColor;
    font-size: 13px;
    font-weight: 650;
}

.hero__actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-600), var(--orange-600));
    font-weight: 760;
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(220, 38, 38, 0.34);
}

.button--light {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.button--ghost {
    color: var(--red-600);
    background: var(--red-50);
    box-shadow: none;
}

.hero__visual {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.36);
    transform: rotate(1deg);
}

.hero__visual img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.65));
}

.hero__visual-label {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero__visual-label strong {
    font-size: 20px;
}

.hero__visual-label span {
    color: var(--mist-300);
}

.hero__controls {
    position: absolute;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero__dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero__dot.is-active {
    width: 64px;
    background: var(--white);
}

.section,
.detail-section,
.category-hero,
.search-hero {
    margin: 76px 0;
}

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

.section-title {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-lead {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--mist-700);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: var(--shadow-md);
}

.movie-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mist-200), var(--mist-100));
}

.movie-card__poster img {
    width: 100%;
    aspect-ratio: 2 / 2.8;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.movie-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.movie-card__body {
    padding: 16px;
}

.movie-card__meta {
    margin: 0 0 8px;
    color: var(--mist-600);
    font-size: 13px;
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h3 a:hover {
    color: var(--red-600);
}

.movie-card__body p:not(.movie-card__meta) {
    min-height: 48px;
    margin: 8px 0 12px;
    color: var(--mist-700);
    font-size: 14px;
}

.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--mist-700);
}

.movie-card__tags span {
    background: var(--mist-100);
}

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

.category-tile {
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--mist-200);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-tile__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.category-tile__main span {
    font-size: 22px;
    font-weight: 800;
}

.category-tile__main strong {
    color: var(--red-600);
    font-size: 14px;
}

.category-tile p {
    min-height: 56px;
    margin: 0 0 14px;
    color: var(--mist-700);
}

.category-tile__links {
    display: grid;
    gap: 8px;
}

.category-tile__links a {
    color: var(--slate-700);
    font-weight: 650;
}

.category-tile__links a:hover {
    color: var(--red-600);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 22px 0 26px;
    padding: 12px;
    border: 1px solid var(--mist-200);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-panel input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--mist-200);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--slate-800);
    outline: none;
    background: var(--mist-50);
}

.filter-panel input:focus {
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-tags button {
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--mist-100);
    font-weight: 700;
    cursor: pointer;
}

.filter-tags button.is-active,
.filter-tags button:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--red-600), var(--orange-600));
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 26px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 58px 72px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item a:hover {
    transform: translateX(4px);
    border-color: rgba(220, 38, 38, 0.26);
}

.rank-item__num {
    color: transparent;
    background: linear-gradient(135deg, var(--red-600), var(--orange-600));
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 28px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item__text strong,
.rank-item__text em {
    display: block;
}

.rank-item__text em {
    margin-top: 4px;
    color: var(--mist-600);
    font-style: normal;
    font-size: 13px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 46px;
    color: var(--white);
    background: var(--slate-900);
}

.detail-hero__inner {
    position: relative;
    z-index: 2;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
    padding: 70px 0 62px;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(127, 29, 29, 0.82));
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.34);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 2.8;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-copy p {
    max-width: 760px;
    margin: 0;
    color: var(--mist-100);
    font-size: 18px;
}

.detail-meta span {
    background: rgba(255, 255, 255, 0.18);
}

.breadcrumb {
    margin: 24px 0;
    color: var(--mist-600);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--red-600);
}

.player-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow-md);
}

.player-wrap {
    position: relative;
    background: #000000;
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
}

.player-cover.hidden {
    display: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.58);
}

.play-button {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-600), var(--orange-600));
    box-shadow: 0 20px 44px rgba(220, 38, 38, 0.36);
    cursor: pointer;
}

.play-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid var(--white);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 18px;
    color: var(--mist-700);
}

.side-card {
    padding: 20px;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
}

.related-list img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.related-list strong {
    display: block;
    line-height: 1.35;
}

.related-list span {
    display: block;
    margin-top: 3px;
    color: var(--mist-600);
    font-size: 13px;
}

.site-footer {
    margin-top: 90px;
    color: var(--mist-300);
    background: var(--slate-900);
}

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

.site-footer p {
    max-width: 460px;
    margin: 14px 0 0;
    color: var(--mist-400);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-brand {
    color: var(--white);
    font-size: 20px;
}

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

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

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 16px;
    text-align: center;
    color: var(--mist-500);
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: var(--radius-md);
    color: var(--mist-700);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.empty-state.is-visible {
    display: block;
}

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

    .hero__slide,
    .rank-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero__visual {
        max-width: 560px;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero,
    .hero__track {
        min-height: 760px;
    }

    .hero__slide {
        align-content: center;
        padding: 42px 0 92px;
        gap: 28px;
    }

    .section-header,
    .filter-panel,
    .detail-hero__inner,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .section-header {
        display: grid;
    }

    .filter-tags {
        justify-content: flex-start;
    }

    .detail-hero__inner {
        align-items: start;
    }

    .detail-cover {
        max-width: 220px;
    }

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

@media (max-width: 560px) {
    .site-header__inner,
    .main,
    .hero__slide,
    .detail-hero__inner,
    .site-footer__inner {
        width: min(100% - 22px, var(--max-width));
    }

    .brand__text {
        font-size: 18px;
    }

    .hero,
    .hero__track {
        min-height: 720px;
    }

    .hero__meta span,
    .detail-meta span {
        font-size: 12px;
    }

    .hero__controls {
        bottom: 30px;
    }

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

    .rank-item a {
        grid-template-columns: 46px 62px 1fr;
    }

    .rank-item img {
        width: 62px;
        height: 82px;
    }

    .content-card,
    .side-card,
    .category-tile {
        padding: 18px;
    }

    .play-button {
        width: 72px;
        height: 72px;
    }
}
