:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --teal: #14b8a6;
    --orange: #fb923c;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 30%),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 34%),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

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

main {
    padding-top: 80px;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.62);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 80px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
    font-size: 16px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 28vw);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
}

.top-search input,
.home-search-block input,
.filter-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.top-search input::placeholder,
.home-search-block input::placeholder,
.filter-bar input::placeholder {
    color: #64748b;
}

.top-search button,
.home-search-block button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 8px;
    background: #fff;
}

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

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

.hero {
    position: relative;
    min-height: calc(100vh - 80px);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) brightness(0.42) saturate(1.2);
    transform: scale(1.12);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at 60% 36%, rgba(34, 211, 238, 0.22), transparent 35%);
}

.hero-panel {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
    gap: 56px;
    align-items: center;
    padding: 70px 0;
}

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

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.lead-text {
    max-width: 680px;
    color: var(--soft);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.65;
}

.hero-tags,
.card-tags,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag,
.card-tags span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.11);
    color: #bae6fd;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.wide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 20px 45px rgba(34, 211, 238, 0.22);
}

.ghost-btn,
.wide-link {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.wide-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.62));
}

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

.hero-dots {
    position: absolute;
    right: calc((100% - min(1240px, calc(100% - 32px))) / 2);
    bottom: 36px;
    z-index: 4;
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: #64748b;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

.home-search-block,
.category-strip,
.content-section,
.page-hero,
.filter-bar,
.category-overview,
.rank-page-list,
.detail-hero,
.player-section,
.detail-main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-block {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 500px);
    gap: 24px;
    align-items: center;
    margin-top: 44px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(14, 116, 144, 0.16));
    box-shadow: var(--shadow);
}

.home-search-block h2,
.section-heading h2,
.detail-meta h2,
.detail-article h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.home-search-block p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.home-search-block form,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.42);
    padding: 10px;
}

.home-search-block input,
.filter-bar input {
    min-height: 46px;
    padding: 0 12px;
}

.category-strip,
.content-section,
.category-overview,
.rank-page-list,
.detail-main {
    margin-top: 72px;
}

.section-heading {
    margin-bottom: 28px;
}

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

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

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

.chip-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    color: var(--text);
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.chip-grid a:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(8, 145, 178, 0.18);
}

.chip-grid span {
    color: var(--cyan);
    font-size: 13px;
}

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

.movie-grid.small-grid,
.library-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.8);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    color: #fff;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
}

.movie-card h3 {
    min-height: 52px;
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.45;
}

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

.movie-card p {
    min-height: 66px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.movie-card.compact h3 {
    min-height: 46px;
    font-size: 16px;
}

.movie-card.compact p {
    display: none;
}

.card-tags span {
    min-height: 26px;
    font-size: 12px;
}

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

.rank-panel {
    position: sticky;
    top: 104px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.rank-panel ol,
.rank-page-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.32);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
}

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

.rank-copy h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.rank-copy p {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.55;
}

.wide-link {
    width: 100%;
    margin-top: 18px;
}

.page-hero {
    margin-top: 38px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.75));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

.filter-bar {
    justify-content: space-between;
    margin-top: 28px;
    border-radius: 24px;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-copy {
    display: grid;
    gap: 4px;
    min-width: 180px;
}

.filter-copy span {
    color: var(--muted);
    font-size: 14px;
}

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

.category-card-large {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.68);
}

.category-card-head span {
    color: var(--cyan);
    font-weight: 900;
}

.category-card-head h2 {
    margin: 8px 0;
    font-size: 30px;
}

.category-card-head p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

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

.rank-page-list .rank-item {
    grid-template-columns: 58px 130px minmax(0, 1fr);
    padding: 16px;
}

.detail-hero {
    margin-top: 38px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 24px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.78));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.player-section {
    margin-top: 40px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.3);
}

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

.detail-article,
.detail-meta {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.66);
}

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

.small-heading {
    margin-top: 34px;
}

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

.meta-list div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.28);
}

.meta-list span {
    color: var(--muted);
    font-size: 13px;
}

.meta-list strong {
    color: var(--text);
    line-height: 1.6;
}

.site-footer {
    margin-top: 96px;
    padding: 48px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
    color: var(--muted);
}

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

.footer-grid p {
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 18px;
}

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

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

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

.is-hidden {
    display: none !important;
}

@media (max-width: 1180px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .hero-panel,
    .split-layout,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

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

@media (max-width: 820px) {
    main {
        padding-top: 72px;
    }

    .nav-wrap {
        min-height: 72px;
    }

    .hero {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
        min-height: calc(100vh - 72px);
    }

    .hero-slide.is-active {
        display: grid;
    }

    .hero-panel,
    .home-search-block,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        gap: 24px;
        padding: 44px 0 76px;
    }

    .hero-poster {
        max-width: 300px;
        transform: none;
    }

    .hero-dots {
        left: 16px;
        right: auto;
    }

    .page-hero {
        padding: 28px;
    }

    .filter-bar {
        align-items: stretch;
        border-radius: 24px;
        flex-direction: column;
    }

    .chip-grid,
    .movie-grid,
    .movie-grid.small-grid,
    .library-grid,
    .category-overview,
    .category-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-item,
    .rank-page-list .rank-item {
        grid-template-columns: 42px 82px minmax(0, 1fr);
    }

    .rank-copy p,
    .rank-meta {
        display: none;
    }
}

@media (max-width: 520px) {
    .site-logo {
        font-size: 20px;
    }

    .home-search-block,
    .detail-layout,
    .detail-article,
    .detail-meta,
    .category-card-large {
        padding: 20px;
    }

    .chip-grid,
    .movie-grid,
    .movie-grid.small-grid,
    .library-grid,
    .category-preview-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        gap: 24px;
    }

    .rank-item,
    .rank-page-list .rank-item {
        grid-template-columns: 36px 70px minmax(0, 1fr);
        gap: 10px;
    }
}
