:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --cyan-deep: #0891b2;
    --shadow: 0 24px 80px rgba(6, 182, 212, 0.14);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(6, 182, 212, 0.18), transparent 28rem),
        radial-gradient(circle at 88% 15%, rgba(14, 165, 233, 0.12), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.38);
}

.nav-inner {
    max-width: 1200px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.35);
    font-size: 16px;
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand strong {
    font-size: 21px;
    letter-spacing: 0.02em;
}

.brand small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-links > a,
.dropdown > a {
    color: var(--soft);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-links > a:hover,
.dropdown > a:hover,
.nav-links .is-active,
.dropdown > .is-active {
    color: var(--cyan);
}

.dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    min-width: 230px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 22px 70px rgba(2, 6, 23, 0.45);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.dropdown:hover .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

.dropdown-panel a:hover {
    background: rgba(34, 211, 238, 0.11);
    color: var(--cyan);
}

.nav-search {
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.nav-search input {
    width: 150px;
    padding: 10px 0 10px 15px;
    color: white;
    background: transparent;
    border: 0;
    outline: 0;
}

.nav-search button {
    width: 40px;
    height: 40px;
    border: 0;
    color: var(--cyan);
    background: transparent;
    cursor: pointer;
}

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

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.04) 55%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    min-height: 72vh;
    margin: 0 auto;
    padding: 80px 20px 90px;
    display: flex;
    align-items: center;
}

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

.hero-copy h1 {
    margin: 18px 0;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 620px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.rank-meta,
.meta-row,
.detail-tags,
.breadcrumb,
.info-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.info-list span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.22);
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.section-more,
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary,
.search-button {
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
    box-shadow: 0 16px 44px rgba(6, 182, 212, 0.26);
}

.btn-ghost,
.section-more {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

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

.hero-thumbs {
    position: absolute;
    right: 50%;
    bottom: 34px;
    z-index: 3;
    transform: translateX(580px);
    display: flex;
    gap: 10px;
}

.hero-thumbs button {
    width: 54px;
    height: 38px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.8);
    opacity: 0.65;
}

.hero-thumbs button.is-active {
    border-color: var(--cyan);
    opacity: 1;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 56px 0 0;
}

.section-head,
.page-hero-inner,
.detail-layout,
.footer-grid,
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

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

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-head h2,
.page-title,
.detail-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.035em;
}

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

.movie-card,
.category-tile,
.info-panel,
.rank-card,
.search-panel,
.player-panel,
.story-panel,
.related-panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.18);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

.poster::after,
.rank-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.02));
}

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

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

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: white;
    background: rgba(6, 182, 212, 0.9);
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.32);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
}

.poster-year,
.rank-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: white;
    font-weight: 900;
    font-size: 12px;
}

.poster-year {
    right: 12px;
    bottom: 12px;
    padding: 6px 9px;
    background: rgba(2, 6, 23, 0.72);
}

.rank-mark {
    left: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, #ec4899);
}

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

.meta-row,
.rank-meta {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.meta-row a,
.rank-meta a,
.breadcrumb a {
    color: var(--cyan);
}

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover {
    color: var(--cyan);
}

.movie-card p,
.rank-info p,
.category-tile p,
.story-panel p,
.related-panel p,
.page-lead {
    color: var(--muted);
    line-height: 1.78;
}

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

.tag-row span {
    padding: 5px 8px;
    font-size: 12px;
}

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

.category-tile {
    display: block;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.52);
}

.category-tile h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.category-tile p {
    margin: 0;
    font-size: 14px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 168px 1fr;
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.48);
}

.rank-poster {
    position: relative;
    min-height: 132px;
    overflow: hidden;
}

.rank-info {
    position: relative;
    padding: 17px;
}

.rank-number {
    display: inline-grid;
    min-width: 34px;
    height: 34px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 12px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 12px;
    font-size: 14px;
}

.page-hero {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.08));
    border-bottom: 1px solid var(--line);
}

.page-hero-inner {
    padding-top: 56px;
    padding-bottom: 48px;
}

.page-lead {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 17px;
}

.filter-bar,
.search-panel {
    margin-bottom: 24px;
    padding: 16px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.search-panel input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 0 17px;
    color: white;
    outline: 0;
    background: rgba(15, 23, 42, 0.85);
}

.search-panel form {
    display: flex;
    gap: 12px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.28;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.04);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.7), #0f172a 94%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 46px 20px 34px;
}

.breadcrumb {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.detail-title {
    max-width: 920px;
}

.detail-summary {
    max-width: 820px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.82;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.05fr) minmax(280px, 0.95fr);
    gap: 24px;
    padding-top: 34px;
}

.player-panel {
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #020617;
    transition: opacity 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

.player-cover span {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: rgba(6, 182, 212, 0.9);
    box-shadow: 0 20px 70px rgba(6, 182, 212, 0.36);
    font-size: 27px;
}

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

.player-meta,
.story-panel,
.related-panel {
    padding: 22px;
}

.player-meta h2,
.story-panel h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-panel {
    margin-top: 24px;
}

.story-panel p {
    margin: 0 0 16px;
}

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

.related-mini {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: center;
}

.related-mini img {
    width: 94px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
}

.related-mini h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

.related-mini p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding-top: 44px;
    padding-bottom: 34px;
}

.footer-brand {
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

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

.footer-links {
    display: grid;
    gap: 9px;
}

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

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    padding-bottom: 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 14px;
}

.empty-result {
    padding: 42px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 20px;
}

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

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

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

    .hero-thumbs {
        right: 20px;
        transform: none;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
    }

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

    .dropdown-panel {
        position: static;
        display: grid;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        min-width: 0;
        margin-top: 10px;
        box-shadow: none;
    }

    .nav-search input {
        width: 100%;
    }

    .hero-content {
        padding-top: 56px;
        align-items: flex-end;
    }

    .hero-thumbs {
        display: none;
    }

    .movie-grid,
    .rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 132px 1fr;
    }

    .footer-bottom,
    .section-head,
    .filter-bar,
    .search-panel form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    .brand small {
        display: none;
    }

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

    .rank-card {
        grid-template-columns: 110px 1fr;
    }

    .rank-info p {
        display: none;
    }

    .detail-title,
    .page-title {
        font-size: 31px;
    }
}
