:root {
    --bg: #07111f;
    --bg-soft: #0f1d33;
    --panel: rgba(15, 23, 42, 0.84);
    --panel-solid: #111c31;
    --card: #ffffff;
    --text: #e5edf8;
    --muted: #94a3b8;
    --dark: #0f172a;
    --line: rgba(148, 163, 184, 0.2);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #f472b6;
    --orange: #f59e0b;
    --radius: 22px;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 28rem),
        linear-gradient(180deg, #07111f 0%, #0b1220 44%, #111827 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(7, 17, 31, 0.82);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #07111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-links a,
.mobile-panel a {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: var(--cyan);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.search-panel input,
.filter-bar input,
.quick-filter input {
    border: 0;
    outline: 0;
    color: #e2e8f0;
    background: transparent;
}

.top-search input {
    width: 160px;
    padding: 8px 4px 8px 12px;
}

.top-search button,
.search-panel button,
.quick-filter button {
    border: 0;
    border-radius: 999px;
    color: #06111f;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 9px 16px;
}

.menu-button {
    display: none;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    padding: 8px 12px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

.quick-cats,
.footer-links,
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-cats a,
.footer-links a,
.category-chips a {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.58);
}

.category-chips a.active {
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 34px auto 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: var(--panel-solid);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    background-image:
        linear-gradient(90deg, rgba(7, 17, 31, 0.94), rgba(7, 17, 31, 0.72), rgba(7, 17, 31, 0.36)),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-layer {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: center;
    min-height: 650px;
    padding: 72px;
}

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

.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 14px;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: rgba(8, 145, 178, 0.12);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 84px);
}

.hero p,
.page-hero p,
.detail-copy p {
    color: #cbd5e1;
    line-height: 1.85;
}

.hero p {
    max-width: 720px;
    margin: 24px 0;
    font-size: 18px;
}

.hero-meta,
.movie-tags,
.detail-actions,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #dbeafe;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.6);
}

.hero-actions,
.detail-actions {
    margin-top: 28px;
}

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

.primary-button {
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.ghost-button {
    color: #dbeafe;
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.5);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover,
.rank-hero-card:hover {
    transform: translateY(-3px);
}

.hero-cover {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    aspect-ratio: 2 / 3;
}

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

.hero-nav {
    position: absolute;
    left: 72px;
    right: 72px;
    bottom: 36px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-nav button {
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
}

.hero-nav > button {
    width: 44px;
    height: 44px;
    font-size: 26px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 36px;
    height: 9px;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 58px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.quick-filter,
.content-section,
.detail-layout,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
}

.quick-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
}

.quick-filter h2,
.section-heading h2,
.site-footer h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    font-weight: 950;
}

.quick-filter p {
    margin: 8px 0 0;
    color: var(--muted);
}

.quick-filter form,
.search-panel {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.34);
}

.quick-filter input,
.search-panel input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
}

.content-section {
    padding: 8px 0;
}

.alt-section {
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.48);
}

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

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading > a {
    color: var(--cyan);
    font-weight: 900;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.18);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.28);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #06111f;
    font-size: 12px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    color: #06111f;
    font-size: 13px;
    background: linear-gradient(135deg, #fde68a, var(--orange));
}

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

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 950;
}

.movie-card p {
    min-height: 48px;
    margin: 10px 0 14px;
    color: #475569;
    font-size: 13px;
    line-height: 1.65;
}

.movie-card .movie-tags span {
    color: #334155;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

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

.category-tile,
.category-card-large {
    min-height: 138px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.08)),
        rgba(15, 23, 42, 0.78);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile span,
.category-card-large h2 {
    display: block;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

.category-tile small,
.category-card-large p,
.category-card-large li {
    color: #cbd5e1;
    line-height: 1.7;
}

.category-card-large ul {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 54px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 26rem),
        rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(34px, 5vw, 62px);
}

.page-hero p {
    max-width: 740px;
    margin: 18px 0 0;
    font-size: 18px;
}

.category-hero .category-chips {
    margin-top: 24px;
}

.filter-bar {
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.54);
}

.filter-bar label {
    display: grid;
    gap: 10px;
    color: #cbd5e1;
    font-weight: 900;
}

.filter-bar input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

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

.ranking-hero {
    background:
        radial-gradient(circle at 90% 10%, rgba(244, 114, 182, 0.16), transparent 24rem),
        radial-gradient(circle at 12% 6%, rgba(34, 211, 238, 0.16), transparent 22rem),
        rgba(15, 23, 42, 0.72);
}

.rank-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.rank-hero-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 24px;
    background-image:
        linear-gradient(180deg, rgba(7, 17, 31, 0.22), rgba(7, 17, 31, 0.92)),
        var(--rank-image);
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.3);
    transition: transform 0.24s ease;
}

.rank-hero-card span {
    color: #fde68a;
    font-weight: 950;
}

.rank-hero-card h2 {
    margin: 8px 0;
    font-size: 24px;
    font-weight: 950;
}

.rank-hero-card p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.7;
}

.search-panel {
    max-width: 760px;
    margin-top: 26px;
}

.search-meta {
    margin-bottom: 18px;
    color: #cbd5e1;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background-image:
        linear-gradient(90deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.76), rgba(7, 17, 31, 0.46)),
        var(--detail-image);
    background-position: center;
    background-size: cover;
}

.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 54px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.2);
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    box-shadow: 0 34px 78px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: #93c5fd;
    font-weight: 800;
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 74px);
}

.detail-copy p {
    max-width: 760px;
    margin: 22px 0;
    font-size: 18px;
}

.large-tags span {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 13px;
}

.player-section {
    scroll-margin-top: 86px;
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    text-align: center;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.74));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #06111f;
    font-size: 32px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 22px 50px rgba(34, 211, 238, 0.28);
}

.player-layer strong {
    display: block;
    font-size: 22px;
}

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

.detail-article,
.detail-side {
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.58);
}

.detail-article h2,
.detail-side h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 26px;
    color: #dbeafe;
    line-height: 2;
    font-size: 16px;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side div {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-side dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-side dd {
    margin: 5px 0 0;
    color: #e2e8f0;
    font-weight: 900;
}

.related-section {
    margin-bottom: 44px;
}

.site-footer {
    margin-top: 60px;
    padding: 46px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.42);
}

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

.site-footer h2 {
    margin-bottom: 14px;
    font-size: 20px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.8;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .top-search {
        display: none;
    }

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

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

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

    .menu-button {
        display: inline-flex;
        margin-left: auto;
    }

    .hero,
    .hero-layer {
        min-height: auto;
    }

    .hero {
        border-radius: 26px;
    }

    .hero-layer {
        grid-template-columns: 1fr;
        padding: 38px 24px 86px;
    }

    .hero-cover {
        max-width: 260px;
    }

    .hero-nav {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }

    .quick-filter,
    .detail-layout,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        display: none;
    }

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

    .hero p,
    .page-hero p,
    .detail-copy p {
        font-size: 15px;
    }

    .quick-filter form,
    .search-panel {
        border-radius: 20px;
        flex-direction: column;
    }

    .quick-filter button,
    .search-panel button {
        width: 100%;
        min-height: 44px;
    }

    .video-shell {
        border-radius: 18px;
    }
}
