*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f7f7fb;
    color: #111827;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
}

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

.site-logo {
    font-size: 22px;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    color: #4b5563;
    font-weight: 700;
}

.site-nav a {
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: #dc2626;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 32vw);
    padding: 7px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 8px 10px;
    background: transparent;
}

.header-search button,
.btn,
.filter-bar button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.header-search button {
    flex: 0 0 auto;
    padding: 8px 15px;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #111827;
}

.hero-slider {
    position: relative;
    padding: 28px 0 72px;
    background:
        radial-gradient(circle at 20% 0%, rgba(248, 113, 113, 0.35), transparent 32%),
        linear-gradient(180deg, #fff, #f7f7fb);
    overflow: hidden;
}

.hero-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 580px;
    margin: 0 auto;
    border-radius: 34px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 420px);
    align-items: center;
    gap: 48px;
    padding: 70px;
    color: #fff;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(8, 10, 20, 0.9), rgba(8, 10, 20, 0.58), rgba(8, 10, 20, 0.88)),
        var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: saturate(1.12);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.28), transparent 40%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #dc2626;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.promo-panel .eyebrow {
    color: #fecaca;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
}

.btn-light {
    color: #dc2626;
    background: #fff1f2;
}

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-control-row {
    position: absolute;
    right: 34px;
    bottom: 30px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 30px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.hero-search-panel {
    position: relative;
    z-index: 3;
    margin-top: -34px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
}

.hero-search-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.hero-search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    outline: 0;
    background: #fff;
    color: #111827;
}

.hero-search-panel input {
    padding: 15px 16px;
}

.hero-search-panel button {
    padding: 0 24px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: #111827;
    cursor: pointer;
    font-weight: 900;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.hero-category-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #4b5563;
    background: #f3f4f6;
    font-weight: 800;
}

.section {
    padding: 64px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-panel h2,
.promo-panel h2 {
    margin: 0;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.section-heading a {
    color: #dc2626;
    font-weight: 900;
}

.compact-heading {
    align-items: start;
    display: block;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.card-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-score,
.detail-score {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    font-size: 13px;
    font-weight: 900;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    color: #dc2626;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.3;
}

.card-title:hover {
    color: #dc2626;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 9px 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 13px;
    color: #4b5563;
    font-size: 14px;
}

.card-tags span {
    color: #dc2626;
    background: #fff1f2;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    padding: 18px;
    color: #fff;
    background: #111827;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.88));
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

.category-tile span {
    display: block;
    margin-top: 82px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 54px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.05);
}

.rank-num {
    color: #dc2626;
    font-size: 20px;
    font-weight: 900;
}

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

.rank-info {
    display: grid;
    gap: 4px;
}

.rank-info strong {
    color: #111827;
}

.rank-info em {
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
}

.rank-score {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: #111827;
    font-weight: 900;
}

.promo-panel {
    position: sticky;
    top: 100px;
    min-height: 420px;
    padding: 42px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.25), transparent 30%),
        linear-gradient(135deg, #991b1b, #111827 70%);
    box-shadow: 0 28px 70px rgba(153, 27, 27, 0.22);
}

.promo-panel h2 {
    color: #fff;
    font-size: clamp(32px, 5vw, 54px);
}

.promo-panel p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.page-hero {
    padding: 82px 0 72px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.42), transparent 35%),
        linear-gradient(135deg, #111827, #7f1d1d);
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(40px, 7vw, 72px);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 800;
}

.breadcrumbs a:hover {
    color: #fff;
}

.category-list-large {
    display: grid;
    gap: 22px;
}

.category-card-large {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 28px;
    align-items: center;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.category-card-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-card-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
}

.category-card-large h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

.category-card-large p {
    color: #4b5563;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.filter-bar label {
    display: grid;
    gap: 7px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 900;
}

.filter-bar input,
.filter-bar select {
    min-height: 48px;
    padding: 0 13px;
}

.empty-state {
    margin-top: 24px;
    padding: 26px;
    border-radius: 22px;
    color: #6b7280;
    background: #fff;
    text-align: center;
    font-weight: 900;
}

.narrow-section {
    max-width: 940px;
}

.rank-list-wide .rank-item {
    grid-template-columns: 60px 66px 1fr auto;
}

.detail-hero {
    position: relative;
    padding: 64px 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(248, 113, 113, 0.38), transparent 35%),
        linear-gradient(135deg, #111827, #7f1d1d);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: 42px;
    align-items: center;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

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

.detail-info {
    color: #fff;
}

.detail-info h1 {
    color: #fff;
    font-size: clamp(40px, 7vw, 76px);
}

.detail-info p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    color: #dc2626;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    font-size: 34px;
}

.content-panel {
    padding: 34px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.content-panel h2 {
    margin-top: 0;
    font-size: 30px;
}

.content-panel p {
    color: #374151;
    font-size: 17px;
}

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

.site-footer {
    margin-top: 50px;
    padding: 54px 0 0;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: #fff;
    font-size: 22px;
}

.site-footer p {
    max-width: 470px;
    color: #9ca3af;
}

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

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

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

.footer-bottom {
    margin-top: 40px;
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

    .hero-slide {
        grid-template-columns: 1fr 320px;
        padding: 54px;
    }
}

@media (max-width: 860px) {
    .header-inner {
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: 76px 16px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    }

    body.nav-open .site-nav {
        display: flex;
    }

    .hero-shell {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 34px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        margin: 0 auto;
    }

    .hero-search-panel form,
    .filter-bar,
    .two-column,
    .detail-grid,
    .category-card-large,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .promo-panel {
        position: relative;
        top: auto;
    }
}

@media (max-width: 560px) {
    .container,
    .hero-shell {
        width: min(100% - 22px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

    .hero-slider {
        padding-top: 16px;
    }

    .hero-shell {
        min-height: 710px;
        border-radius: 24px;
    }

    .hero-content h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-control-row {
        right: 18px;
        bottom: 18px;
    }

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

    .section {
        padding: 44px 0;
    }

    .section-heading {
        display: block;
    }

    .rank-item {
        grid-template-columns: 40px 52px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }
}
