:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --teal-600: #0d9488;
    --teal-500: #14b8a6;
    --cyan-400: #22d3ee;
    --orange-500: #f97316;
    --text: #111827;
    --muted: #64748b;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
    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: linear-gradient(135deg, var(--slate-50), #eef2f7 48%, var(--slate-100));
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    color: var(--white);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.28);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-400));
    color: var(--slate-950);
    font-size: 14px;
}

.logo-text {
    font-size: 21px;
    background: linear-gradient(90deg, var(--teal-500), var(--cyan-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 10px 13px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(20, 184, 166, 0.9);
    color: var(--white);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.75s ease, transform 0.75s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 28%, rgba(20, 184, 166, 0.35), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.65) 48%, rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.7), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    padding: 120px 24px 160px;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: var(--white);
}

.hero-kicker,
.detail-kicker,
.page-hero p,
.section-heading p {
    margin: 0 0 12px;
    color: var(--teal-500);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    margin: 24px 0 0;
    max-width: 680px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.9;
}

.hero-actions,
.detail-info .primary-button {
    margin-top: 32px;
}

.primary-button,
.ghost-button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.filter-panel button {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-400));
    box-shadow: 0 16px 34px rgba(20, 184, 166, 0.28);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.filter-panel button:hover {
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 36px;
    background: var(--teal-500);
}

.hero-search {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 84px;
    width: min(420px, calc(100% - 48px));
    padding: 10px;
    display: flex;
    gap: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    color: var(--text);
    background: var(--white);
}

.hero-search button {
    min-width: 92px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    font-weight: 800;
    background: var(--teal-600);
    cursor: pointer;
}

.section-block,
.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
    margin: 0;
    color: var(--text);
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-heading a {
    color: var(--teal-600);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.card-cover {
    position: relative;
    display: block;
    height: 245px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-900), var(--teal-600));
}

.movie-card-large .card-cover {
    height: 420px;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.56), transparent 55%);
}

.card-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.7);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-title {
    display: block;
    color: var(--text);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 850;
}

.card-title:hover,
.rank-title:hover,
.category-name:hover {
    color: var(--teal-600);
}

.card-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta a {
    color: var(--teal-600);
    font-weight: 700;
}

.card-body p,
.category-overview-card p,
.content-card p,
.site-footer p,
.rank-item p {
    color: var(--muted);
    line-height: 1.75;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 750;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
}

.movie-card-horizontal .card-cover {
    height: 100%;
    min-height: 155px;
}

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

.category-tile,
.category-overview-card,
.content-card {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.category-tile {
    min-height: 190px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: auto -30px -50px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.18);
}

.category-tile span,
.category-name {
    font-size: 22px;
    font-weight: 850;
}

.category-tile strong {
    color: var(--teal-600);
    font-size: 28px;
}

.category-tile em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.65;
}

.page-hero {
    min-height: 260px;
    padding: 48px;
    display: flex;
    align-items: center;
    border-radius: 32px;
    color: var(--white);
    background:
        radial-gradient(circle at 78% 22%, rgba(20, 184, 166, 0.34), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--slate-800));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero span {
    display: block;
    max-width: 760px;
    margin-top: 18px;
    color: #cbd5e1;
    line-height: 1.8;
}

.category-overview-card {
    padding: 24px;
}

.category-overview-card strong {
    display: block;
    margin: 12px 0;
    color: var(--teal-600);
}

.category-overview-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.9;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 70px 128px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.rank-number {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--teal-500));
    font-weight: 900;
}

.rank-thumb {
    height: 82px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--slate-800);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    font-size: 20px;
    font-weight: 850;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 120px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 14px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.filter-count {
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--teal-600);
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 28px;
    border-radius: 34px;
    color: var(--white);
    background:
        radial-gradient(circle at 76% 25%, rgba(34, 211, 238, 0.22), transparent 34%),
        linear-gradient(135deg, var(--slate-950), var(--slate-800));
    box-shadow: var(--shadow);
}

.detail-poster {
    height: 520px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--slate-900);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.detail-one-line {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta-grid span {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.detail-meta-grid strong {
    display: block;
    margin-bottom: 5px;
    color: var(--teal-500);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-950);
    box-shadow: 0 24px 72px rgba(2, 6, 23, 0.34);
}

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

.play-overlay {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 118px;
    height: 118px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(20, 184, 166, 0.86);
    box-shadow: 0 18px 44px rgba(20, 184, 166, 0.35);
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.detail-content-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 32px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
    gap: 26px;
}

.content-card {
    padding: 28px;
}

.content-card h2 + p {
    margin-top: 14px;
}

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

.page-turner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
}

.page-turner a {
    flex: 1;
    padding: 18px 22px;
    border-radius: 18px;
    color: var(--teal-600);
    background: var(--white);
    box-shadow: var(--shadow);
    font-weight: 800;
}

.site-footer {
    margin-top: 34px;
    color: #cbd5e1;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

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

.footer-links a:hover {
    color: var(--teal-500);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
    text-align: center;
}

[data-filter-hidden="true"] {
    display: none;
}

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

    .detail-hero,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 440px;
    }
}

@media (max-width: 820px) {
    .mobile-menu-button {
        display: block;
    }

    .nav-shell {
        position: relative;
    }

    .site-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 68px;
        padding: 14px;
        border-radius: 18px;
        background: var(--slate-900);
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-carousel {
        min-height: 720px;
    }

    .hero-content {
        margin: 0;
        padding: 100px 22px 210px;
    }

    .hero-search {
        left: 22px;
        right: 22px;
        bottom: 76px;
        width: auto;
    }

    .hero-control {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .horizontal-grid,
    .category-grid,
    .category-overview-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .rank-item {
        grid-template-columns: 54px 92px minmax(0, 1fr);
    }

    .rank-thumb {
        height: 74px;
    }

    .page-hero {
        padding: 32px 24px;
    }

    .detail-hero {
        padding: 20px;
    }

    .detail-poster {
        height: 420px;
    }

    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .play-overlay {
        width: 92px;
        height: 92px;
    }

    .page-turner {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .section-block,
    .page-main,
    .detail-content-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 24px;
    }

    .hero-search button {
        min-height: 44px;
    }

    .movie-card-horizontal {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal .card-cover {
        height: 230px;
    }
}
