:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --green: #10b981;
    --orange: #f97316;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand {
    font-size: 22px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--blue);
    background: #eff6ff;
    transform: translateY(-1px);
}

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

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

.page-section,
.hero-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-shell {
    padding: 34px 0 26px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 20%, rgba(6, 182, 212, 0.45), transparent 28%),
        radial-gradient(circle at 82% 0%, rgba(37, 99, 235, 0.55), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0891b2 100%);
    box-shadow: var(--shadow);
}

.hero-slider::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.18));
    z-index: 1;
}

.hero-slider::after {
    content: "";
    position: absolute;
    inset: auto 46px 34px auto;
    width: 240px;
    height: 240px;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(25px);
    border-radius: 999px;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr);
    align-items: center;
    gap: 42px;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    z-index: 2;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #dbeafe;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 22px 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 0;
    max-width: 680px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.hero-meta span {
    padding: 8px 13px;
    background: rgba(255, 255, 255, 0.14);
    color: #eff6ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(255, 255, 255, 0.24);
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.btn-blue {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.hero-poster-wrap {
    position: relative;
    width: min(360px, 100%);
    justify-self: center;
}

.hero-poster-wrap::before {
    content: "";
    position: absolute;
    inset: 24px -18px -18px 24px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

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

.hero-dots {
    position: absolute;
    left: 58px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dots button.is-active {
    width: 58px;
    background: #ffffff;
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
    max-width: 760px;
}

.section-link {
    color: var(--blue);
    font-weight: 800;
    white-space: nowrap;
}

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

.category-card {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.16), transparent 38%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 24px 52px rgba(37, 99, 235, 0.13);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

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

.movie-card {
    position: relative;
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(6, 182, 212, 0.18)),
        #e2e8f0;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.75));
    opacity: 0.78;
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.36);
}

.card-rank {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.movie-meta-line span {
    min-height: 24px;
    padding: 3px 9px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}

.movie-card h3,
.rank-info h3,
.related-list h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.related-list h3 a:hover {
    color: var(--blue);
}

.movie-card p,
.rank-info p,
.detail-copy p {
    color: var(--muted);
    line-height: 1.72;
}

.movie-card p {
    min-height: 72px;
    margin: 0 0 12px;
    font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
    min-height: 26px;
    padding: 4px 9px;
    color: var(--blue);
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.filter-panel {
    margin: 0 0 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.filter-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.filter-input-wrap span {
    color: var(--blue);
    font-size: 22px;
}

.filter-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chips button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #334155;
    background: #f1f5f9;
    cursor: pointer;
    font-weight: 750;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-chips button:hover,
.filter-chips button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.empty-state {
    display: none;
    margin: 18px 0 0;
    color: var(--muted);
}

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

.filter-hidden {
    display: none !important;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--blue));
    font-size: 20px;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

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

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

.rank-info p {
    margin: 0;
}

.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 800;
    white-space: nowrap;
}

.detail-hero {
    margin-top: 34px;
    padding: 32px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 90% 0%, rgba(6, 182, 212, 0.22), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 22px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
    gap: 32px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: #e2e8f0;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-lead {
    margin: 0 0 20px;
    color: #334155;
    font-size: 18px;
    line-height: 1.85;
}

.detail-tags {
    margin: 20px 0;
}

.player-section {
    margin-top: 34px;
    border-radius: 30px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

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

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    padding: 0;
    background: #020617;
    cursor: pointer;
    overflow: hidden;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    filter: saturate(1.08);
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.player-start span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 54px rgba(6, 182, 212, 0.36);
    font-size: 30px;
    padding-left: 4px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-top: 34px;
}

.detail-article,
.related-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-article {
    padding: 28px;
}

.detail-article h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-article p {
    color: #334155;
    line-height: 1.9;
    font-size: 16px;
}

.related-panel {
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 92px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #e2e8f0;
}

.related-thumb img {
    height: 100%;
    object-fit: cover;
}

.related-list h3 {
    font-size: 15px;
    margin: 0 0 5px;
}

.related-list p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    gap: 20px;
}

.footer-brand {
    color: var(--blue);
    font-size: 22px;
}

.footer-inner p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.footer-links a {
    color: #334155;
    font-weight: 700;
}

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

.footer-links.compact a {
    color: var(--muted);
    font-size: 14px;
}

.copyright {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    font-size: 14px;
}

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

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

    .related-panel {
        position: static;
    }
}

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

    .nav-shell {
        position: relative;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 0 0 22px 22px;
        background: #ffffff;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    }

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

    .nav-links a {
        border-radius: 12px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px;
        gap: 20px;
    }

    .hero-poster-wrap {
        width: min(230px, 62vw);
        justify-self: start;
    }

    .hero-slider {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-dots {
        left: 34px;
        bottom: 24px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 54px 76px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .nav-shell,
    .page-section,
    .hero-shell,
    .detail-shell,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 19px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero-shell {
        padding-top: 16px;
    }

    .hero-slider {
        min-height: 700px;
    }

    .hero-slide {
        padding: 24px;
    }

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

    .hero-copy p,
    .detail-lead {
        font-size: 16px;
    }

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

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

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

    .movie-card p {
        min-height: auto;
    }

    .filter-panel {
        padding: 12px;
    }

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

    .detail-article,
    .related-panel {
        padding: 18px;
    }

    .rank-row {
        grid-template-columns: 46px 70px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-num {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 16px;
    }

    .rank-info h3 {
        font-size: 17px;
    }
}
