:root {
    --lotus-50: #f4f9f7;
    --lotus-100: #dceee7;
    --lotus-200: #b9ddcf;
    --lotus-500: #498874;
    --lotus-600: #396d5d;
    --mist-50: #f8fafb;
    --mist-100: #f0f4f7;
    --mist-200: #e1e9ef;
    --mist-400: #8ca0b5;
    --mist-500: #6d8197;
    --mist-600: #5a6f86;
    --mist-700: #4a5f78;
    --mist-800: #3d4d62;
    --mist-900: #354354;
    --paper: #ffffff;
    --ink: #111827;
    --radius-xl: 24px;
    --shadow-soft: 0 18px 45px rgba(53, 67, 84, 0.14);
    --shadow-card: 0 12px 30px rgba(53, 67, 84, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--mist-50) 0%, #ffffff 42%, var(--lotus-50) 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(225, 233, 239, 0.86);
    backdrop-filter: blur(16px);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: Georgia, Cambria, "Times New Roman", serif;
    font-weight: 700;
    color: var(--mist-900);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--lotus-500), var(--mist-700));
    box-shadow: 0 10px 22px rgba(73, 136, 116, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav > a,
.nav-dropdown > button,
.mobile-nav a {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--mist-700);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown > button:hover,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--lotus-600);
    background: var(--lotus-100);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 520px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--mist-200);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--mist-700);
}

.nav-dropdown-panel a:hover {
    background: var(--lotus-50);
    color: var(--lotus-600);
}

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

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--mist-800);
}

.mobile-nav {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid var(--mist-200);
    background: #fff;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--mist-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.85s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-content {
    width: min(760px, calc(100% - 44px));
    margin-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
    color: #fff;
    animation: fadeIn 0.55s ease;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--lotus-100);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-family: Georgia, Cambria, "Times New Roman", "Noto Serif SC", serif;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 1.05;
    font-weight: 800;
}

.hero-content h2 {
    font-size: clamp(34px, 5vw, 62px);
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-actions,
.detail-tags,
.detail-meta,
.movie-meta,
.ranking-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #fff;
    background: var(--lotus-500);
    box-shadow: 0 12px 28px rgba(73, 136, 116, 0.32);
}

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

.primary-button:hover {
    background: var(--lotus-600);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 32px;
    background: #fff;
}

.section-shell {
    width: min(1240px, calc(100% - 44px));
    margin: 0 auto;
    padding: 58px 0;
}

.search-panel,
.flat-panel,
.category-panel,
.detail-text,
.player-section {
    border: 1px solid var(--mist-200);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-card);
}

.search-panel {
    margin-top: -60px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
    gap: 24px;
    padding: 30px;
}

.search-panel h2,
.category-panel h2,
.detail-text h2 {
    margin: 0 0 10px;
    font-family: Georgia, Cambria, "Times New Roman", "Noto Serif SC", serif;
    font-size: 28px;
    color: var(--mist-900);
}

.search-panel p,
.category-panel p,
.detail-text p {
    margin: 0;
    color: var(--mist-600);
    line-height: 1.8;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    gap: 12px;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--mist-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--mist-800);
    background: #fff;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--lotus-500);
    box-shadow: 0 0 0 4px rgba(73, 136, 116, 0.13);
}

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading span,
.page-hero span,
.detail-kicker {
    color: var(--lotus-600);
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-family: Georgia, Cambria, "Times New Roman", "Noto Serif SC", serif;
    font-size: clamp(28px, 4vw, 44px);
    color: var(--mist-900);
}

.section-heading a {
    color: var(--lotus-600);
    font-weight: 700;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(53, 67, 84, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--lotus-200);
    box-shadow: var(--shadow-card);
}

.movie-card.is-hidden {
    display: none;
}

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

.movie-card-large .movie-poster {
    aspect-ratio: 16 / 9;
}

.movie-poster img,
.ranking-thumb img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.06);
}

.movie-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
}

.movie-tags span,
.detail-tags a {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--lotus-600);
    background: var(--lotus-50);
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card h3 a:hover,
.ranking-item h3 a:hover {
    color: var(--lotus-600);
}

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

.movie-meta,
.ranking-meta {
    color: var(--mist-500);
    font-size: 13px;
}

.movie-meta a {
    color: var(--lotus-600);
    font-weight: 700;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 46px 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
}

.ranking-list-large .ranking-item {
    grid-template-columns: 60px 110px minmax(0, 1fr);
    padding: 16px;
}

.ranking-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--lotus-500), var(--mist-700));
    font-weight: 800;
}

.ranking-thumb {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--mist-100);
}

.ranking-item h3 {
    margin: 0 0 6px;
    color: var(--mist-900);
    font-size: 17px;
}

.ranking-item p {
    margin: 0 0 8px;
    color: var(--mist-600);
    line-height: 1.6;
}

.category-panel {
    position: sticky;
    top: 88px;
    padding: 24px;
}

.category-mini-grid,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-mini-grid a,
.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--mist-700);
    background: var(--mist-100);
}

.category-mini-grid a:hover,
.footer-links a:hover {
    color: #fff;
    background: var(--lotus-500);
}

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

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

.category-card {
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(53, 67, 84, 0.08);
    overflow: hidden;
}

.category-card-main {
    min-height: 170px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--lotus-50), var(--mist-50));
}

.category-card-main span {
    color: var(--lotus-600);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.category-card-main strong {
    color: var(--mist-900);
    font-size: 19px;
    line-height: 1.6;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 16px 22px 20px;
}

.category-samples a {
    color: var(--mist-600);
    font-size: 14px;
}

.category-samples a:hover {
    color: var(--lotus-600);
}

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 80% 20%, rgba(73, 136, 116, 0.24), transparent 34%), linear-gradient(135deg, var(--mist-900), var(--mist-700));
    color: #fff;
}

.page-hero > div {
    width: min(1240px, calc(100% - 44px));
    margin: 0 auto;
    padding: 70px 0;
}

.page-hero h1 {
    color: #fff;
}

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

.flat-panel {
    margin-top: -50px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.detail-hero {
    min-height: 640px;
    padding: 78px max(22px, calc((100vw - 1240px) / 2 + 22px));
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    color: #fff;
    background: radial-gradient(circle at 18% 20%, rgba(73, 136, 116, 0.42), transparent 32%), linear-gradient(135deg, var(--mist-900), var(--mist-700));
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    background: var(--mist-100);
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.32);
}

.detail-info .breadcrumb {
    margin: 0 0 24px;
}

.detail-info h1 {
    color: #fff;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.09);
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section,
.detail-text {
    padding: 28px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #05070a;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #05070a;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
    cursor: pointer;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--lotus-500);
    box-shadow: 0 18px 42px rgba(73, 136, 116, 0.44);
    font-size: 30px;
    transform: translateX(2px);
}

.detail-text {
    color: var(--mist-700);
    line-height: 1.95;
}

.detail-text h2:not(:first-child) {
    margin-top: 26px;
}

.site-footer {
    margin-top: 60px;
    background: linear-gradient(180deg, var(--mist-50), var(--mist-100));
    border-top: 1px solid var(--mist-200);
}

.footer-shell {
    width: min(1240px, calc(100% - 44px));
    margin: 0 auto;
    padding: 42px 0 26px;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 34px;
}

.footer-shell p {
    max-width: 420px;
    color: var(--mist-600);
    line-height: 1.8;
}

.copyright {
    width: min(1240px, calc(100% - 44px));
    margin: 0 auto;
    padding: 18px 0 34px;
    color: var(--mist-500);
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .featured-grid,
    .split-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .category-panel {
        position: static;
    }

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

    .detail-hero {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

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

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

    .hero-content {
        margin: 0 22px;
    }

    .section-shell {
        width: min(100% - 28px, 1240px);
        padding: 42px 0;
    }

    .search-panel,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .featured-grid,
    .dense-grid,
    .category-grid,
    .category-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

    .ranking-item,
    .ranking-list-large .ranking-item {
        grid-template-columns: 40px 72px minmax(0, 1fr);
        gap: 10px;
    }

    .ranking-rank {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 38px 18px 60px;
    }

    .detail-poster {
        width: min(240px, 74vw);
        margin: 0 auto;
    }

    .detail-one-line {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .featured-grid,
    .dense-grid,
    .category-grid,
    .category-grid-wide {
        grid-template-columns: 1fr;
    }

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
