:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --red-600: #dc2626;
    --pink-700: #be185d;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, #fff7f9 0%, #f8fafc 38%, #ffffff 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--red-600), var(--rose-600), var(--pink-700));
    box-shadow: 0 12px 30px rgba(190, 18, 60, 0.22);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.18);
}

.brand-text {
    font-size: 21px;
    letter-spacing: 0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--rose-100);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.top-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--slate-900);
}

.top-search button,
.filter-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--rose-700);
    background: var(--white);
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 8px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(159, 18, 57, 0.96);
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

main {
    min-height: 72vh;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 76px max(26px, calc((100vw - 1280px) / 2 + 26px));
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.62;
}

.hero-bg span {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(244, 63, 94, 0.55), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(88, 28, 48, 0.78) 46%, rgba(15, 23, 42, 0.58) 100%);
}

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

.eyebrow {
    margin: 0 0 10px;
    color: var(--rose-600);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero .eyebrow {
    color: #fecdd3;
}

.hero h1 {
    margin: 0;
    max-width: 820px;
    color: var(--white);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-summary {
    margin: 22px 0 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--rose-100);
    color: var(--rose-700);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.primary-btn,
.ghost-btn,
.section-link,
.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 12px 24px;
    color: var(--white);
    background: linear-gradient(90deg, var(--rose-500), var(--red-600));
    box-shadow: 0 18px 28px rgba(225, 29, 72, 0.25);
}

.ghost-btn {
    padding: 12px 24px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.row-action:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    aspect-ratio: 2 / 3;
}

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

.hero-controls {
    position: absolute;
    z-index: 3;
    right: max(28px, calc((100vw - 1280px) / 2 + 28px));
    bottom: 44px;
    display: flex;
    gap: 12px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    font-size: 30px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: max(28px, calc((100vw - 1280px) / 2 + 28px));
    bottom: 58px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 28px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 44px;
    background: var(--white);
}

.quick-panel,
.content-section,
.category-overview,
.filter-panel,
.rank-list,
.detail-main,
.page-hero {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -54px;
    position: relative;
    z-index: 5;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.quick-panel h2,
.section-head h2,
.rank-card h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-text h2 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.quick-panel h2 {
    font-size: clamp(26px, 3vw, 40px);
}

.quick-panel p,
.page-hero p,
.detail-one-line,
.detail-text p {
    color: var(--slate-600, #475569);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.category-pills a {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--rose-50);
    color: var(--rose-700);
    font-weight: 800;
    border: 1px solid var(--rose-100);
}

.content-section {
    padding: 58px 22px 0;
}

.content-section.no-top {
    padding-top: 28px;
}

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

.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.section-link,
.row-action {
    padding: 9px 15px;
    color: var(--rose-700);
    background: var(--rose-50);
    border: 1px solid var(--rose-100);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate-100);
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.62);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

.card-body {
    padding: 15px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}

.card-meta a {
    color: var(--rose-600);
}

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

.movie-card h3 a:hover,
.rank-row h2 a:hover,
.category-sample a:hover {
    color: var(--rose-600);
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 12px;
    color: var(--slate-600, #475569);
    font-size: 14px;
}

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

.rank-card {
    position: sticky;
    top: 100px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--slate-900), #241122);
    color: var(--white);
    box-shadow: var(--shadow);
}

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

.rank-card li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.rank-card li span {
    color: #fecdd3;
    font-weight: 900;
}

.rank-card li a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-card li em {
    color: rgba(255, 255, 255, 0.56);
    font-style: normal;
    font-size: 12px;
}

.page-main {
    padding: 38px 22px 70px;
}

.page-hero {
    padding: 52px 34px;
    border-radius: 30px;
    color: var(--slate-900);
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.25), transparent 36%),
        linear-gradient(135deg, #ffffff, #fff1f2 55%, #ffe4e6);
    box-shadow: var(--shadow-soft);
}

.compact-hero h1 {
    font-size: clamp(32px, 4vw, 50px);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 12px;
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 11px 14px;
    color: var(--slate-900);
    background: var(--slate-50);
    outline: none;
}

.filter-panel button {
    background: var(--rose-600);
    color: var(--white);
}

.category-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding-top: 28px;
}

.category-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid var(--slate-200);
}

.category-card > a {
    display: block;
    padding: 26px;
    background: linear-gradient(135deg, #fff, #fff1f2);
}

.category-card span {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--red-600));
    font-weight: 900;
}

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

.category-card p {
    color: var(--slate-600, #475569);
}

.category-sample {
    display: grid;
    gap: 10px;
    padding: 18px 26px 24px;
}

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

.rank-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 88px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-soft);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--red-600));
    font-weight: 900;
}

.rank-cover {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
    background: var(--slate-100);
}

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

.rank-row h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-row p {
    margin: 0 0 8px;
    color: var(--slate-600, #475569);
}

.detail-main {
    padding: 26px 22px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 6px 0 24px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--rose-600);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    padding: 30px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.28), transparent 35%),
        linear-gradient(135deg, #ffffff, #fff1f2);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow-soft);
    background: var(--slate-100);
}

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

.detail-info {
    align-self: center;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
    max-width: 860px;
    margin: 16px 0 18px;
    font-size: 18px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--slate-700);
}

.detail-tags {
    margin: 18px 0 24px;
}

.player-section,
.detail-text {
    margin-top: 34px;
    padding: 28px;
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.player-section h2,
.detail-text h2 {
    font-size: 28px;
    margin-bottom: 18px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.76));
    transition: opacity 0.24s ease;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-500), var(--red-600));
    box-shadow: 0 18px 40px rgba(225, 29, 72, 0.35);
    font-size: 30px;
    text-indent: 4px;
}

.detail-text p {
    margin: 0 0 22px;
    font-size: 17px;
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

[data-card].is-hidden {
    display: none;
}

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

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

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

    .split-layout,
    .quick-panel {
        grid-template-columns: 1fr;
    }

    .category-pills {
        justify-content: flex-start;
    }

    .rank-card {
        position: static;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        gap: 12px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero {
        min-height: 680px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding-top: 56px;
        padding-bottom: 92px;
    }

    .hero-poster {
        width: min(240px, 62vw);
        justify-self: center;
        order: -1;
    }

    .hero h1 {
        font-size: clamp(32px, 12vw, 48px);
    }

    .hero-summary {
        font-size: 16px;
    }

    .hero-controls {
        right: 22px;
        bottom: 26px;
    }

    .hero-dots {
        left: 22px;
        bottom: 42px;
    }

    .quick-panel {
        margin: 18px 22px 0;
    }

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

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

    .rank-row {
        grid-template-columns: 44px 72px minmax(0, 1fr);
    }

    .rank-row .row-action {
        grid-column: 2 / 4;
        justify-self: start;
    }

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

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

@media (max-width: 560px) {
    .header-inner,
    .content-section,
    .page-main,
    .detail-main {
        padding-left: 14px;
        padding-right: 14px;
    }

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

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

    .page-hero,
    .detail-hero,
    .player-section,
    .detail-text,
    .quick-panel {
        border-radius: 22px;
        padding: 22px;
    }

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

    .rank-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-cover {
        display: none;
    }

    .rank-row .row-action {
        grid-column: 2;
    }
}
