:root {
    --red: #ef4444;
    --pink: #ec4899;
    --orange: #f97316;
    --purple: #9333ea;
    --blue: #1d4ed8;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --radius: 18px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0, #fdf2f8 220px, #f8fafc 560px, #ffffff 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--red), var(--pink), var(--orange));
    color: #fff;
    box-shadow: 0 12px 30px rgba(219, 39, 119, 0.24);
}

.nav-wrap {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.20);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.22));
}

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

.nav-link {
    font-weight: 700;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
}

.nav-search input,
.mobile-search input,
.filter-card input,
.filter-card select {
    border: 0;
    outline: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink);
}

.nav-search input {
    width: 250px;
    padding: 10px 14px;
}

.nav-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: rgba(17, 24, 39, 0.28);
    cursor: pointer;
}

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

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 14px 24px 18px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-search input {
    width: 100%;
    padding: 11px 14px;
    background: #f3f4f6;
}

.mobile-search button {
    background: linear-gradient(90deg, var(--pink), var(--purple));
}

.mobile-nav-link {
    display: block;
    padding: 11px 0;
    font-weight: 700;
    color: #374151;
    border-top: 1px solid #f1f5f9;
}

.mobile-nav-link.is-active {
    color: var(--purple);
}

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

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

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

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

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 26%, rgba(236, 72, 153, 0.36), transparent 32%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.70) 42%, rgba(17, 24, 39, 0.18) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.08));
}

.hero-content {
    position: absolute;
    left: calc(50% - 640px);
    bottom: 118px;
    z-index: 3;
    width: min(640px, calc(100% - 48px));
    color: #fff;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fde68a;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.hero-summary {
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.detail-tags,
.tag-row,
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.pill-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn,
.primary-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    box-shadow: 0 16px 30px rgba(236, 72, 153, 0.34);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.primary-link:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(147, 51, 234, 0.25);
}

.hero-poster {
    position: absolute;
    right: calc(50% - 610px);
    bottom: 88px;
    z-index: 3;
    width: min(420px, 32vw);
    aspect-ratio: 16 / 10;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

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

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

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

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

.hero-category-bar {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 4;
    display: flex;
    gap: 10px;
    width: min(920px, calc(100% - 40px));
    padding: 10px;
    overflow-x: auto;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-category-bar a {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 9px 14px;
    color: #fff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.14);
}

.content-section {
    width: min(1280px, calc(100% - 40px));
    margin: 52px auto;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.035em;
    background: linear-gradient(90deg, var(--red), #f59e0b, var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.section-more,
.primary-link {
    color: var(--purple);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

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

.category-card {
    min-height: 128px;
    padding: 24px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.22), transparent 38%),
        linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 950;
    color: #111827;
}

.category-card span {
    color: var(--muted);
    line-height: 1.65;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.card-cover img,
.rank-thumb img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-duration {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(17, 24, 39, 0.78);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: #fff;
    background: rgba(236, 72, 153, 0.86);
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--purple);
}

.card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #4b5563;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #cbd5e1;
}

.tag-row span {
    color: var(--purple);
    background: #faf5ff;
}

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

.rank-panel,
.filter-card,
.detail-text-card,
.detail-meta-card {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.section-head.slim {
    margin-bottom: 14px;
}

.section-head.slim h2 {
    font-size: 28px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: linear-gradient(90deg, #faf5ff, #fdf2f8);
    transform: translateX(3px);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    font-weight: 950;
    background: #9ca3af;
}

.rank-gold {
    background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-silver {
    background: linear-gradient(135deg, #d1d5db, #64748b);
}

.rank-bronze {
    background: linear-gradient(135deg, #fb923c, #b45309);
}

.rank-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: #111827;
}

.rank-main {
    min-width: 0;
}

.rank-main strong,
.rank-main em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-main strong {
    font-size: 16px;
    font-weight: 900;
}

.rank-main em {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-score {
    color: #f59e0b;
    font-weight: 950;
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 44% 1fr;
}

.movie-card-wide .card-cover {
    height: 100%;
    aspect-ratio: auto;
}

.page-hero {
    position: relative;
    min-height: 320px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(253, 224, 71, 0.34), transparent 30%),
        linear-gradient(120deg, #ef4444, #ec4899 46%, #7c3aed 100%);
}

.page-hero > div {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.90);
    font-size: 18px;
    line-height: 1.8;
}

.filter-card {
    margin-bottom: 24px;
    padding: 18px;
}

.filter-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.filter-card input,
.filter-card select {
    min-height: 48px;
    padding: 0 18px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.filter-card input {
    flex: 1;
}

.filter-card select {
    min-width: 220px;
}

.pill-row {
    margin-top: 14px;
}

.pill-link {
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.pill-link.is-current,
.pill-link:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    border-color: transparent;
}

.searchable-grid .is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 44px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 40px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.detail-copy p:not(.eyebrow) {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    line-height: 1.8;
}

.detail-tags {
    margin-top: 22px;
}

.detail-section {
    margin-top: -64px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
    aspect-ratio: 16 / 9;
}

.player-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-video {
    background: #000;
}

.player-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #fff;
    background: #000;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(236, 72, 153, 0.16), rgba(0, 0, 0, 0.48));
}

.play-pulse {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 0 0 18px rgba(236, 72, 153, 0.16), 0 18px 40px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-top: 26px;
}

.detail-text-card,
.detail-meta-card {
    padding: 28px;
}

.detail-text-card h2,
.detail-meta-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 950;
}

.detail-text-card p {
    margin: 0 0 24px;
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

.detail-meta-card dl,
.detail-meta-card dd {
    margin: 0;
}

.detail-meta-card div {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid #f1f5f9;
}

.detail-meta-card dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-meta-card dd {
    font-weight: 800;
}

.detail-meta-card a {
    color: var(--purple);
}

.site-footer {
    margin-top: 80px;
    color: #fff;
    background: linear-gradient(90deg, #581c87, #1e3a8a, #312e81);
}

.footer-grid {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 30px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 16px;
    color: #fde68a;
}

.site-footer h2 {
    font-size: 28px;
    background: linear-gradient(90deg, #fde68a, #f9a8d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-footer p,
.site-footer li {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

    .hero-content {
        left: 24px;
    }

    .hero-poster {
        right: 24px;
        width: 34vw;
    }

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        padding: 0 16px;
    }

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

    .hero {
        min-height: 720px;
    }

    .hero-content {
        bottom: 190px;
        width: calc(100% - 32px);
    }

    .hero-poster {
        left: 24px;
        right: auto;
        bottom: 76px;
        width: calc(100% - 48px);
        height: 120px;
    }

    .hero-category-bar {
        bottom: 10px;
        border-radius: 22px;
    }

    .content-section {
        width: calc(100% - 28px);
        margin: 38px auto;
    }

    .section-head {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

    .category-grid,
    .category-grid.large,
    .movie-grid,
    .compact-grid,
    .wide-grid,
    .rank-list-page {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-poster {
        width: 100%;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-card select {
        width: 100%;
        min-width: 0;
    }

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

    .rank-score {
        display: none;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-pulse {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
