:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-500: #64748b;
    --white: #ffffff;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 32px rgba(2, 132, 199, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--sky-50) 0%, #ffffff 48%, #f8fafc 100%);
    line-height: 1.65;
}

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.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(186, 230, 253, 0.72);
}

.site-header-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--slate-700);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sky-600);
    background: var(--sky-100);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--sky-100);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--sky-600);
    border-radius: 2px;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-track {
    position: relative;
    min-height: 72vh;
}

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

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

.hero-content {
    width: min(760px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1200px) / 2));
    color: var(--white);
    padding: 48px 0;
}

.hero-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e0f2fe;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-content h1,
.hero-content h2 {
    margin: 16px 0 8px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content strong {
    display: block;
    margin-bottom: 16px;
    font-size: clamp(22px, 3vw, 34px);
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: #ecfeff;
    font-size: 18px;
}

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

.primary-button,
.ghost-button,
.home-search 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, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.36);
    border: 0;
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.38);
}

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

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

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

.hero-tags span,
.movie-meta-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
}

.movie-meta-row span,
.tag-cloud span {
    color: var(--sky-700);
    background: var(--sky-100);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(15, 23, 42, 0.36);
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

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

.section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
}

.section-narrow {
    padding-bottom: 16px;
}

.quick-search-card,
.filter-panel,
.ranking-panel,
.detail-article,
.related-panel,
.category-overview-card,
.rank-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(186, 230, 253, 0.72);
    box-shadow: var(--shadow-card);
}

.quick-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius-xl);
    transform: translateY(-48px);
}

.quick-search-card h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2,
.related-panel h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.quick-search-card p {
    margin: 8px 0 0;
    color: var(--slate-500);
}

.home-search {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--sky-200);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--slate-700);
    background: var(--white);
    outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--sky-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

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

.section-heading span {
    color: var(--sky-600);
}

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

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

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

.category-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 8px;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.category-card span {
    font-size: 22px;
    font-weight: 800;
}

.category-card strong {
    font-size: 14px;
    font-weight: 500;
    color: #ecfeff;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid rgba(186, 230, 253, 0.7);
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--sky-100);
}

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

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

.poster-year {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.56);
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.3;
}

.movie-card h2 a:hover,
.compact-card:hover strong,
.rank-card h2 a:hover {
    color: var(--sky-600);
}

.movie-card p {
    margin: 0;
    color: var(--slate-500);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    border-radius: var(--radius-xl);
    padding: 22px;
}

.compact-heading h2 {
    font-size: 28px;
}

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

.ranking-list a {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

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

.ranking-list span {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    font-weight: 800;
}

.ranking-list strong,
.ranking-list em {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
    padding: 60px;
    border-radius: 32px;
    color: var(--white);
}

.soft-hero {
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    box-shadow: var(--shadow-soft);
}

.page-hero h1 {
    margin-top: 8px;
    font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #ecfeff;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px 200px;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px;
    border-radius: var(--radius-xl);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--slate-700);
    font-weight: 700;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 20px;
    text-align: center;
    color: var(--slate-500);
    background: var(--sky-50);
    border-radius: var(--radius-lg);
}

.empty-state.is-visible {
    display: block;
}

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

.category-overview-card {
    min-height: 260px;
    padding: 28px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background-size: cover;
    background-position: center;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 30px;
}

.category-overview-card p {
    color: #ecfeff;
}

.category-overview-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.category-overview-card div a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 13px;
}

.breadcrumb {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--sky-600);
    font-weight: 700;
}

.detail-hero {
    width: min(1200px, calc(100% - 32px));
    min-height: 520px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    padding: 44px;
    color: var(--white);
    border-radius: 32px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.detail-copy h1 {
    margin-top: 16px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.05;
}

.detail-copy p {
    max-width: 760px;
    color: #ecfeff;
    font-size: 18px;
}

.player-section {
    padding-bottom: 20px;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--sky-600);
    background: var(--white);
    font-size: 32px;
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
    font-size: clamp(22px, 4vw, 36px);
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-article,
.related-panel {
    border-radius: var(--radius-xl);
    padding: 28px;
}

.detail-article h2,
.related-panel h2 {
    margin-bottom: 12px;
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 28px;
    color: var(--slate-700);
    font-size: 17px;
}

.tag-cloud {
    margin-top: 10px;
}

.next-prev {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 28px;
}

.next-prev a {
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--sky-700);
    background: var(--sky-50);
    font-weight: 700;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.2s ease;
}

.compact-card:hover {
    background: var(--sky-50);
}

.compact-card img {
    width: 76px;
    height: 58px;
    object-fit: cover;
    border-radius: 14px;
}

.compact-card span {
    min-width: 0;
}

.compact-card strong,
.compact-card em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-section {
    display: grid;
    gap: 16px;
}

.rank-card {
    display: grid;
    grid-template-columns: 74px 140px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-card img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-number {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    font-weight: 900;
}

.rank-card h2 {
    margin: 8px 0 6px;
    font-size: 22px;
}

.rank-card p {
    margin: 0;
    color: var(--slate-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-footer {
    margin-top: 48px;
    padding: 48px 0 24px;
    color: #e0f2fe;
    background: linear-gradient(135deg, #075985, #0e7490);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
}

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

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

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

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

.footer-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--sky-100);
}

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

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

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .site-header-inner {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: var(--white);
        box-shadow: var(--shadow-soft);
    }

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

    .nav-link {
        text-align: center;
    }

    .hero-slider,
    .hero-track {
        min-height: 640px;
    }

    .hero-content {
        width: calc(100% - 36px);
        margin: 0 auto;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-card,
    .filter-panel,
    .footer-grid,
    .next-prev {
        grid-template-columns: 1fr;
    }

    .home-search {
        flex-direction: column;
    }

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

    .page-hero,
    .detail-hero {
        padding: 32px 22px;
        border-radius: 24px;
    }

    .section {
        padding: 42px 0;
    }

    .rank-card {
        grid-template-columns: 54px 94px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-card img {
        width: 94px;
        height: 76px;
    }

    .rank-number {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 17px;
    }

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

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