:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-500: #64748b;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --accent-50: #fef3c7;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--secondary-900);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.3);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.desktop-nav a,
.mobile-menu a {
    color: var(--secondary-700);
    padding: 10px 13px;
    border-radius: 12px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-menu a:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.header-search {
    display: flex;
    width: min(310px, 28vw);
    overflow: hidden;
    border: 1px solid var(--secondary-200);
    border-radius: 14px;
    background: var(--white);
}

.header-search input,
.mobile-search input,
.page-search input,
.inline-filter input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 11px 14px;
    color: var(--secondary-800);
}

.header-search button,
.mobile-search button,
.page-search button {
    border: 0;
    color: var(--white);
    background: var(--primary-600);
    padding: 0 16px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    color: var(--secondary-900);
    background: var(--primary-50);
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-menu {
    border-top: 1px solid var(--secondary-200);
    background: var(--white);
    padding: 14px 16px 18px;
}

.mobile-menu nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.mobile-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--secondary-200);
    border-radius: 14px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: var(--secondary-900);
}

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

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

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.12);
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(14, 165, 233, 0.32), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.38));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.58fr);
    align-items: center;
    gap: 48px;
    min-height: 620px;
    padding: 58px 0 72px;
    color: var(--white);
}

.eyebrow {
    color: var(--primary-300);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 18px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

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

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

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

.btn.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.34);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
    aspect-ratio: 3 / 4;
}

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

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev,
.hero-next {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    font-size: 25px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 26px;
    background: var(--primary-400);
}

.category-strip {
    background: var(--white);
    border-bottom: 1px solid var(--secondary-200);
}

.category-strip-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
}

.category-strip span {
    flex: 0 0 auto;
    color: var(--secondary-900);
    font-weight: 800;
}

.category-strip div div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-strip a {
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    padding: 7px 13px;
    font-weight: 700;
}

.section {
    padding: 64px 0;
}

.soft-section {
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

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

.section-heading h2,
.rank-title h2,
.detail-article h2,
.detail-side h2 {
    margin: 0 0 8px;
    color: var(--secondary-900);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-heading p {
    margin: 0;
    color: var(--secondary-500);
}

.section-link,
.rank-title a {
    flex: 0 0 auto;
    color: var(--primary-700);
    font-weight: 800;
}

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

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

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--secondary-200);
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.58), transparent 54%);
}

.card-score {
    position: absolute;
    right: 12px;
    top: 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.92);
    padding: 5px 9px;
    font-size: 13px;
}

.card-body {
    padding: 17px;
}

.card-body h2 {
    margin: 8px 0 8px;
    color: var(--secondary-900);
    font-size: 19px;
    line-height: 1.32;
}

.card-body h2 a:hover {
    color: var(--primary-700);
}

.card-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--secondary-500);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-tags {
    margin: 0;
}

.card-tags span {
    font-size: 12px;
    padding: 3px 8px;
}

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

.rank-panel,
.rank-side,
.detail-side,
.detail-article {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

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

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

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

.rank-list li a {
    display: grid;
    grid-template-columns: 42px 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 9px;
    background: var(--secondary-50);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-list li a:hover {
    transform: translateX(4px);
    background: var(--primary-50);
}

.rank-num {
    color: var(--primary-700);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-list img {
    width: 72px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

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

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

.rank-info strong {
    color: var(--secondary-900);
    font-weight: 800;
}

.rank-info em {
    color: var(--secondary-500);
    font-size: 13px;
    font-style: normal;
}

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

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

.category-card {
    display: flex;
    min-height: 132px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    overflow: hidden;
    position: relative;
    border-radius: 22px;
    padding: 22px;
    color: var(--secondary-900);
    background: linear-gradient(135deg, var(--white), var(--primary-50));
    box-shadow: var(--shadow-soft);
}

.category-card::before {
    content: "";
    position: absolute;
    right: -32px;
    top: -32px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.16);
}

.category-card strong {
    position: relative;
    font-size: 22px;
    font-weight: 900;
}

.category-card span {
    position: relative;
    color: var(--secondary-500);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.35), transparent 28%),
        linear-gradient(135deg, var(--secondary-900), #113953);
}

.page-hero .container {
    padding: 76px 0 72px;
}

.page-search,
.inline-filter {
    display: flex;
    width: min(720px, 100%);
    overflow: hidden;
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
}

.inline-filter {
    background: var(--white);
    border-color: transparent;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

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

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

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

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) saturate(1.12);
    transform: scale(1.04);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48));
}

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

.crumb {
    display: inline-flex;
    margin-bottom: 24px;
    color: var(--primary-300);
    font-weight: 800;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 35px 75px rgba(0, 0, 0, 0.36);
    aspect-ratio: 3 / 4;
}

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

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.meta-row span {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

.player-section {
    background: var(--secondary-900);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.22), rgba(2, 6, 23, 0.36));
    cursor: pointer;
}

.play-cover span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    box-shadow: 0 16px 36px rgba(2, 132, 199, 0.45);
    font-size: 34px;
}

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

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

.detail-article,
.detail-side {
    padding: 28px;
}

.detail-article p {
    color: var(--secondary-700);
    font-size: 17px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0;
}

.detail-side dt {
    color: var(--secondary-500);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: var(--secondary-900);
}

.detail-side a {
    color: var(--primary-700);
    font-weight: 800;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr) minmax(180px, 0.6fr);
    gap: 32px;
    padding: 48px 0;
}

.footer-brand {
    color: var(--white);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 17px;
}

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

.footer-links a:hover {
    color: var(--primary-300);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 18px;
    color: var(--secondary-500);
    text-align: center;
}

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

    .header-search {
        width: min(420px, 48vw);
    }

    .menu-toggle {
        display: inline-flex;
    }

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

    .hero-poster {
        display: none;
    }

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

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

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

    .header-inner {
        min-height: 62px;
    }

    .brand {
        font-size: 18px;
    }

    .header-search {
        display: none;
    }

    .hero-carousel,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 44px 0 72px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(32px, 11vw, 48px);
    }

    .section {
        padding: 44px 0;
    }

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

    .movie-grid,
    .featured-grid,
    .small-grid,
    .category-movie-grid,
    .full-rank,
    .category-grid,
    .category-grid.large,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(280px, 82vw);
    }

    .rank-list li a {
        grid-template-columns: 36px 64px minmax(0, 1fr);
    }

    .rank-list img {
        width: 64px;
        height: 48px;
    }
}
