* {
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.82);
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #22d3ee;
    --accent-dark: #0891b2;
    --orange: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #111827 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
    font-size: 15px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted-strong);
    font-weight: 600;
}

.nav-menu > a,
.nav-dropdown > a {
    padding: 24px 0;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-dropdown:hover > a {
    color: var(--accent);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 66px;
    left: 0;
    width: 190px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted-strong);
}

.dropdown-panel a:hover {
    color: var(--accent);
    background: rgba(148, 163, 184, 0.12);
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(30, 41, 59, 0.76);
    font-size: 22px;
}

.hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-bg-item {
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.hero-bg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.05);
    transition: transform 0.6s ease;
}

.hero-bg-item:hover img {
    transform: scale(1.1);
}

.hero-bg-item span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.25) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    align-items: center;
    gap: 40px;
    padding: 70px 0;
}

.hero-kicker,
.panel-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.09);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 24px 0 20px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 32px;
    color: var(--muted-strong);
    font-size: 20px;
    line-height: 1.85;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.28);
}

.btn-muted {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(10px);
}

.btn-ghost {
    color: var(--accent);
    border: 1px solid rgba(34, 211, 238, 0.36);
    background: rgba(15, 23, 42, 0.44);
}

.hero-panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-panel h2 {
    margin: 18px 0 12px;
    font-size: 28px;
}

.hero-panel p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    font-size: 12px;
}

.hero-mini-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.56);
}

.hero-mini-card img {
    width: 72px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-mini-card span {
    color: #ffffff;
    font-weight: 700;
}

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

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

.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.section-title p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link {
    color: var(--accent);
    font-weight: 800;
}

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

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(30, 41, 59, 0.96);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.84);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0) 35%, rgba(2, 6, 23, 0.82) 100%);
}

.poster-type,
.poster-region,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 6px 9px;
    border-radius: 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.poster-type {
    left: 12px;
    background: rgba(249, 115, 22, 0.92);
}

.poster-region {
    right: 12px;
    background: rgba(2, 6, 23, 0.68);
}

.rank-badge {
    left: 12px;
    top: 54px;
    background: rgba(34, 211, 238, 0.92);
}

.poster-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(34, 211, 238, 0.78);
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: 0.22s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0 0 10px;
    min-height: 48px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h2 {
    color: var(--accent);
}

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

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span:last-child {
    color: var(--accent);
    text-align: right;
}

.compact-card .card-body h2 {
    min-height: auto;
}

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

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

.category-card,
.category-overview {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transition: transform 0.35s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.42));
}

.category-card div {
    position: relative;
    z-index: 2;
    padding: 24px;
}

.category-card h2,
.category-overview h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p,
.category-overview p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.7;
}

.page-hero {
    position: relative;
    overflow: hidden;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.26), rgba(30, 41, 59, 0.58)),
        rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -130px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
}

.page-hero > div {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.85;
}

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

.crumbs a:hover {
    color: var(--accent);
}

.crumbs strong {
    color: var(--accent);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 170px 170px 170px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.78);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.filter-empty {
    display: none;
    grid-column: 1 / -1;
    padding: 32px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

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

.category-overview {
    display: block;
    min-height: 250px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 120px;
}

.overview-thumbs img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.overview-body {
    padding: 22px;
}

.overview-body span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--accent);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.05);
    transform: scale(1.08);
    opacity: 0.34;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 70%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 44px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.lead {
    max-width: 820px;
    margin: 0 0 22px;
    color: var(--muted-strong);
    font-size: 20px;
    line-height: 1.85;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.detail-tags {
    margin-bottom: 26px;
}

.detail-section {
    padding-top: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 18px;
    padding: 24px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    text-align: center;
}

.play-ring {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.86);
    box-shadow: 0 28px 80px rgba(34, 211, 238, 0.32);
    font-size: 34px;
}

.player-cover strong {
    max-width: 760px;
    font-size: clamp(22px, 4vw, 38px);
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.detail-text {
    padding-top: 44px;
}

.detail-text h2 {
    margin: 0 0 16px;
    font-size: 30px;
}

.detail-text p {
    margin: 0 0 30px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 74px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-brand p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-links a {
    display: block;
    margin: 0 0 10px;
    color: var(--muted);
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 1024px) {
    .movie-grid,
    .compact-grid,
    .related-grid,
    .ranking-grid,
    .rank-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .search-field {
        grid-column: 1 / -1;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
    }

    .hero-panel {
        max-width: 700px;
    }
}

@media (max-width: 760px) {
    .nav-bar {
        width: min(100% - 24px, 1180px);
        min-height: 64px;
        flex-wrap: wrap;
    }

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-menu {
        display: none;
        width: 100%;
        padding: 0 0 18px;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
    }

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

    .nav-menu > a,
    .nav-dropdown > a {
        padding: 12px 0;
    }

    .dropdown-panel {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 6px;
    }

    .hero-section,
    .hero-bg-item,
    .hero-content {
        min-height: 720px;
    }

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

    .hero-bg-item:nth-child(n + 2) {
        display: none;
    }

    .hero-content {
        width: min(100% - 24px, 1180px);
        padding: 46px 0;
        gap: 24px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .content-section,
    .page-hero,
    .detail-hero-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .page-hero {
        padding: 34px 24px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .related-grid,
    .ranking-grid,
    .rank-list,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 13px;
    }

    .card-body h2 {
        min-height: 42px;
        font-size: 16px;
    }

    .card-body p {
        font-size: 13px;
    }

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

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

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

    .lead {
        font-size: 17px;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .related-grid,
    .ranking-grid,
    .rank-list,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .btn {
        width: 100%;
    }

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