:root {
    --fog-50: #f8f9fa;
    --fog-100: #f1f3f5;
    --fog-200: #e9ecef;
    --fog-300: #dee2e6;
    --fog-500: #adb5bd;
    --fog-600: #868e96;
    --fog-700: #495057;
    --fog-900: #212529;
    --steel-50: #f0f4f8;
    --steel-100: #d9e2ec;
    --steel-500: #627d98;
    --steel-600: #486581;
    --steel-700: #334e68;
    --accent: #fb923c;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
    --shadow-md: 0 12px 30px rgb(15 23 42 / 0.10);
    --shadow-lg: 0 24px 70px rgb(15 23 42 / 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: var(--fog-50);
    color: var(--fog-900);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.container-custom {
    width: min(100%, 1408px);
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 0.94);
    border-bottom: 1px solid var(--fog-200);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--fog-900);
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--steel-600), var(--steel-700));
    color: var(--white);
    font-size: 14px;
    box-shadow: 0 8px 24px rgb(72 101 129 / 0.22);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--fog-700);
    font-weight: 500;
}

.desktop-nav a,
.nav-drop > a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav .is-active,
.nav-drop:hover > a {
    color: var(--steel-600);
}

.nav-drop {
    position: relative;
}

.drop-panel {
    position: absolute;
    left: 0;
    top: 100%;
    width: 180px;
    padding: 8px;
    margin-top: 14px;
    display: grid;
    gap: 2px;
    background: var(--white);
    border: 1px solid var(--fog-200);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

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

.drop-panel a {
    padding: 9px 12px;
    border-radius: 10px;
}

.drop-panel a:hover {
    background: var(--steel-50);
}

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

.nav-search input,
.big-search input,
.local-filter {
    width: 100%;
    border: 1px solid var(--fog-300);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    background: var(--white);
    color: var(--fog-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.big-search input:focus,
.local-filter:focus {
    border-color: var(--steel-500);
    box-shadow: 0 0 0 4px rgb(98 125 152 / 0.14);
}

.nav-search button,
.big-search button,
.btn-primary {
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    color: var(--white);
    background: var(--steel-600);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.big-search button:hover,
.btn-primary:hover {
    background: var(--steel-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--fog-300);
    border-radius: 12px;
    background: var(--white);
    color: var(--fog-900);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--fog-200);
    background: var(--white);
    padding: 10px 16px 16px;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: var(--fog-700);
    font-weight: 500;
}

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

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--fog-900);
}

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

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.42) 42%, rgb(0 0 0 / 0.12)), linear-gradient(0deg, rgb(0 0 0 / 0.74), transparent 46%);
}

.hero-content {
    position: relative;
    min-height: 70vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
    padding-top: 72px;
    padding-bottom: 72px;
    color: var(--white);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.18);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.eyebrow.dark {
    background: var(--steel-50);
    color: var(--steel-700);
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--fog-100);
    font-size: 18px;
}

.hero-tags,
.tag-row,
.meta-line,
.meta-chips,
.detail-tags,
.category-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.meta-chips span,
.detail-tags a,
.category-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.hero-tags span {
    background: rgb(255 255 255 / 0.16);
    color: var(--fog-100);
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.btn-ghost {
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 999px;
    padding: 11px 20px;
    color: var(--white);
    background: rgb(255 255 255 / 0.08);
    font-weight: 600;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
    background: rgb(255 255 255 / 0.18);
    transform: translateY(-1px);
}

.hero-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: rgb(255 255 255 / 0.10);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-card span {
    display: block;
    padding: 16px 18px 18px;
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
}

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

.hero-controls button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgb(255 255 255 / 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search {
    position: relative;
    z-index: 4;
    margin-top: -40px;
}

.big-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--fog-200);
    border-radius: 22px;
    background: rgb(255 255 255 / 0.96);
    box-shadow: var(--shadow-md);
}

.category-pills {
    margin-top: 18px;
}

.category-pills a,
.detail-tags a,
.tag-row span,
.meta-chips span {
    background: var(--steel-50);
    color: var(--steel-700);
}

.page-section {
    padding: 64px 16px 0;
}

.page-top {
    padding-top: 38px;
}

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

.section-head.compact {
    align-items: center;
}

.section-head h2,
.intro-panel h1,
.detail-copy h1,
.detail-text h2 {
    margin: 10px 0 0;
    color: var(--fog-900);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.section-head a {
    color: var(--steel-600);
    font-weight: 600;
}

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

.movie-card,
.category-tile,
.ranking-card,
.intro-panel,
.ranking-panel {
    overflow: hidden;
    border: 1px solid var(--fog-200);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-card:hover,
.category-tile:hover,
.ranking-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--fog-100);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img {
    transform: scale(1.055);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgb(0 0 0 / 0.58), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-dot {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.92);
    color: var(--steel-700);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-dot {
    opacity: 1;
    transform: translateY(0);
}

.movie-info {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--fog-900);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-title:hover {
    color: var(--steel-600);
}

.movie-info p,
.ranking-card p,
.intro-panel p,
.detail-text p,
.detail-copy .lead {
    color: var(--fog-600);
}

.movie-info p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 8px 0 12px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.meta-line {
    gap: 9px;
    color: var(--fog-500);
    font-size: 12px;
}

.tag-row {
    margin-top: 10px;
}

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

.wide-list {
    display: grid;
    gap: 18px;
}

.wide-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
}

.wide-card .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
}

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

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

.rank-item:hover {
    background: var(--steel-50);
}

.rank-num {
    color: var(--accent);
    font-weight: 800;
}

.rank-item img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text em {
    color: var(--fog-500);
    font-size: 12px;
    font-style: normal;
}

.intro-panel {
    padding: 34px;
}

.intro-panel h1 {
    max-width: 840px;
    font-size: clamp(34px, 5vw, 58px);
}

.intro-panel p {
    max-width: 880px;
    margin-bottom: 0;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--fog-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--steel-600);
}

.filter-box {
    max-width: 560px;
    margin-top: 22px;
}

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

.category-tile {
    position: relative;
    display: block;
    min-height: 260px;
    color: var(--white);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0.18));
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0 20px;
}

.category-tile span {
    padding-top: 156px;
    font-size: 24px;
    font-weight: 700;
}

.category-tile em {
    margin-top: 8px;
    color: var(--fog-200);
    font-size: 14px;
    font-style: normal;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.ranking-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.ranking-poster span {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 34px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgb(0 0 0 / 0.62);
    color: var(--white);
    font-weight: 800;
    text-align: center;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.meta-chips,
.detail-tags {
    margin-top: 18px;
}

.player-section {
    padding-top: 46px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgb(0 0 0 / 0.48), rgb(0 0 0 / 0.16));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.92);
    color: var(--steel-700);
    font-size: 30px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.detail-text {
    max-width: 960px;
}

.detail-text h2 {
    font-size: 28px;
}

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

.search-hero .big-search {
    margin-top: 24px;
    max-width: 780px;
    box-shadow: none;
}

.site-footer {
    margin-top: 72px;
    padding: 42px 0;
    background: var(--fog-900);
    color: var(--fog-300);
}

.footer-grid {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 32px;
}

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

.footer-grid p {
    max-width: 560px;
    color: var(--fog-400);
}

.footer-links,
.footer-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.footer-links a,
.footer-cats a {
    color: var(--fog-200);
}

.footer-cats {
    margin-top: 26px;
    color: var(--fog-400);
}

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-card {
        display: none;
    }

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

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

    .detail-poster {
        max-width: 300px;
    }
}

@media (max-width: 620px) {
    .container-custom {
        padding: 0 14px;
    }

    .brand {
        font-size: 20px;
    }

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

    .hero-copy p {
        font-size: 16px;
    }

    .big-search {
        grid-template-columns: 1fr;
    }

    .page-section {
        padding-top: 44px;
    }

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

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

    .wide-card,
    .ranking-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .wide-card .poster-link img {
        aspect-ratio: 3 / 4;
    }

    .intro-panel {
        padding: 24px;
    }

    .player-button {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
}
