:root {
    --bg: #f8fbff;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 46%, #ecfeff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.30);
}

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

.nav-links a {
    position: relative;
    padding: 10px 13px;
    border-radius: 999px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

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

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #334155;
    border-radius: 999px;
}

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

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 26%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.62), rgba(15, 23, 42, 0.20));
    pointer-events: none;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.30;
    filter: saturate(1.1) contrast(1.08);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
    align-items: center;
    gap: 46px;
}

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    font-weight: 800;
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 22px;
    font-size: clamp(42px, 6.2vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.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;
}

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

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

.btn-ghost {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-feature {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(2, 6, 23, 0.30);
}

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

.hero-card-copy {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 18px;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.20), rgba(15, 23, 42, 0.82));
    backdrop-filter: blur(10px);
}

.hero-card-copy h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.hero-card-copy p {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hero-dots {
    position: absolute;
    left: 18px;
    top: 18px;
    display: flex;
    gap: 8px;
}

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

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

.main-section {
    padding: 72px 0;
}

.section-white {
    background: #ffffff;
}

.section-soft {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

.section-warm {
    background: linear-gradient(135deg, #faf5ff 0%, #fff1f2 100%);
}

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

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

.section-head h1,
.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-link:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.grid-featured .movie-cover {
    aspect-ratio: 4 / 3;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.70));
    opacity: 0;
    transition: opacity 0.28s ease;
}

.movie-link:hover .movie-cover::after {
    opacity: 1;
}

.movie-year {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 900;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.36);
    transform: translate(-50%, -50%) scale(0.74);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-link:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
    overflow: hidden;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span,
.badge-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    font-size: 12px;
    font-weight: 800;
}

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

.category-card a {
    display: block;
    height: 100%;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4 52%, #14b8a6);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(3n + 2) a {
    background: linear-gradient(135deg, #7c3aed, #db2777 54%, #f43f5e);
}

.category-card:nth-child(3n) a {
    background: linear-gradient(135deg, #0f766e, #14b8a6 50%, #22c55e);
}

.category-card a:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
}

.category-card span {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.20);
    font-size: 13px;
    font-weight: 900;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
}

.category-card p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.category-card strong {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 14px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.filter-input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

.filter-input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.filter-select {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 52px 68px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-item a:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.13);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    font-weight: 1000;
}

.rank-item img {
    width: 68px;
    height: 68px;
    border-radius: 15px;
    object-fit: cover;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong {
    display: block;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    padding: 76px 0 54px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(6, 182, 212, 0.90)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 30%);
}

.page-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.breadcrumb {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.breadcrumb a {
    font-weight: 800;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.24);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay .play-icon-large {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 20px;
}

.detail-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-card h2,
.sidebar h2 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.2;
}

.detail-card p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 16px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: #dbeafe;
    box-shadow: var(--soft-shadow);
}

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

.sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.related-card:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.11);
}

.related-card img {
    width: 70px;
    height: 88px;
    border-radius: 13px;
    object-fit: cover;
}

.related-card strong {
    display: block;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-card em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.no-results {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

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

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

    .sidebar {
        position: static;
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .site-nav {
        height: 66px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: var(--shadow);
    }

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

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 48px 0;
    }

    .hero-feature {
        max-width: 430px;
    }

    .grid-featured,
    .grid-cards,
    .grid-compact,
    .category-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 560px) {
    .brand {
        font-size: 19px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-inner {
        min-height: 720px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p,
    .page-hero p {
        font-size: 16px;
    }

    .grid-featured,
    .grid-cards,
    .grid-compact,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

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

    .main-section {
        padding: 52px 0;
    }

    .detail-card {
        padding: 22px;
    }
}
