:root {
    --mist-50: #f8f9fa;
    --mist-100: #f1f3f5;
    --mist-200: #e9ecef;
    --mist-600: #6c757d;
    --mist-700: #495057;
    --mist-800: #343a40;
    --mist-900: #212529;
    --mineral-50: #f0f9ff;
    --mineral-100: #e0f2fe;
    --mineral-500: #0ea5e9;
    --mineral-600: #0284c7;
    --mineral-700: #0369a1;
    --moss-600: #16a34a;
    --paper: #ffffff;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--mist-900);
    background:
        radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.12), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--mist-50) 44%, #eef6fb 100%);
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(33, 37, 41, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mineral-500), var(--moss-600));
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.32);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.78);
    padding: 9px 14px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.mini-search,
.hero-search,
.page-filter-search,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-search input,
.hero-search input,
.page-filter-search input,
.search-page-form input {
    min-width: 0;
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: 999px;
    padding: 11px 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.96);
    color: var(--mist-900);
}

.mini-search input:focus,
.hero-search input:focus,
.page-filter-search input:focus,
.search-page-form input:focus {
    border-color: var(--mineral-600);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.mini-search button,
.hero-search button,
.page-filter-search button,
.search-page-form button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, var(--mineral-600), var(--mineral-700));
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.mini-search button:hover,
.hero-search button:hover,
.page-filter-search button:hover,
.search-page-form button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(2, 132, 199, 0.32);
}

.ghost-btn {
    color: var(--mineral-700);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: none;
}

.small-btn {
    padding: 9px 14px;
    font-size: 14px;
}

.nav-toggle {
    display: none;
    justify-self: end;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

main {
    width: 100%;
}

.hero {
    max-width: 1360px;
    margin: 0 auto;
    padding: 34px 20px 16px;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mist-900), #0b1720 56%, var(--mineral-700));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    align-items: stretch;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-image {
    position: relative;
    min-height: 100%;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(22, 163, 74, 0.24));
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(14, 23, 31, 0.1), rgba(14, 23, 31, 0.92)),
        linear-gradient(0deg, rgba(14, 23, 31, 0.28), transparent 48%);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 86px 56px 170px 24px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--mineral-600);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-content .eyebrow {
    color: #9ee7ff;
}

.hero-content h1 {
    margin: 0;
    font-family: Georgia, Cambria, "Times New Roman", "Microsoft YaHei", serif;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
    margin: 22px 0 0;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(2, 132, 199, 0.12);
    color: var(--mineral-700);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

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

.hero-search-panel {
    position: absolute;
    z-index: 3;
    left: 34px;
    right: 34px;
    bottom: 34px;
    display: grid;
    grid-template-columns: 1fr minmax(340px, 0.8fr);
    align-items: center;
    gap: 24px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.hero-search-panel h2 {
    margin: 0 0 6px;
    font-size: clamp(22px, 3vw, 34px);
}

.hero-search-panel p {
    margin: 0;
    color: var(--mist-600);
    line-height: 1.7;
}

.hero-search input {
    flex: 1;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    right: 42px;
    top: 42px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 20px;
}

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

.section-heading h2,
.page-hero h1,
.detail-card h1,
.side-card h2 {
    margin: 0;
    font-family: Georgia, Cambria, "Times New Roman", "Microsoft YaHei", serif;
    color: var(--mist-900);
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--mist-600);
    line-height: 1.75;
}

.section-heading a {
    color: var(--mineral-700);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(2, 132, 199, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(2, 132, 199, 0.22);
}

.movie-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.14), rgba(22, 163, 74, 0.08));
}

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

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

.movie-cover figcaption {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(33, 37, 41, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--mist-600);
    font-size: 13px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--mist-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0 0 14px;
    color: var(--mist-600);
    font-size: 14px;
    line-height: 1.7;
}

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

.category-tile {
    min-height: 142px;
    padding: 22px;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(2, 132, 199, 0.94), rgba(22, 163, 74, 0.82)),
        var(--mineral-600);
    color: #ffffff;
    box-shadow: var(--soft-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: rgba(255, 255, 255, 0.84);
    font-weight: 500;
    line-height: 1.7;
}

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

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

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

.rank-link {
    display: grid;
    grid-template-columns: 52px 92px 1fr;
    align-items: center;
    gap: 14px;
    min-height: 106px;
    border-radius: 18px;
    padding: 12px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--mineral-600), var(--moss-600));
    font-weight: 900;
}

.rank-link img {
    width: 92px;
    height: 66px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--mineral-100);
}

.rank-copy strong,
.rank-copy small {
    display: block;
}

.rank-copy strong {
    margin-bottom: 6px;
    line-height: 1.4;
}

.rank-copy small {
    color: var(--mist-600);
    line-height: 1.6;
}

.page-hero {
    max-width: 1280px;
    margin: 32px auto 0;
    padding: 54px 32px;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(224, 242, 254, 0.78)),
        var(--paper);
    box-shadow: var(--soft-shadow);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.page-hero h1 {
    font-size: clamp(32px, 5vw, 58px);
}

.search-page-form,
.page-filter-search {
    width: min(460px, 100%);
}

.search-page-form input,
.page-filter-search input {
    flex: 1;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.filter-bar button {
    border: 1px solid rgba(2, 132, 199, 0.18);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    color: var(--mist-700);
    background: #ffffff;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-bar button.is-active,
.filter-bar button:hover {
    color: #ffffff;
    border-color: var(--mineral-600);
    background: var(--mineral-600);
}

.breadcrumb {
    max-width: 1280px;
    margin: 26px auto 0;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--mist-600);
    font-size: 14px;
}

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

.detail-layout {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 0 20px 54px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 0.88fr);
    gap: 28px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 16 / 9;
    background: #050b12;
    box-shadow: var(--shadow);
}

.player-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #050b12;
}

.player-poster {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #050b12;
}

.player-poster.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.player-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.92);
    box-shadow: 0 18px 45px rgba(2, 132, 199, 0.38);
    font-size: 32px;
    padding-left: 5px;
}

.detail-card,
.side-card {
    margin-top: 22px;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.detail-card h1 {
    font-size: clamp(32px, 4vw, 52px);
}

.detail-meta {
    margin: 16px 0;
}

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--mist-100);
}

.lead-text {
    padding: 18px;
    border-radius: 18px;
    color: var(--mist-800);
    background: var(--mineral-50);
    border: 1px solid var(--mineral-100);
    font-weight: 700;
}

.detail-card h2 {
    margin: 28px 0 10px;
    font-size: 22px;
}

.detail-card p {
    color: var(--mist-700);
    line-height: 1.9;
}

.detail-tags {
    margin: 18px 0 0;
}

.detail-side {
    min-width: 0;
}

.side-card {
    position: sticky;
    top: 88px;
}

.side-related-grid {
    display: grid;
    gap: 16px;
}

.side-related-grid .movie-card-body p,
.side-related-grid .tag-row {
    display: none;
}

.side-related-grid .movie-cover {
    aspect-ratio: 16 / 8.5;
}

.site-footer {
    background: linear-gradient(180deg, var(--mist-800), var(--mist-900));
    color: rgba(255, 255, 255, 0.82);
    margin-top: 40px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner strong {
    color: #ffffff;
}

.footer-inner p {
    max-width: 680px;
    margin: 8px 0 0;
    line-height: 1.7;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-inner a:hover {
    color: #ffffff;
}

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

.empty-state {
    grid-column: 1 / -1;
    padding: 34px;
    border-radius: 22px;
    text-align: center;
    color: var(--mist-600);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .main-nav,
    .mini-search {
        display: none;
    }

    body.nav-open .main-nav,
    body.nav-open .mini-search {
        display: flex;
        grid-column: 1 / -1;
        width: 100%;
    }

    body.nav-open .main-nav {
        flex-direction: column;
        align-items: stretch;
    }

    body.nav-open .mini-search input {
        flex: 1;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 72px 32px 220px;
        background: linear-gradient(90deg, rgba(8, 15, 24, 0.92), rgba(8, 15, 24, 0.45));
    }

    .hero-image {
        position: absolute;
        inset: 0;
    }

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .brand-text {
        max-width: 9em;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero {
        padding: 18px 12px;
    }

    .hero-shell {
        min-height: 720px;
        border-radius: 24px;
    }

    .hero-content {
        padding: 62px 22px 260px;
    }

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

    .hero-actions,
    .hero-search,
    .page-filter-search,
    .search-page-form {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search-panel {
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 18px;
    }

    .hero-dots {
        top: 22px;
        right: 22px;
    }

    .section-heading,
    .page-hero,
    .detail-title-row,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-section {
        padding: 38px 14px;
    }

    .page-hero {
        margin: 18px 12px 0;
        padding: 34px 20px;
        border-radius: 24px;
    }

    .movie-grid,
    .category-grid,
    .compact-rank-list,
    .full-rank-list {
        grid-template-columns: 1fr;
    }

    .rank-link {
        grid-template-columns: 44px 82px 1fr;
    }

    .rank-link img {
        width: 82px;
    }

    .breadcrumb,
    .detail-layout {
        padding-left: 12px;
        padding-right: 12px;
    }

    .detail-card,
    .side-card {
        padding: 20px;
        border-radius: 22px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
