:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --dark: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: #1f2937;
    background: #f9fafb;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 23px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-weight: 700;
}

.site-nav a {
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--blue);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--blue);
}

.hero-section {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 52%, #14b8a6 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
    background-size: 56px 56px;
}

.hero-shell {
    position: relative;
    min-height: 660px;
    display: flex;
    align-items: center;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    align-items: center;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-copy {
    max-width: 680px;
    z-index: 2;
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy h2 + p,
.hero-copy h1 + h2 + p {
    max-width: 640px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.8;
}

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

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

.primary-btn {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22);
}

.ghost-btn {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.76);
}

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

.ghost-btn:hover {
    color: var(--blue);
    background: #ffffff;
}

.hero-visual {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 38px 78px rgba(15, 23, 42, 0.36);
    transform: rotate(2deg);
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.55));
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-search {
    position: absolute;
    left: 0;
    bottom: 58px;
    z-index: 4;
    width: min(620px, 100%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-search form {
    flex: 1;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.hero-search input,
.filter-row input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 16px 20px;
    color: #111827;
    font-size: 15px;
}

.hero-search button {
    border: 0;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 800;
    cursor: pointer;
}

.hero-search > a {
    font-weight: 800;
    white-space: nowrap;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 72px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 90px;
    background: #f9fafb;
    clip-path: polygon(0 52%, 8% 42%, 18% 52%, 32% 36%, 48% 48%, 64% 35%, 82% 45%, 100% 32%, 100% 100%, 0 100%);
}

.feature-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: -38px;
    position: relative;
    z-index: 5;
}

.feature-stats article {
    padding: 24px;
    border-radius: 24px;
    text-align: center;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.feature-stats article:hover {
    transform: translateY(-5px);
}

.feature-stats span {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.feature-stats strong {
    display: block;
    color: #111827;
    font-size: 18px;
}

.section-block {
    padding: 64px 0 12px;
}

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

.section-head h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--blue);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.18);
}

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

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

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

.card-badge,
.card-year {
    position: absolute;
    padding: 6px 9px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    top: 12px;
    right: 12px;
    background: rgba(37, 99, 235, 0.9);
}

.card-year {
    left: 12px;
    bottom: 12px;
    background: rgba(15, 23, 42, 0.68);
}

.card-body {
    padding: 18px;
}

.card-body h2 {
    min-height: 48px;
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--blue);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-tags span,
.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 150px;
    padding: 24px;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.2);
    transition: transform 0.2s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #4338ca, #2563eb);
}

.category-tile:hover {
    transform: translateY(-6px);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

.split-showcase {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
}

.ranking-panel,
.latest-panel {
    border-radius: 32px;
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ranking-panel {
    color: #ffffff;
    background: linear-gradient(145deg, #0f172a, #1e40af 58%, #0891b2);
}

.light-head h2,
.light-head a,
.light-head .section-kicker {
    color: #ffffff;
}

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

.ranking-list a {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.ranking-list span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    font-weight: 900;
}

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

.ranking-list em {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-style: normal;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.mini-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: #eff6ff;
    transform: translateY(-3px);
}

.mini-card img {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    object-fit: cover;
}

.mini-card span {
    font-weight: 800;
    line-height: 1.45;
}

.page-hero {
    padding: 78px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 58px);
    letter-spacing: -0.05em;
}

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

.category-large-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    padding: 56px 0;
}

.category-card-large {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-cover {
    display: grid;
    place-items: center;
    min-height: 220px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 24px;
    font-weight: 900;
}

.category-card-large > div {
    padding: 26px 26px 26px 0;
}

.category-card-large h2 {
    margin: 0 0 12px;
}

.category-card-large p {
    color: var(--muted);
    line-height: 1.7;
}

.category-card-large ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.category-card-large li {
    margin-top: 8px;
    color: #2563eb;
    font-weight: 700;
}

.filter-panel {
    margin-top: -34px;
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 4;
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-row input {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
}

.filter-row a {
    padding: 14px 20px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 800;
    white-space: nowrap;
}

.category-nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-nav-row a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-weight: 700;
}

.category-nav-row a.active,
.category-nav-row a:hover {
    color: #ffffff;
    background: var(--blue);
}

.empty-state {
    display: none;
    padding: 60px 0;
    text-align: center;
    color: var(--muted);
    font-weight: 800;
}

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

.rank-table {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 56px 72px minmax(0, 1fr) minmax(160px, 240px);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-row span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.rank-row img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
}

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

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

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    filter: blur(8px);
    transform: scale(1.04);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-head {
    position: relative;
    padding: 42px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-title-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-title-row > img {
    width: 280px;
    height: 380px;
    border-radius: 26px;
    object-fit: cover;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
}

.detail-title-row h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.detail-title-row p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 48px 0 0;
}

.player-card,
.content-card,
.side-card {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    padding: 12px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.64));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
    font-size: 34px;
}

.play-overlay.is-hidden {
    display: none;
}

.content-card {
    margin-top: 24px;
    padding: 28px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: #475569;
    line-height: 2;
    font-size: 16px;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.side-card {
    padding: 24px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    margin: 0;
}

.side-card dt {
    color: #64748b;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #111827;
    line-height: 1.6;
}

.side-link {
    display: block;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 800;
}

.compact-card .card-poster {
    height: 220px;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

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

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li {
    margin: 9px 0;
}

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #94a3b8;
}

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

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

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

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

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .hero-section,
    .hero-shell {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 26px;
    }

    .hero-visual {
        order: -1;
        max-width: 270px;
        margin: 0 auto;
        aspect-ratio: 3 / 4;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-actions,
    .hero-search,
    .hero-dots {
        justify-content: center;
    }

    .hero-search {
        left: 0;
        right: 0;
        bottom: 72px;
        margin: 0 auto;
        flex-direction: column;
        padding: 0 16px;
    }

    .hero-dots {
        left: 0;
        right: 0;
        bottom: 28px;
    }

    .feature-stats,
    .movie-grid,
    .home-grid,
    .category-grid,
    .category-large-grid,
    .split-showcase,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .category-card-large > div {
        padding: 24px;
    }

    .detail-title-row > img {
        width: 220px;
        height: 300px;
    }

    .rank-row {
        grid-template-columns: 42px 60px 1fr;
    }

    .rank-row em {
        grid-column: 3;
    }
}

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

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

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 34px;
    }

    .hero-copy h2 + p,
    .hero-copy h1 + h2 + p {
        font-size: 16px;
    }

    .feature-stats,
    .movie-grid,
    .home-grid,
    .category-grid,
    .category-large-grid,
    .split-showcase,
    .mini-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .card-poster {
        height: 320px;
    }

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

    .detail-title-row > img {
        width: 170px;
        height: 236px;
    }
}
