:root {
    --rose: #e11d48;
    --pink: #db2777;
    --rose-dark: #9f1239;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: #f7f7fb;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.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.94);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.nav-shell {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: 0 12px 30px rgba(225, 29, 72, 0.28);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--rose);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.large-search input,
.filter-bar input,
.filter-bar select,
.search-toolbar select {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 10px 13px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
    width: 190px;
}

.nav-search input:focus,
.large-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-toolbar select:focus {
    border-color: rgba(225, 29, 72, 0.55);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.nav-search button,
.large-search button,
.filter-bar button {
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

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

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(1.1) contrast(1.05);
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 22%, rgba(236, 72, 153, 0.42), transparent 32%),
        linear-gradient(135deg, rgba(136, 19, 55, 0.96), rgba(17, 24, 39, 0.82) 46%, rgba(88, 28, 135, 0.76));
}

.hero-grid {
    position: relative;
    z-index: 2;
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 54px;
    align-items: center;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 750;
    font-size: 14px;
    margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-tags span,
.detail-tags span,
.rank-tags span,
.movie-meta span,
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 15px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
    background: linear-gradient(135deg, #fff, #ffe4e6);
    color: var(--rose-dark);
    box-shadow: 0 15px 36px rgba(255, 255, 255, 0.18);
}

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

.btn.ghost {
    color: #fff;
    background: rgba(0, 0, 0, 0.22);
}

.hero-search,
.large-search {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    max-width: 560px;
}

.hero-search input,
.large-search input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 16px;
    padding: 14px 16px;
}

.hero-search button,
.large-search button {
    padding: 0 22px;
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(420px, 100%);
    aspect-ratio: 4 / 5;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-poster span,
.movie-play,
.rank-cover span {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(225, 29, 72, 0.88);
    backdrop-filter: blur(10px);
}

.hero-poster span {
    left: 24px;
    bottom: 24px;
    width: 66px;
    height: 66px;
    border-radius: 999px;
    font-size: 28px;
}

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

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

.hero-dot.is-active {
    background: #fff;
}

.content-section {
    padding: 54px 0 0;
}

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

.section-heading h2,
.panel-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-link,
.panel-head a {
    color: var(--rose);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #881337);
}

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

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

.movie-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
    transition: opacity 0.25s ease;
}

.movie-card:hover .movie-thumb::after {
    opacity: 1;
}

.movie-badge,
.movie-year {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    top: 12px;
    left: 12px;
    background: var(--rose);
}

.movie-year {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.movie-play {
    z-index: 3;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%) scale(0.82);
    width: 54px;
    height: 54px;
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
    padding: 17px;
}

.movie-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: var(--rose);
}

.movie-body p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span {
    background: #f3f4f6;
    color: #4b5563;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #db2777);
    box-shadow: var(--shadow);
}

.from-indigo { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.from-pink { background: linear-gradient(135deg, #db2777, #e11d48); }
.from-amber { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.from-blue { background: linear-gradient(135deg, #2563eb, #0891b2); }
.from-slate { background: linear-gradient(135deg, #334155, #111827); }
.from-fuchsia { background: linear-gradient(135deg, #c026d3, #db2777); }
.from-emerald { background: linear-gradient(135deg, #059669, #0f766e); }
.from-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.from-violet { background: linear-gradient(135deg, #7c3aed, #be185d); }

.category-tile span,
.category-card h2 {
    display: block;
    font-size: 27px;
    font-weight: 850;
    margin: 0 0 10px;
}

.category-tile strong,
.category-card p {
    display: block;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 520;
}

.category-tile em,
.category-card span {
    display: inline-flex;
    margin-top: 20px;
    font-style: normal;
    font-weight: 800;
}

.tile-links,
.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tile-links a,
.category-samples a {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

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

.ranking-panel,
.detail-side,
.detail-article,
.player-card {
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.ranking-panel {
    padding: 22px;
    position: sticky;
    top: 88px;
}

.rank-list,
.mini-rank-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 116px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.mini-rank-list .rank-item {
    grid-template-columns: auto 82px minmax(0, 1fr);
    box-shadow: none;
    border: 1px solid var(--line);
}

.rank-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    font-weight: 900;
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1f2937, #881337);
}

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

.rank-cover span {
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-info h3 a:hover {
    color: var(--rose);
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-tags span {
    background: #f3f4f6;
    color: #4b5563;
}

.page-hero,
.detail-hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, var(--rose), var(--pink));
}

.page-hero {
    padding: 92px 0 88px;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.soft-hero,
.search-hero {
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.24), transparent 26%),
        linear-gradient(135deg, #e11d48, #be185d 54%, #581c87);
}

.ranking-hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.25), transparent 28%),
        linear-gradient(135deg, #111827, #881337 56%, #312e81);
}

.category-card-main {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-covers img {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.filter-bar,
.search-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 18px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.filter-bar input {
    flex: 1;
    min-width: 240px;
}

.filter-bar button {
    background: #111827;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    min-height: 260px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border-radius: 22px;
}

.detail-hero {
    min-height: 460px;
}

.detail-head {
    position: relative;
    z-index: 2;
    padding: 80px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 38px;
    color: rgba(255, 255, 255, 0.78);
}

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

.breadcrumb em {
    font-style: normal;
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    margin-top: -84px;
    position: relative;
    z-index: 4;
}

.watch-column {
    min-width: 0;
}

.player-card {
    padding: 12px;
    overflow: hidden;
}

.player-shell {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: #050505;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.76)),
        rgba(0, 0, 0, 0.22);
    cursor: pointer;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: 0 18px 48px rgba(225, 29, 72, 0.36);
    font-size: 34px;
}

.detail-article {
    margin-top: 26px;
    padding: 30px;
}

.detail-article h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-article h2:not(:first-child) {
    margin-top: 30px;
}

.detail-article p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.detail-side {
    padding: 18px;
    align-self: start;
    position: sticky;
    top: 88px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    background: linear-gradient(135deg, #1f2937, #881337);
}

.detail-side dl {
    margin: 18px 0 0;
}

.detail-side dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    font-weight: 750;
}

.detail-side a {
    color: var(--rose);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    background: #fff1f2;
    color: var(--rose);
}

.site-footer {
    margin-top: 76px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 48px 0;
}

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

.site-footer p {
    color: #9ca3af;
    margin: 0;
}

.site-footer h3 {
    color: #fff;
    margin: 0 0 14px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #9ca3af;
    padding: 18px;
}

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

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

    .split-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .detail-side {
        position: static;
    }

    .detail-side {
        order: -1;
    }
}

@media (max-width: 860px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav,
    .nav-search {
        display: none;
        width: 100%;
    }

    .main-nav.is-open,
    .nav-search.is-open {
        display: grid;
        gap: 10px;
    }

    .nav-search input {
        width: 100%;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        min-height: 760px;
        padding: 70px 0 90px;
    }

    .hero-poster {
        justify-self: start;
        width: min(320px, 100%);
    }

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

    .category-card-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .hero-search,
    .large-search {
        flex-direction: column;
    }

    .movie-grid,
    .small-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

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

    .rank-info p {
        display: none;
    }

    .detail-head {
        padding-top: 55px;
    }

    .detail-layout {
        margin-top: -42px;
    }
}
