:root {
    color-scheme: light;
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #ecfeff;
    --sky: #0284c7;
    --blue: #1d4ed8;
    --emerald: #059669;
    --teal: #0f766e;
    --dark: #020617;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 24px;
}

* {
    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(--ink);
    background: radial-gradient(circle at top left, #dff7ff 0, transparent 30rem), var(--bg);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.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.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.22);
}

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

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.22);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: #ffffff;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--dark);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 45%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 140px;
    color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.section-heading span,
.page-hero span,
.rank-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #ecfeff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 24px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: #e0f2fe;
    font-size: 19px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-size: 12px;
    font-weight: 800;
}

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

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    box-shadow: 0 16px 34px rgba(5, 150, 105, 0.28);
}

.secondary-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

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

.hero-dot {
    width: 44px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 76px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    width: min(920px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
}

.hero-search input,
.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 16px;
    background: #ffffff;
    color: var(--ink);
}

.hero-search input {
    min-height: 52px;
    padding: 0 18px;
}

.hero-search button {
    min-width: 132px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-weight: 900;
}

.section {
    padding: 74px 0;
}

.page-main {
    padding-top: 34px;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading.left {
    margin-left: 0;
    text-align: left;
}

.section-heading span,
.page-hero span,
.rank-head span {
    color: var(--emerald);
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.section-heading h2,
.page-hero h1,
.rank-head h2 {
    margin: 14px 0 10px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #eff6ff, #ecfdf5);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.category-cover {
    position: absolute;
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.2);
}

.category-cover-one {
    top: 22px;
    right: 22px;
    width: 86px;
    height: 118px;
    transform: rotate(7deg);
}

.category-cover-two {
    top: 46px;
    right: 76px;
    width: 70px;
    height: 98px;
    opacity: 0.72;
    transform: rotate(-10deg);
}

.category-cover-three {
    top: 70px;
    right: 130px;
    width: 58px;
    height: 82px;
    opacity: 0.46;
    transform: rotate(4deg);
}

.category-content {
    position: absolute;
    inset: auto 18px 18px 18px;
    z-index: 2;
    display: grid;
    gap: 6px;
}

.category-content strong {
    font-size: 22px;
    font-style: normal;
    font-weight: 900;
}

.category-content em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.15);
}

.poster-link {
    position: relative;
    height: 285px;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #d1fae5);
}

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

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

.poster-img.image-empty,
.rank-poster img.image-empty,
.detail-poster img.image-empty {
    opacity: 0;
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--emerald);
    font-size: 12px;
    font-weight: 900;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
    color: #94a3b8;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 19px;
    line-height: 1.28;
}

.movie-card h3 a:hover {
    color: var(--emerald);
}

.movie-card p {
    min-height: 50px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.filter-panel {
    display: grid;
    gap: 14px;
    margin: 0 0 26px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 900;
}

.search-box input {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    font-weight: 800;
    transition: all 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
}

.movie-card.is-hidden,
.rank-page-item.is-hidden {
    display: none;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.rank-head h2 {
    margin: 0;
    font-size: 28px;
}

.rank-head a {
    color: var(--emerald);
    font-weight: 900;
}

.rank-list,
.rank-page-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list li + li {
    border-top: 1px solid var(--line);
}

.rank-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    font-size: 12px;
    font-weight: 900;
}

.rank-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 64px;
    border-radius: 34px;
    background: linear-gradient(135deg, #ecfeff, #eff6ff 48%, #ecfdf5);
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 260px;
}

.category-hero {
    min-height: 300px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-weight: 800;
}

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

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

.rank-page-item a {
    display: grid;
    grid-template-columns: 64px 86px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-page-item a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.rank-num.wide {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}

.rank-poster {
    width: 86px;
    height: 118px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe, #d1fae5);
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info {
    display: grid;
    gap: 4px;
}

.rank-info strong {
    font-size: 20px;
}

.rank-info em,
.rank-info small {
    color: var(--muted);
    font-style: normal;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-bottom: 46px;
    padding: 34px;
    border-radius: 34px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    box-shadow: var(--shadow);
}

.detail-poster {
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #dbeafe, #d1fae5);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.18);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-kicker {
    color: var(--emerald);
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.detail-intro h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0;
    color: #334155;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    font-weight: 900;
}

.detail-actions .secondary-btn {
    color: var(--emerald);
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.player-section {
    margin-bottom: 46px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.36);
}

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

.video-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.74));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-shell.is-playing .video-cover {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.34);
    font-size: 34px;
}

.video-cover strong {
    font-size: 20px;
}

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

.article-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--paper);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.article-card p {
    margin: 0;
    color: #334155;
    white-space: pre-line;
}

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

.site-footer {
    margin-top: 60px;
    padding: 44px 0;
    color: #cbd5e1;
    background: #020617;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 28px;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 560px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-content: start;
}

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

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

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

    .hero {
        min-height: 680px;
    }

    .hero-copy {
        padding-top: 100px;
    }

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

    .hero-search button {
        min-height: 48px;
    }

    .category-grid,
    .category-grid.large,
    .movie-grid,
    .all-movie-grid,
    .related-grid,
    .detail-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .page-hero {
        padding: 36px;
    }

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

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

    .logo-text {
        font-size: 17px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-controls {
        bottom: 156px;
    }

    .category-grid,
    .category-grid.large,
    .movie-grid,
    .all-movie-grid,
    .related-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .poster-link {
        height: 340px;
    }

    .rank-page-item a {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .rank-poster {
        display: none;
    }

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