:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --emerald: #34d399;
    --emerald-strong: #10b981;
    --yellow: #facc15;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, PingFang SC, Microsoft YaHei, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(18px);
}

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

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

.brand {
    font-size: 22px;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #052e16;
    background: linear-gradient(135deg, var(--emerald), #a7f3d0);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.38);
}

.nav-search {
    flex: 1;
    display: flex;
    max-width: 480px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.86);
}

.nav-search input,
.mobile-panel input,
.wide-search input,
.filter-panel input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input {
    padding: 11px 16px;
}

.nav-search button,
.mobile-panel button,
.wide-search button {
    border: 0;
    color: #052e16;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald), #86efac);
}

.nav-search button {
    padding: 0 18px;
}

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

.nav-link,
.nav-dropdown > button {
    border: 0;
    color: var(--soft);
    cursor: pointer;
    background: transparent;
    font-weight: 700;
    padding: 10px 8px;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown > button:hover {
    color: var(--emerald);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 4px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

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

.dropdown-panel a:hover {
    color: var(--text);
    background: rgba(52, 211, 153, 0.12);
}

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

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

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

.mobile-panel.is-open {
    display: block;
}

.mobile-panel form {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.mobile-panel input {
    padding: 12px 14px;
}

.mobile-panel button {
    padding: 0 16px;
}

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.mobile-links a {
    padding: 12px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.08);
}

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

.hero-slider {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    padding: 28px 0 14px;
}

.hero-stage {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

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

.hero-bg,
.detail-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(650px, 100%);
    padding: 70px 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 590px;
}

.eyebrow {
    color: var(--emerald);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1,
.intro-block h1 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-info p,
.intro-block p {
    color: var(--soft);
    font-size: 17px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.detail-tags,
.tag-row,
.tag-cloud,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-row span,
.tag-cloud a,
.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.7);
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-row span,
.tag-cloud a {
    padding: 7px 11px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
}

.primary-button {
    color: #052e16;
    background: linear-gradient(135deg, var(--emerald), #a7f3d0);
    box-shadow: 0 16px 36px rgba(16, 185, 129, 0.32);
}

.ghost-button {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
}

.hero-control-row {
    position: absolute;
    z-index: 5;
    right: 24px;
    bottom: 24px;
    display: flex;
    gap: 10px;
}

.hero-control-row button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    font-size: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.hero-rail {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.rail-heading span,
.section-title h2 {
    font-size: 26px;
    font-weight: 900;
}

.rail-heading a,
.section-title a {
    color: var(--emerald);
    font-weight: 800;
}

.hero-pick,
.side-list a {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: 0.2s ease;
}

.hero-pick:hover,
.side-list a:hover {
    background: rgba(52, 211, 153, 0.1);
}

.hero-pick img,
.side-list img {
    width: 78px;
    height: 102px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-pick strong,
.side-list strong {
    display: block;
    color: var(--text);
    line-height: 1.35;
}

.hero-pick em,
.side-list em,
.rank-info em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    line-height: 1.45;
}

.section-block {
    margin: 34px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
}

.intro-block {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: 24px;
}

.wide-search {
    display: flex;
    min-height: 56px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.6);
}

.wide-search input {
    padding: 0 20px;
}

.wide-search button {
    padding: 0 24px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.45);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.56);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.rating-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    border-radius: 999px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.rating-badge {
    right: 10px;
    color: #422006;
    padding: 6px 9px;
    background: linear-gradient(135deg, var(--yellow), #fde68a);
}

.rank-badge {
    left: 10px;
    color: #052e16;
    padding: 6px 11px;
    background: linear-gradient(135deg, var(--emerald), #a7f3d0);
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
}

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

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

.card-body p {
    margin: 10px 0 13px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

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

.category-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.64));
}

.category-card {
    padding: 20px;
}

.category-card > a span,
.category-overview-card h2 {
    display: block;
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    display: block;
    margin-top: 10px;
    color: var(--soft);
    line-height: 1.65;
}

.category-card div,
.mini-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-card div a,
.mini-link-row a {
    color: var(--emerald);
    font-size: 13px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.1);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 38px 64px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-row:hover {
    border-color: rgba(52, 211, 153, 0.5);
}

.rank-number,
.rank-score {
    font-weight: 900;
    color: var(--emerald);
}

.rank-row img {
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    min-height: 300px;
    margin: 28px 0;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 10%, rgba(52, 211, 153, 0.22), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.84));
    box-shadow: var(--shadow);
}

.page-hero > div {
    max-width: 760px;
}

.filter-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.filter-panel input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
}

.filter-chip {
    padding: 9px 13px;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
    color: #052e16;
    border-color: transparent;
    background: linear-gradient(135deg, var(--emerald), #a7f3d0);
}

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

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

.category-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(8px);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.68));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 34px;
    padding: 44px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--emerald);
}

.detail-meta {
    margin: 20px 0;
}

.detail-meta strong {
    color: #422006;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), #fde68a);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 50%;
    color: #052e16;
    font-size: 34px;
    background: linear-gradient(135deg, var(--emerald), #a7f3d0);
    box-shadow: 0 0 42px rgba(52, 211, 153, 0.42);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.detail-article {
    color: var(--soft);
    line-height: 1.9;
    font-size: 16px;
}

.detail-article h2,
.detail-side h2 {
    color: var(--text);
    margin-top: 0;
}

.tag-cloud {
    margin-top: 24px;
}

.side-list {
    display: grid;
    gap: 8px;
}

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

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

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

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.7;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.footer-grid a {
    display: block;
    margin: 7px 0;
}

.footer-grid a:hover {
    color: var(--emerald);
}

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

@media (max-width: 1080px) {
    .hero-slider,
    .intro-block,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-rail {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .rail-heading {
        grid-column: 1 / -1;
    }

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

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

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    main,
    .top-nav,
    .mobile-panel {
        width: min(100% - 24px, 1180px);
    }

    .hero-slider,
    .hero-stage,
    .hero-content {
        min-height: 560px;
    }

    .hero-slider {
        display: block;
    }

    .hero-rail {
        margin-top: 16px;
        grid-template-columns: 1fr;
    }

    .hero-content,
    .detail-wrap,
    .page-hero {
        padding: 28px;
    }

    .detail-wrap,
    .category-overview-card,
    .ranking-list,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

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

    .section-block {
        padding: 18px;
        border-radius: 24px;
    }

    .rank-row {
        grid-template-columns: 30px 58px minmax(0, 1fr) 44px;
    }
}

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

    .hero-content h1,
    .page-hero h1,
    .detail-info h1,
    .intro-block h1 {
        font-size: 34px;
    }

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

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

    .wide-search {
        flex-direction: column;
        border-radius: 22px;
    }

    .wide-search input,
    .wide-search button {
        min-height: 52px;
    }
}
