* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: rgb(250 250 250);
    color: rgb(23 23 23);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.section-spacing {
    padding: 64px 0;
}

.muted-section {
    background: linear-gradient(135deg, rgb(239 246 255), rgb(236 254 255));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgb(229 229 229);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-secondary)));
    box-shadow: 0 10px 24px rgba(41, 128, 185, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.desktop-nav a,
.nav-dropdown > a {
    color: rgb(64 64 64);
    font-weight: 600;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 16px);
    width: 220px;
    padding: 10px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    background: rgb(245 245 245);
}

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

.nav-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgb(212 212 212);
    border-radius: 999px;
    padding: 12px 16px;
    background: white;
    color: rgb(38 38 38);
    outline: none;
}

.nav-search input:focus,
.large-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.12);
}

.nav-search button,
.large-search button,
.btn-primary {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    color: white;
    background: rgb(var(--color-primary));
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

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

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    padding: 12px 20px;
    color: white;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgb(245 245 245);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: rgb(38 38 38);
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid rgb(229 229 229);
    background: white;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: rgb(64 64 64);
    font-weight: 600;
}

.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    padding: 8px 0 8px 16px;
}

.hero-carousel {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: rgb(23 23 23);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-image,
.detail-backdrop-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 96px;
    color: white;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: white;
    background: rgb(var(--color-primary));
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 20px 0 0;
    color: rgb(229 229 229);
    font-size: 20px;
    line-height: 1.75;
}

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

.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: rgb(var(--color-primary));
    background: rgba(41, 128, 185, 0.1);
    font-size: 13px;
    font-weight: 700;
}

.hero-content .tag-pill,
.detail-info .tag-pill {
    color: white;
    background: rgba(255, 255, 255, 0.16);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    cursor: pointer;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: white;
}

.search-band {
    margin-top: -40px;
    position: relative;
    z-index: 8;
}

.search-band-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.search-band h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.search-band p {
    margin: 0;
    color: rgb(82 82 82);
}

.large-search {
    display: flex;
    gap: 10px;
}

.large-search input {
    flex: 1;
}

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

.section-heading h2 {
    margin: 0;
    color: rgb(23 23 23);
    font-size: 32px;
}

.section-heading p {
    margin: 8px 0 0;
    color: rgb(82 82 82);
}

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

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

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

.card {
    overflow: hidden;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.14);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-frame,
.small-thumb,
.category-art,
.category-cover,
.rank-row-cover,
.detail-poster {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(93, 173, 226, 0.38), rgba(41, 128, 185, 0.18) 36%, rgba(17, 24, 39, 0.92));
}

.poster-frame {
    aspect-ratio: 3 / 4;
}

.poster-image,
.category-image,
.rank-image,
.small-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .poster-image,
.category-tile:hover .category-image,
.rank-row:hover .rank-image {
    transform: scale(1.04);
}

.image-missing {
    opacity: 0;
}

.poster-badge,
.poster-score {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    top: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.poster-score {
    right: 12px;
    bottom: 12px;
    background: rgb(var(--color-primary));
}

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

.movie-card-body h3 {
    margin: 0;
    color: rgb(23 23 23);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body p {
    min-height: 48px;
    margin: 10px 0 14px;
    color: rgb(82 82 82);
    font-size: 14px;
    line-height: 1.65;
}

.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgb(115 115 115);
    font-size: 13px;
}

.movie-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.movie-meta-row span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: rgb(163 163 163);
}

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

.category-tile {
    overflow: hidden;
    border-radius: 20px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.category-art {
    height: 148px;
}

.category-tile > div:last-child,
.category-card-main > div:last-child {
    padding: 18px;
}

.category-tile h3,
.category-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-tile p,
.category-card p {
    margin: 0 0 12px;
    color: rgb(82 82 82);
    line-height: 1.7;
}

.category-tile span {
    color: rgb(var(--color-primary));
    font-size: 13px;
    font-weight: 700;
}

.category-card-main {
    display: block;
}

.category-cover {
    height: 190px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px 18px;
}

.category-samples a {
    border-radius: 999px;
    padding: 7px 10px;
    color: rgb(64 64 64);
    background: rgb(245 245 245);
    font-size: 13px;
}

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

.rank-panel,
.side-panel {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.rank-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rank-panel-head h2,
.side-panel h2 {
    margin: 0;
    font-size: 24px;
}

.rank-panel-head a {
    color: rgb(var(--color-primary));
    font-weight: 800;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgb(250 250 250);
}

.rank-number,
.rank-large-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    color: white;
    background: rgb(var(--color-primary));
    font-weight: 900;
}

.rank-number {
    width: 28px;
    height: 28px;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.rank-score {
    color: rgb(var(--color-primary));
    font-weight: 900;
    text-align: right;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    position: relative;
    padding: 78px 0;
    color: white;
    background: linear-gradient(135deg, rgb(17 24 39), rgb(30 97 140));
}

.small-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgb(229 229 229);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: white;
}

.filter-shell {
    position: sticky;
    top: 72px;
    z-index: 50;
    border-bottom: 1px solid rgb(229 229 229);
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(16px);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 200px;
    gap: 12px;
    padding: 16px 0;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 94px minmax(0, 1fr) 110px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-large-number {
    width: 42px;
    height: 42px;
    font-size: 18px;
}

.rank-row-cover {
    width: 94px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-row-title {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 800;
}

.rank-row-info p {
    margin: 0 0 10px;
    color: rgb(82 82 82);
    line-height: 1.7;
}

.rank-row-score {
    text-align: right;
}

.rank-row-score strong {
    display: block;
    color: rgb(var(--color-primary));
    font-size: 24px;
}

.rank-row-score span {
    color: rgb(115 115 115);
    font-size: 13px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: rgb(17 24 39);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.38;
    filter: blur(2px);
    transform: scale(1.02);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 58px 0 72px;
}

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

.detail-poster {
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
    margin-bottom: 18px;
}

.detail-one-line {
    max-width: 840px;
    margin: 0 0 18px;
    color: rgb(229 229 229);
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 4px;
}

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

.detail-info .btn-primary {
    display: inline-flex;
    margin-top: 28px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.player-card {
    margin-bottom: 24px;
    background: rgb(0 0 0);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: black;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 6px;
    background: rgb(var(--color-primary));
    box-shadow: 0 18px 38px rgba(41, 128, 185, 0.36);
    font-size: 34px;
}

.content-card {
    padding: 26px;
    margin-bottom: 24px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: rgb(64 64 64);
    font-size: 17px;
    line-height: 1.9;
}

.small-card-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.small-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgb(250 250 250);
}

.small-thumb {
    aspect-ratio: 3 / 4;
    border-radius: 10px;
}

.small-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.small-card span {
    color: rgb(115 115 115);
    font-size: 13px;
}

.site-footer {
    padding: 42px 0;
    color: rgb(229 229 229);
    background: rgb(23 23 23);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid strong {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-size: 20px;
}

.footer-grid p {
    max-width: 640px;
    margin: 0;
    color: rgb(212 212 212);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-links a:hover {
    color: white;
}

.is-filter-hidden {
    display: none !important;
}

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

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

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

    .rank-panel,
    .side-panel {
        position: static;
    }
}

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

    .nav-shell {
        justify-content: space-between;
    }

    .mobile-toggle {
        display: block;
    }

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

    .hero-carousel {
        height: 560px;
    }

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

    .hero-content p,
    .detail-one-line {
        font-size: 17px;
    }

    .search-band {
        margin-top: 0;
    }

    .search-band-inner,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .rank-row-score {
        grid-column: 3;
        text-align: left;
    }

    .detail-poster {
        width: min(260px, 76vw);
    }

    .footer-grid {
        flex-direction: column;
    }
}

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

    .section-spacing {
        padding: 42px 0;
    }

    .brand {
        font-size: 18px;
    }

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

    .hero-carousel {
        height: 520px;
    }

    .hero-control {
        display: none;
    }

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

    .hero-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-primary,
    .btn-ghost {
        justify-content: center;
        text-align: center;
    }

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

    .movie-card-body p {
        min-height: auto;
    }

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

    .rank-row-info p {
        display: none;
    }

    .player-wrap {
        aspect-ratio: 16 / 10;
    }
}
