:root {
    --color-primary: 225 29 72;
    --color-primary-dark: 190 18 60;
    --color-neutral-50: #f8fafc;
    --color-neutral-100: #f1f5f9;
    --color-neutral-200: #e2e8f0;
    --color-neutral-300: #cbd5e1;
    --color-neutral-500: #64748b;
    --color-neutral-600: #475569;
    --color-neutral-700: #334155;
    --color-neutral-800: #1e293b;
    --color-neutral-900: #0f172a;
    --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 18px;
    --radius-xl: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-neutral-800);
    background: var(--color-neutral-50);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgb(var(--color-primary));
    font-weight: 800;
    font-size: 22px;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, rgb(var(--color-primary)), #fb7185);
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.25);
    font-size: 14px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    font-weight: 650;
    color: var(--color-neutral-700);
}

.main-nav > a,
.nav-dropdown > a {
    padding: 22px 0;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -18px;
    min-width: 180px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--color-neutral-200);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--color-neutral-600);
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: var(--color-neutral-100);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.header-search input {
    width: 220px;
    border: 1px solid var(--color-neutral-300);
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #fff;
}

.header-search input:focus {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.header-search button,
.primary-btn,
.ghost-btn,
.filter-bar button,
.player-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.player-button {
    color: #fff;
    background: rgb(var(--color-primary));
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.22);
}

.header-search button {
    padding: 10px 18px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    font-weight: 750;
}

.primary-btn:hover,
.header-search button:hover,
.player-button:hover {
    background: rgb(var(--color-primary-dark));
    transform: translateY(-1px);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.20);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--color-neutral-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--color-neutral-800);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--color-neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.50) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding-bottom: 64px;
    color: #fff;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #fff;
    background: rgb(var(--color-primary));
    font-size: 14px;
    font-weight: 750;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    max-width: 620px;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    font-size: 28px;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

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

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

.section-block {
    padding: 58px 0;
}

.section-block.alt {
    background: #fff;
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    color: var(--color-neutral-900);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--color-neutral-500);
}

.section-more {
    color: rgb(var(--color-primary));
    font-weight: 750;
}

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

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #334155);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(225, 29, 72, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, rgb(var(--color-primary)));
    font-weight: 900;
}

.movie-card-body {
    padding: 18px;
}

.movie-meta {
    color: var(--color-neutral-500);
    font-size: 13px;
    font-weight: 650;
}

.movie-card h2 {
    min-height: 58px;
    margin: 8px 0;
    color: var(--color-neutral-900);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card h2 a:hover {
    color: rgb(var(--color-primary));
}

.movie-card p {
    min-height: 50px;
    margin: 0 0 14px;
    color: var(--color-neutral-600);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
}

.tag-row span,
.detail-tags span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: rgb(var(--color-primary));
    background: rgba(225, 29, 72, 0.08);
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    padding: 4px 8px;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-neutral-100);
    color: var(--color-neutral-500);
    font-size: 13px;
    font-weight: 700;
}

.card-foot a {
    color: rgb(var(--color-primary));
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border-radius: var(--radius-xl);
    color: #fff;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 34%), linear-gradient(135deg, #0f172a, rgb(var(--color-primary)));
    box-shadow: var(--shadow-soft);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.category-card span {
    font-weight: 850;
}

.ranking-list {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.hot-list {
    display: grid;
    gap: 14px;
}

.hot-item {
    display: grid;
    grid-template-columns: 58px 88px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--color-neutral-200);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.hot-number {
    font-size: 26px;
    font-weight: 900;
    color: rgb(var(--color-primary));
    text-align: center;
}

.hot-item img {
    width: 88px;
    height: 118px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--color-neutral-800);
}

.hot-item h2,
.hot-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 850;
}

.hot-item p {
    margin: 0;
    color: var(--color-neutral-600);
}

.page-hero {
    padding: 78px 0 48px;
    color: #fff;
    background: radial-gradient(circle at 20% 10%, rgba(244, 63, 94, 0.55), transparent 28%), linear-gradient(135deg, #0f172a, #1e293b 52%, #881337);
}

.page-hero h1 {
    max-width: 880px;
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.filter-panel {
    margin: -24px auto 36px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr) auto;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--color-neutral-300);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.filter-bar button {
    padding: 0 18px;
    color: #fff;
    background: var(--color-neutral-900);
}

.detail-hero {
    padding: 42px 0;
    background: linear-gradient(135deg, #0f172a, #1f2937 48%, #881337);
    color: #fff;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    background: #111827;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 750;
}

.detail-copy p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.detail-tags span {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.player-section {
    padding: 42px 0 12px;
    background: #0f172a;
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.16));
    cursor: pointer;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-button {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.detail-content {
    padding: 46px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
}

.article-panel,
.side-panel {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #fff;
    border: 1px solid var(--color-neutral-200);
    box-shadow: var(--shadow-soft);
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    color: var(--color-neutral-900);
    font-size: 25px;
    font-weight: 900;
}

.article-panel p {
    margin: 0 0 18px;
    color: var(--color-neutral-700);
    font-size: 17px;
}

.side-links {
    display: grid;
    gap: 14px;
}

.side-link {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 74px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--color-neutral-800);
}

.side-link strong {
    display: block;
    color: var(--color-neutral-900);
    line-height: 1.35;
}

.side-link span {
    display: block;
    margin-top: 4px;
    color: var(--color-neutral-500);
    font-size: 13px;
}

.site-footer {
    color: var(--color-neutral-300);
    background: var(--color-neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    color: #fff;
    margin-bottom: 12px;
}

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

.site-footer p {
    max-width: 430px;
    margin: 10px 0 0;
    color: var(--color-neutral-500);
}

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

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

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-neutral-500);
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    border-radius: var(--radius-xl);
    color: var(--color-neutral-500);
    background: #fff;
    border: 1px solid var(--color-neutral-200);
}

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

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

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

    .ranking-list,
    .content-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 820px) {
    .header-inner {
        min-height: 64px;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 24px;
        background: #fff;
        border-bottom: 1px solid var(--color-neutral-200);
        box-shadow: var(--shadow-card);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav > a,
    .nav-dropdown > a {
        padding: 12px 0;
    }

    .dropdown-menu {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding: 8px 0;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .brand {
        font-size: 18px;
    }

    .hero-carousel {
        height: 500px;
    }

    .hero-content {
        padding-bottom: 58px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

    .movie-card h2 {
        min-height: auto;
    }

    .hot-item {
        grid-template-columns: 44px 76px 1fr;
        gap: 12px;
    }

    .hot-item img {
        width: 76px;
        height: 102px;
    }

    .article-panel,
    .side-panel {
        padding: 20px;
    }
}
