:root {
    --forest-50: #f2f8f4;
    --forest-100: #e1ede4;
    --forest-400: #6ca37f;
    --forest-600: #3a6e4d;
    --forest-700: #30593f;
    --mist-50: #f8fafb;
    --mist-100: #eef3f6;
    --mist-200: #dfe6ec;
    --mist-300: #c7d4dd;
    --mist-500: #8a9ba8;
    --mist-600: #6f7f8d;
    --mist-700: #5a6774;
    --mist-800: #4a5560;
    --mist-900: #3e4750;
    --stream-600: #007dc7;
    --sunset-600: #ef5f0c;
    --white: #ffffff;
    --black: #0f1419;
    --shadow-md: 0 10px 25px rgba(15, 20, 25, 0.08);
    --shadow-xl: 0 25px 60px rgba(15, 20, 25, 0.18);
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--mist-900);
    background: var(--mist-50);
}

body {
    margin: 0;
    line-height: 1.6;
    background: var(--mist-50);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--mist-200);
    backdrop-filter: blur(14px);
}

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

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

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--forest-600), var(--stream-600));
    box-shadow: 0 12px 26px rgba(58, 110, 77, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--mist-700);
    font-size: 15px;
    font-weight: 650;
}

.nav-links a {
    padding: 10px 4px;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--forest-600);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--forest-700);
    background: var(--forest-50);
}

.hero-carousel {
    position: relative;
    height: min(82vh, 780px);
    min-height: 560px;
    overflow: hidden;
    background: var(--black);
}

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

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

.hero-slide img,
.detail-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide.active img {
    animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.06);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 20, 25, 0.15), rgba(15, 20, 25, 0.42) 38%, rgba(15, 20, 25, 0.88));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 92px;
    max-width: 760px;
    color: var(--white);
}

.hero-tags,
.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags span,
.movie-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

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

.hero-content h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 22px);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

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

.button.primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--forest-600), var(--stream-600));
    box-shadow: 0 16px 35px rgba(0, 125, 199, 0.24);
}

.button.ghost {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.button.ghost.light {
    color: var(--mist-900);
    border-color: var(--mist-200);
    background: rgba(255, 255, 255, 0.82);
}

.button.small {
    min-height: 40px;
    padding: 8px 16px;
    color: var(--white);
    background: var(--forest-600);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.36);
}

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

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--white);
}

.search-band {
    padding: 36px 16px;
    background: linear-gradient(135deg, var(--forest-50), var(--mist-100));
}

.search-band-inner {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 32px;
    border: 1px solid rgba(58, 110, 77, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.search-band h2,
.section-heading h2,
.ranking-title h2,
.category-preview h3,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: var(--mist-900);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.search-band h2,
.section-heading h2,
.ranking-title h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.search-band p,
.section-heading p {
    margin: 8px 0 0;
    color: var(--mist-600);
}

.search-form,
.filter-bar {
    display: flex;
    gap: 12px;
    width: min(760px, 100%);
    margin: 22px auto 0;
}

.search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--mist-200);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--mist-900);
    background: var(--white);
    outline: none;
}

.filter-bar select {
    max-width: 180px;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--forest-400);
    box-shadow: 0 0 0 4px rgba(108, 163, 127, 0.12);
}

.search-form button,
.filter-bar button {
    min-height: 50px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    color: var(--white);
    font-weight: 800;
    background: var(--forest-600);
}

.content-section {
    padding: 72px 0;
    background: var(--white);
}

.mist-section {
    background: var(--mist-50);
}

.section-heading,
.ranking-title,
.preview-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.section-heading a,
.ranking-title a,
.preview-title a {
    color: var(--forest-600);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(108, 163, 127, 0.45);
    box-shadow: var(--shadow-xl);
}

.movie-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mist-200);
}

.large-grid .movie-card-cover,
.related-grid .movie-card-cover {
    aspect-ratio: 3 / 4;
}

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

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

.play-mark {
    position: absolute;
    inset: auto 14px 14px auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(15, 20, 25, 0.62);
    backdrop-filter: blur(8px);
}

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

.movie-card-meta span {
    color: var(--forest-700);
    background: var(--forest-50);
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: var(--mist-900);
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--forest-600);
}

.movie-card-desc {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--mist-600);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card-desc.compact {
    min-height: 48px;
}

.movie-card-link {
    color: var(--forest-600);
    font-weight: 800;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

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

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 20, 25, 0.12), rgba(15, 20, 25, 0.82));
}

.category-tile-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: var(--white);
}

.category-tile-content strong {
    display: block;
    font-size: 24px;
}

.category-tile-content em,
.category-tile-content small {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
}

.ranking-panel {
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 26px;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

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

.ranking-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.ranking-list a:hover {
    background: var(--mist-50);
}

.ranking-list span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--sunset-600);
    font-weight: 900;
}

.ranking-list strong,
.ranking-list em {
    display: block;
}

.ranking-list strong {
    color: var(--mist-900);
}

.ranking-list em {
    color: var(--mist-500);
    font-style: normal;
    font-size: 13px;
}

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

.category-preview {
    padding: 24px;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.small-card-grid {
    display: grid;
    gap: 14px;
}

.small-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 14px;
    color: var(--mist-900);
}

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

.small-card strong,
.small-card em {
    display: block;
}

.small-card em {
    margin-top: 2px;
    color: var(--mist-500);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 72px;
    color: var(--white);
    background: radial-gradient(circle at 18% 20%, rgba(108, 163, 127, 0.48), transparent 30%), linear-gradient(135deg, var(--mist-900), var(--forest-700));
}

.page-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.eyebrow {
    color: var(--forest-100);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.result-line {
    margin-bottom: 20px;
    color: var(--mist-600);
    font-weight: 800;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.category-overview-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

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

.category-overview-card h2 {
    margin: 0 0 8px;
    color: var(--mist-900);
}

.category-overview-card p {
    margin: 0 0 12px;
    color: var(--mist-600);
}

.category-count {
    font-weight: 800;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--mist-200);
    text-align: left;
}

.rank-table th {
    color: var(--mist-900);
    background: var(--forest-50);
}

.rank-table a {
    color: var(--forest-600);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: var(--white);
    background: var(--black);
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    filter: blur(3px);
    transform: scale(1.04);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 20, 25, 0.92), rgba(15, 20, 25, 0.62), rgba(15, 20, 25, 0.78));
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--white);
}

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

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    box-shadow: var(--shadow-xl);
}

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

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 26px;
    background: var(--black);
    box-shadow: var(--shadow-xl);
}

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

.movie-video {
    z-index: 1;
    background: var(--black);
}

.video-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    color: var(--white);
    background: var(--black);
}

.video-cover.hidden {
    display: none;
}

.video-cover img {
    object-fit: cover;
}

.video-cover-mask {
    background: linear-gradient(180deg, rgba(15, 20, 25, 0.18), rgba(15, 20, 25, 0.76));
}

.video-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    font-size: 42px;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-cover:hover .video-play-button {
    background: rgba(255, 255, 255, 0.34);
    transform: translate(-50%, -50%) scale(1.08);
}

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

.detail-article,
.detail-side {
    padding: 28px;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-article h2 + p {
    margin-top: 12px;
}

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

.detail-side dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px 16px;
    margin: 18px 0 0;
}

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

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

.site-footer {
    padding: 52px 0;
    color: var(--mist-300);
    background: var(--mist-900);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
}

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

.site-footer p {
    max-width: 420px;
    margin: 14px 0 0;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

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

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

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

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

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

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px;
        border: 1px solid var(--mist-200);
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow-xl);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: var(--forest-50);
    }

    .hero-carousel {
        height: 620px;
        min-height: 620px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 78px;
    }

    .hero-control {
        display: none;
    }

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

    .category-overview-card,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .search-form,
    .filter-bar {
        flex-direction: column;
    }

    .filter-bar select {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-wrap,
    .footer-inner {
        width: min(100% - 22px, 1280px);
    }

    .brand span:last-child {
        max-width: 190px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

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

    .search-band-inner {
        padding: 24px 16px;
    }

    .movie-grid,
    .large-grid,
    .related-grid,
    .category-grid,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .ranking-title,
    .preview-title {
        align-items: start;
        flex-direction: column;
    }

    .page-hero {
        padding: 70px 0 52px;
    }

    .detail-hero-inner {
        padding-top: 28px;
    }

    .detail-info h1 {
        font-size: 34px;
    }

    .video-play-button {
        width: 70px;
        height: 70px;
        font-size: 34px;
    }
}
