:root {
    --alley-50: #faf9f7;
    --alley-100: #f5f3ef;
    --rain-100: #e9ecef;
    --rain-200: #dee2e6;
    --rain-300: #ced4da;
    --rain-500: #6c757d;
    --rain-600: #495057;
    --rain-700: #343a40;
    --rain-800: #212529;
    --mist-50: #f0f4f8;
    --mist-300: #9fb3c8;
    --mist-500: #627d98;
    --mist-600: #486581;
    --mist-700: #334e68;
    --mist-800: #243b53;
    --gold: #facc15;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(33, 37, 41, 0.12);
    --soft-shadow: 0 10px 28px rgba(33, 37, 41, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--rain-200);
    box-shadow: 0 6px 22px rgba(33, 37, 41, 0.06);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--mist-700);
}

.brand-mark {
    width: 38px;
    height: 38px;
    color: var(--mist-600);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title,
.footer-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
    color: var(--rain-800);
    letter-spacing: 0.02em;
}

.brand-title {
    font-size: 1.35rem;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 0.76rem;
    color: var(--rain-500);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    position: relative;
    color: var(--rain-700);
    font-weight: 650;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--mist-600);
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--mist-700);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--mist-50);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--rain-700);
}

.hero-slider {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: var(--rain-800);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-image,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14, 22, 31, 0.88), rgba(36, 59, 83, 0.58), rgba(0, 0, 0, 0.32));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 78vh;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 90px 0 120px;
    color: var(--white);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--mist-500);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.detail-title-block .eyebrow,
.sub-hero .eyebrow,
.feature-band .eyebrow {
    color: var(--mist-300);
}

.hero-content h1,
.sub-hero h1,
.detail-title-block h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.45rem, 6vw, 5.8rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero-text {
    width: min(650px, 100%);
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.08rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: var(--white);
    color: var(--mist-800);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(8px);
}

.btn-light {
    background: var(--white);
    color: var(--mist-800);
}

.btn-small {
    min-height: 38px;
    padding: 0 16px;
    background: var(--mist-600);
    color: var(--white);
    white-space: nowrap;
}

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

.hero-dot {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
    background: var(--white);
}

.search-panel,
.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -48px;
    position: relative;
    z-index: 6;
    padding: 26px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.feature-inner h2,
.content-card h2,
.info-card h2,
.category-card-large h2,
.rank-main h2 {
    margin: 0;
    color: var(--rain-800);
    font-family: Georgia, "Times New Roman", serif;
}

.search-box {
    display: flex;
    align-items: center;
    width: min(420px, 100%);
    gap: 12px;
    padding: 0 18px;
    border: 1px solid var(--rain-200);
    border-radius: 999px;
    background: var(--alley-50);
    color: var(--mist-600);
}

.search-box.wide {
    width: 100%;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rain-800);
}

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

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

.section-heading h2 {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.section-link,
.text-link {
    color: var(--mist-700);
    font-weight: 800;
}

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

.category-tile,
.category-card-large,
.movie-card,
.info-card,
.content-card,
.player-card,
.rank-row {
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.category-tile {
    display: flex;
    min-height: 126px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--rain-200);
    border-radius: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile span {
    color: var(--rain-800);
    font-size: 1.12rem;
    font-weight: 850;
}

.category-tile small {
    color: var(--rain-500);
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: var(--mist-300);
    box-shadow: var(--shadow);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--rain-200);
    border-radius: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mist-50), var(--alley-100));
}

.poster img,
.related-poster img,
.rank-poster img,
.category-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster img,
.related-card:hover img,
.rank-row:hover .rank-poster img,
.category-card-large:hover .category-cover img {
    transform: scale(1.06);
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 48%);
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--mist-800);
    font-size: 0.9rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.card-content {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--mist-600);
    font-size: 0.76rem;
    font-weight: 800;
}

.card-content h2 {
    margin: 8px 0 8px;
    color: var(--rain-800);
    font-size: 1.08rem;
    line-height: 1.35;
}

.card-content p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--rain-600);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--mist-50);
    color: var(--mist-700);
    font-size: 0.74rem;
    font-weight: 750;
}

.tag-row.light span {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.feature-band {
    margin: 36px 0;
    background: linear-gradient(135deg, var(--mist-700), var(--mist-800));
    color: var(--white);
}

.feature-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    padding: 48px 0;
}

.feature-inner h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.feature-inner p {
    max-width: 620px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.sub-hero {
    background: linear-gradient(135deg, var(--mist-700), var(--mist-800));
    color: var(--white);
    padding: 86px 0 112px;
}

.sub-hero p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.86);
}

.filter-panel {
    flex-direction: column;
    align-items: stretch;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--rain-200);
    border-radius: 999px;
    padding: 0 14px;
    background: var(--white);
    color: var(--rain-700);
    font-size: 0.9rem;
    font-weight: 750;
}

.filter-pill.active,
.filter-pill:hover {
    background: var(--mist-600);
    color: var(--white);
    border-color: var(--mist-600);
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
    border: 1px solid var(--rain-200);
    border-radius: 24px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-cover {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 18px;
    background: var(--mist-50);
}

.category-card-large p {
    margin: 10px 0 14px;
    color: var(--rain-600);
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.rank-row {
    display: grid;
    grid-template-columns: 58px 88px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid var(--rain-200);
    border-radius: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
    color: var(--mist-600);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
}

.rank-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--mist-50);
}

.rank-main h2 {
    font-size: 1.25rem;
}

.rank-main p:not(.eyebrow) {
    margin: 8px 0 10px;
    color: var(--rain-600);
}

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

.detail-bg {
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14, 22, 31, 0.94), rgba(36, 59, 83, 0.72), rgba(0, 0, 0, 0.54));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 560px;
    padding: 70px 0;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: var(--mist-50);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.detail-title-block p:not(.eyebrow) {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    padding: 58px 0;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
    align-content: start;
}

.player-card,
.content-card,
.info-card {
    border: 1px solid var(--rain-200);
    border-radius: 24px;
    overflow: hidden;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    color: var(--white);
    font-weight: 850;
}

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

.play-circle {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--mist-800);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.24);
}

.content-card,
.info-card {
    padding: 28px;
}

.content-card p:not(.eyebrow),
.info-card dd,
.info-card p {
    color: var(--rain-600);
}

.info-card dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px 14px;
    margin: 18px 0 0;
}

.info-card dt {
    color: var(--rain-500);
    font-weight: 800;
}

.info-card dd {
    margin: 0;
}

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

.related-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.related-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: var(--mist-50);
}

.related-card h3 {
    margin: 0 0 5px;
    color: var(--rain-800);
    font-size: 0.98rem;
    line-height: 1.3;
}

.related-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--rain-500);
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-footer {
    background: var(--rain-800);
    color: var(--rain-300);
    padding-top: 54px;
}

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

.footer-brand {
    color: var(--white);
    font-size: 1.35rem;
}

.site-footer p {
    max-width: 420px;
    color: var(--rain-300);
}

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

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

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

.footer-bottom {
    margin-top: 42px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    color: var(--rain-300);
    text-align: center;
    font-size: 0.9rem;
}

.is-filtered-out,
.is-search-hidden {
    display: none !important;
}

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

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

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

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

@media (max-width: 768px) {
    .header-inner {
        min-height: 66px;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid var(--rain-200);
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .main-nav.is-open {
        display: flex;
    }

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

    .nav-link::after {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-slider,
    .hero-content {
        min-height: 660px;
    }

    .hero-content {
        padding-top: 80px;
    }

    .search-panel,
    .filter-panel,
    .section-heading,
    .feature-inner {
        flex-direction: column;
        align-items: stretch;
    }

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

    .category-card-large,
    .rank-row,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(240px, 70vw);
    }

    .rank-row {
        align-items: start;
    }

    .rank-number {
        text-align: left;
    }

    .rank-poster {
        width: 100px;
    }

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

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

    .brand-subtitle {
        display: none;
    }

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

    .hero-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .search-panel {
        margin-top: -30px;
        padding: 20px;
    }

    .rank-row {
        grid-template-columns: 48px 76px 1fr;
    }

    .rank-row .btn {
        grid-column: 1 / -1;
    }
}
