:root {
    --bg: #f7fbff;
    --bg-soft: #eef9ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(14, 165, 233, 0.18);
    --primary: #0891b2;
    --primary-dark: #0369a1;
    --accent: #2563eb;
    --cyan: #06b6d4;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.11);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.15), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.13), transparent 32rem),
        var(--bg);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.65;
}

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

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

.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(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--accent));
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.28);
}

.brand-name {
    font-size: 1.28rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary-dark);
    background: rgba(6, 182, 212, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(14, 165, 233, 0.1);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 22px 62px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 580px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.98), rgba(37, 99, 235, 0.86)),
        linear-gradient(90deg, #0e7490, #1d4ed8);
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.22), transparent 18rem),
        radial-gradient(circle at 80% 60%, rgba(125, 211, 252, 0.28), transparent 20rem);
    pointer-events: none;
}

.hero-track {
    position: relative;
    min-height: 580px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: 30px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 14px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    max-width: 780px;
    color: white;
    font-size: clamp(2.35rem, 5vw, 5.1rem);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
}

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

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

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

.button.primary {
    color: var(--primary-dark);
    background: white;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.button.ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: rgba(6, 182, 212, 0.1);
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-tags span {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: relative;
    isolation: isolate;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 22px -18px -16px 22px;
    z-index: -1;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(2px);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 32px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
}

.hero-rank {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 16px;
    color: white;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 58px;
    background: white;
}

.section {
    margin-top: 52px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

.link-more {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line);
    box-shadow: var(--shadow);
}

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

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

.poster-link img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-shine {
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.45), transparent);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-size: 0.78rem;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.22);
}

.card-body {
    padding: 14px 14px 16px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-meta em {
    color: var(--primary-dark);
    font-style: normal;
}

.card-body h2 {
    margin: 8px 0 0;
    font-size: 1rem;
    line-height: 1.35;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 22px;
    border-radius: 26px;
    color: white;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.9));
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -54px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h2 {
    position: relative;
    margin: 0;
    font-size: 1.35rem;
}

.category-card p {
    position: relative;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.86);
}

.category-card span {
    position: absolute;
    left: 22px;
    bottom: 22px;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 0 14px;
    color: var(--text);
    background: white;
    outline: none;
    font: inherit;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rank-number {
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: 900;
}

.rank-item img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
}

.rank-item h2 {
    margin: 0;
    font-size: 1.08rem;
}

.rank-item p {
    margin: 6px 0 0;
    color: var(--muted);
}

.rank-score {
    padding: 8px 12px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(90deg, #f97316, #ef4444);
    font-weight: 900;
}

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

.player-panel,
.detail-panel,
.side-panel {
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.player-panel {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}

.player-cover img {
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    filter: saturate(1.1);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(6, 182, 212, 0.1), rgba(2, 6, 23, 0.68)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.player-cover.is-hidden {
    display: none;
}

.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--accent));
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.34);
}

.play-button span {
    display: block;
    margin-left: 6px;
    font-size: 2rem;
}

.player-info {
    padding: 22px;
}

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

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

.detail-panel {
    padding: 26px;
}

.detail-panel h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: rgba(6, 182, 212, 0.1);
    font-weight: 800;
}

.detail-panel h2,
.side-panel h2 {
    margin: 26px 0 10px;
    font-size: 1.35rem;
}

.detail-panel p {
    margin: 0 0 14px;
    color: #334155;
}

.side-panel {
    padding: 20px;
}

.side-panel .movie-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0;
}

.movie-card.compact .poster-link img {
    height: 100%;
    min-height: 130px;
}

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

.movie-card.compact .card-body p,
.movie-card.compact .tag-row span:nth-child(n + 3) {
    display: none;
}

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 22px;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 32px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: white;
    font-size: 1rem;
}

.footer-grid p {
    margin: 12px 0 0;
    color: #94a3b8;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #67e8f9;
}

.footer-brand {
    color: white;
    font-size: 1.2rem;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 22px 30px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
    font-size: 0.9rem;
}

.empty-state {
    display: none;
    padding: 38px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.86);
    text-align: center;
}

.empty-state.show {
    display: block;
}

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

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

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

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

    .movie-card.compact {
        display: flex;
    }

    .movie-card.compact .card-body p {
        display: -webkit-box;
    }
}

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

    .nav-toggle {
        display: block;
    }

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

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

    .hero-poster {
        max-width: 320px;
        margin: 0 auto;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 46px 78px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        width: fit-content;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .page-main {
        padding: 18px 14px 42px;
    }

    .nav-shell {
        padding: 0 14px;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

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

    .section-heading {
        display: block;
    }

    .play-button {
        width: 68px;
        height: 68px;
    }
}
