:root {
    --fog-50: #f0f4f8;
    --fog-100: #d9e2ec;
    --fog-200: #bcccdc;
    --fog-300: #9fb3c8;
    --fog-400: #829ab1;
    --fog-600: #486581;
    --fog-700: #334e68;
    --fog-800: #243b53;
    --fog-900: #102a43;
    --mist-50: #f8f9fa;
    --mist-500: #adb5bd;
    --mist-600: #6c757d;
    --mist-700: #343a40;
    --cyan-400: #22d3ee;
    --cyan-500: #2cb1bc;
    --cyan-600: #14919b;
    --cyan-700: #0e7c86;
    --amber-100: #fcefc7;
    --amber-700: #b7791f;
    --white: #ffffff;
    --black: #000000;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-strong: 0 20px 40px rgba(16, 42, 67, 0.18);
    --radius: 16px;
    --radius-small: 10px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background: var(--mist-50);
    color: var(--fog-800);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.container.narrow {
    width: min(100% - 32px, 900px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft);
}

.site-nav {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fog-800);
    font-weight: 700;
    font-size: 20px;
    white-space: nowrap;
}

.site-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--cyan-500);
    color: var(--white);
    font-size: 15px;
    box-shadow: var(--shadow-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.nav-link {
    padding: 9px 14px;
    border-radius: var(--radius-small);
    color: var(--mist-700);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--fog-800);
    background: var(--fog-100);
}

.nav-link.active {
    color: var(--white);
    background: var(--cyan-500);
    box-shadow: var(--shadow-soft);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: var(--radius-small);
    background: transparent;
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--fog-700);
    border-radius: 99px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 42, 67, 0.98), rgba(16, 42, 67, 0.62), rgba(16, 42, 67, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 96px;
    max-width: 680px;
    margin-left: max(16px, calc((100vw - var(--container)) / 2));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--cyan-500);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 18px 0 16px;
    color: var(--white);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: var(--fog-200);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    color: var(--fog-300);
    font-size: 14px;
}

.hero-meta span + span::before {
    content: "•";
    margin-right: 12px;
    color: var(--fog-400);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-small);
    border: 0;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
    background: var(--cyan-500);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.button-primary:hover {
    background: var(--cyan-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.32);
    color: var(--white);
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.55);
    transform: translateY(-2px);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: var(--white);
}

.section {
    padding: 72px 0;
}

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

.section-heading {
    margin-bottom: 28px;
}

.split-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading h2 {
    margin: 10px 0 0;
    color: var(--fog-800);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
}

.text-link {
    color: var(--cyan-600);
    font-weight: 800;
}

.text-link:hover {
    color: var(--cyan-700);
}

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

.poster-grid-dense {
    gap: 16px;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 42% 1fr;
    min-height: 170px;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--fog-200);
}

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

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

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

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 34px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-year,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.rank-badge {
    left: 10px;
    right: auto;
    background: var(--cyan-500);
}

.movie-info {
    padding: 14px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--mist-600);
    font-size: 12px;
}

.movie-meta-line span + span::before {
    content: "•";
    margin-right: 6px;
    color: var(--mist-500);
}

.movie-info h3 {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--fog-800);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info h3 a:hover {
    color: var(--cyan-600);
}

.movie-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--mist-600);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile,
.category-overview-card,
.info-card,
.search-panel,
.filter-bar,
.detail-card,
.side-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-tile {
    padding: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.category-tile span,
.category-overview-content span {
    color: var(--cyan-600);
    font-weight: 800;
    font-size: 13px;
}

.category-tile strong {
    display: block;
    margin: 8px 0;
    color: var(--fog-800);
    font-size: 28px;
}

.category-tile p,
.category-overview-content p {
    margin: 0;
    color: var(--mist-600);
    font-size: 14px;
}

.category-overview-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-cover {
    min-height: 170px;
    background-size: cover;
    background-position: center;
    background-color: var(--fog-200);
}

.category-overview-content {
    padding: 20px;
}

.category-overview-content h2 {
    margin: 8px 0 10px;
    color: var(--fog-800);
    font-size: 24px;
}

.ranking-section {
    background: linear-gradient(135deg, var(--fog-900), var(--fog-800));
}

.ranking-section .section-heading h2,
.ranking-section .section-kicker + h2 {
    color: var(--white);
}

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

.ranking-list-full {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.page-hero {
    padding: 54px 0;
    background: linear-gradient(to right, var(--fog-800), var(--fog-900));
    color: var(--white);
}

.page-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.16;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--fog-200);
    font-size: 18px;
}

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

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

.filter-bar,
.search-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
    padding: 20px;
}

.filter-bar label,
.search-panel label {
    color: var(--fog-800);
    font-weight: 800;
}

.filter-bar input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--fog-200);
    border-radius: var(--radius-small);
    padding: 13px 14px;
    color: var(--fog-800);
    background: var(--white);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 3px rgba(44, 177, 188, 0.14);
}

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

.search-count,
.empty-state {
    margin: 14px 0 20px;
    color: var(--mist-600);
    font-weight: 700;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.pill {
    padding: 9px 13px;
    border-radius: var(--radius-small);
    background: var(--white);
    color: var(--mist-700);
    box-shadow: var(--shadow-subtle);
    font-size: 14px;
    font-weight: 800;
}

.pill:hover,
.pill.active {
    background: var(--cyan-500);
    color: var(--white);
}

.detail-shell {
    padding: 36px 0 72px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--black);
    box-shadow: var(--shadow-medium);
}

.video-element {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.video-player.is-playing .player-layer {
    opacity: 0;
}

.video-player:hover .player-layer,
.video-player.is-paused .player-layer {
    opacity: 1;
}

.player-play,
.player-controls button {
    pointer-events: auto;
}

.player-play {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 34px;
    backdrop-filter: blur(6px);
}

.player-play:hover {
    background: rgba(255, 255, 255, 0.32);
}

.player-controls {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-controls button {
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.player-message {
    position: absolute;
    left: 16px;
    top: 12px;
    margin: 0;
    color: var(--white);
    font-size: 13px;
}

.detail-card {
    margin-top: 22px;
    padding: 26px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--fog-100);
    color: var(--fog-700);
    font-size: 13px;
    font-weight: 800;
}

.detail-card h1 {
    margin: 0 0 16px;
    color: var(--fog-800);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

.detail-card h2,
.side-card h2,
.info-card h2 {
    margin: 26px 0 12px;
    color: var(--fog-800);
    font-size: 22px;
}

.detail-card p,
.info-card p {
    margin: 0;
    color: var(--mist-700);
}

.lead-text {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--fog-200);
    font-size: 18px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--fog-100);
    color: var(--fog-700);
    font-size: 13px;
    font-weight: 700;
}

blockquote {
    margin: 0;
    padding: 18px;
    border-left: 4px solid var(--cyan-500);
    border-radius: var(--radius-small);
    background: var(--fog-50);
    color: var(--mist-700);
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin-top: 0;
}

dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 10px;
    margin: 0;
}

dt {
    color: var(--mist-600);
}

dd {
    margin: 0;
    color: var(--fog-800);
    font-weight: 700;
}

dd a {
    color: var(--cyan-600);
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-list .movie-card-wide {
    grid-template-columns: 38% 1fr;
    min-height: 132px;
}

.related-list .movie-info h3 {
    min-height: auto;
}

.info-card {
    padding: 26px;
    margin-bottom: 18px;
}

.info-card h2 {
    margin-top: 0;
}

.site-footer {
    margin-top: auto;
    padding: 48px 0 22px;
    background: var(--fog-900);
    color: var(--fog-100);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    color: var(--fog-300);
    font-size: 14px;
}

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

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

.site-footer a {
    color: var(--fog-300);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--cyan-400);
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .poster-grid,
    .ranking-list,
    .ranking-list-full {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

@media (max-width: 860px) {
    .site-nav {
        flex-wrap: wrap;
    }

    .mobile-menu-button {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 14px;
    }

    .nav-links.is-open {
        display: flex;
        animation: slideDown 0.25s ease;
    }

    .nav-link {
        padding: 12px 14px;
    }

    .hero {
        height: 72vh;
    }

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

    .hero-control {
        display: none;
    }

    .poster-grid,
    .ranking-list,
    .ranking-list-full {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-side {
        position: static;
    }

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

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

@media (max-width: 640px) {
    .section {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 36px;
    }

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

    .poster-grid,
    .ranking-list,
    .ranking-list-full,
    .category-grid,
    .category-overview-grid,
    .wide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .movie-cover-wide {
        aspect-ratio: 16 / 10;
    }

    .detail-card,
    .side-card,
    .info-card {
        padding: 20px;
    }

    .player-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 430px) {
    .poster-grid,
    .ranking-list,
    .ranking-list-full,
    .category-grid,
    .category-overview-grid,
    .wide-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
