:root {
    color-scheme: dark;
    --fog-950: #070a0f;
    --fog-900: #0d1117;
    --fog-850: #161b22;
    --fog-800: #212529;
    --fog-700: #343a40;
    --fog-600: #495057;
    --fog-300: #c9d1d9;
    --fog-100: #f0f6fc;
    --mist-800: #243b53;
    --mist-600: #627d98;
    --frost-600: #005fcc;
    --frost-500: #0073e6;
    --frost-400: #1a8cff;
    --frost-300: #4da6ff;
    --gold: #f5c542;
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.26);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: min(1240px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--fog-100);
    background:
        radial-gradient(circle at top left, rgba(0, 115, 230, 0.18), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(36, 59, 83, 0.72), transparent 28rem),
        var(--fog-900);
}

body.menu-open {
    overflow: hidden;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 17, 23, 0.88);
    border-bottom: 1px solid rgba(77, 166, 255, 0.16);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: var(--container);
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--frost-500), var(--frost-300));
    box-shadow: 0 10px 30px rgba(0, 115, 230, 0.36);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--fog-300);
    font-size: 14px;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(0, 115, 230, 0.18);
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    position: relative;
}

.header-search input,
.mobile-search input {
    width: 240px;
    height: 42px;
    border: 1px solid rgba(130, 154, 177, 0.2);
    border-radius: 999px;
    color: var(--fog-100);
    background: rgba(33, 37, 41, 0.78);
    outline: none;
    padding: 0 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.header-search input:focus,
.mobile-search input:focus {
    border-color: var(--frost-400);
    box-shadow: 0 0 0 4px rgba(0, 115, 230, 0.18);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(33, 37, 41, 0.84);
    display: none;
    place-items: center;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background: var(--fog-100);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
}

.hero-slider {
    position: relative;
    width: var(--container);
    min-height: 620px;
    margin: 28px auto 32px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--fog-850);
    border: 1px solid rgba(77, 166, 255, 0.18);
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 46px;
    padding: clamp(28px, 5vw, 72px);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.018);
    pointer-events: none;
    transition: opacity 680ms ease, transform 860ms ease;
}

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

.hero-content {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 115, 230, 0.76);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p {
    max-width: 760px;
    color: var(--fog-300);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.78;
}

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

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--fog-100);
    background: rgba(33, 37, 41, 0.74);
    border: 1px solid rgba(130, 154, 177, 0.18);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.primary-btn,
.ghost-btn,
.wide-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn,
.wide-link {
    color: #ffffff;
    background: linear-gradient(135deg, var(--frost-500), var(--frost-300));
    box-shadow: 0 14px 34px rgba(0, 115, 230, 0.32);
}

.ghost-btn,
.text-link {
    border: 1px solid rgba(130, 154, 177, 0.24);
    color: var(--fog-100);
    background: rgba(33, 37, 41, 0.64);
}

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

.hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-cats a {
    color: var(--frost-300);
    font-size: 14px;
}

.hero-poster {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--mist-800), var(--fog-800));
}

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

.hero-dots {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    bottom: 32px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dots button {
    width: 28px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

.hero-dots button.active {
    width: 54px;
    background: var(--frost-300);
}

main,
.page-main {
    width: var(--container);
    margin: 0 auto;
}

.section-panel,
.page-hero,
.detail-hero,
.player-section,
.content-layout,
.category-detail-grid {
    margin: 32px 0;
}

.section-panel,
.page-hero,
.article-panel,
.side-panel {
    border: 1px solid rgba(130, 154, 177, 0.16);
    border-radius: var(--radius-xl);
    background: rgba(22, 27, 34, 0.76);
    box-shadow: var(--shadow-card);
}

.section-panel {
    padding: clamp(20px, 3vw, 34px);
}

.search-panel {
    background: linear-gradient(135deg, rgba(0, 115, 230, 0.16), rgba(36, 59, 83, 0.62));
}

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

.section-heading h2,
.article-panel h2,
.side-panel h2 {
    margin: 10px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.section-heading.with-link {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading.with-link > a {
    color: var(--frost-300);
    font-weight: 700;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 26px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid rgba(130, 154, 177, 0.22);
    border-radius: 999px;
    color: var(--fog-300);
    background: rgba(33, 37, 41, 0.7);
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    border-color: rgba(77, 166, 255, 0.64);
    background: rgba(0, 115, 230, 0.25);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(33, 37, 41, 0.8);
    border: 1px solid rgba(130, 154, 177, 0.14);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(77, 166, 255, 0.42);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mist-800), var(--fog-800));
}

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

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.rank-cover:hover img {
    transform: scale(1.06);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.82), transparent);
}

.card-body {
    padding: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--frost-300);
    font-size: 12px;
    margin-bottom: 9px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.28;
}

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

.movie-card p,
.rank-info p,
.category-card p,
.category-detail-card p,
.footer-inner p {
    margin: 0;
    color: var(--fog-300);
    line-height: 1.6;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--fog-300);
    background: rgba(98, 125, 152, 0.14);
    font-size: 12px;
}

.large-tags span {
    font-size: 13px;
    padding: 6px 10px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(130, 154, 177, 0.14);
    background: var(--fog-800);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.94), rgba(13, 17, 23, 0.24));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 24px;
}

.hot-board {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(0, 115, 230, 0.16), rgba(33, 37, 41, 0.72));
    border: 1px solid rgba(77, 166, 255, 0.2);
}

.board-list,
.ranking-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(13, 17, 23, 0.46);
    border: 1px solid rgba(130, 154, 177, 0.12);
}

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

.rank-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mist-800), var(--fog-800));
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

.rank-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #111827;
    background: var(--gold);
    font-weight: 900;
}

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

.rank-meta {
    color: var(--frost-300);
    font-size: 12px;
}

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

.page-hero {
    min-height: 330px;
    padding: clamp(28px, 6vw, 68px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.slim-hero {
    min-height: 300px;
    background: linear-gradient(135deg, rgba(0, 115, 230, 0.18), rgba(36, 59, 83, 0.46));
}

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

.category-detail-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(22, 27, 34, 0.76);
    border: 1px solid rgba(130, 154, 177, 0.14);
}

.category-visual {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--mist-800), var(--fog-800));
}

.category-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-detail-card h2 {
    margin: 10px 0;
    font-size: 26px;
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.sample-links a {
    color: var(--frost-300);
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--fog-300);
    margin: 26px 0;
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: clamp(22px, 4vw, 42px);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(0, 115, 230, 0.16), rgba(22, 27, 34, 0.88)),
        var(--fog-850);
    border: 1px solid rgba(77, 166, 255, 0.18);
    box-shadow: var(--shadow-card);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--mist-800), var(--fog-800));
    box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-copy p {
    color: var(--fog-300);
    font-size: 18px;
    line-height: 1.72;
}

.player-section {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(130, 154, 177, 0.16);
    background: #000000;
    box-shadow: var(--shadow-lg);
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.64));
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--frost-500), var(--frost-300));
    box-shadow: 0 16px 42px rgba(0, 115, 230, 0.42);
    font-size: 34px;
}

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

.article-panel,
.side-panel {
    padding: clamp(22px, 3vw, 34px);
}

.article-panel p {
    color: var(--fog-300);
    line-height: 1.9;
    font-size: 16px;
}

.info-list {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    margin: 20px 0 0;
}

.info-list dt {
    color: var(--frost-300);
}

.info-list dd {
    margin: 0;
    color: var(--fog-300);
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(130, 154, 177, 0.16);
    background: rgba(7, 10, 15, 0.7);
}

.footer-inner {
    width: var(--container);
    min-height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    gap: 18px;
    color: var(--fog-300);
}

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

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

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

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

    .split-section,
    .content-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    :root {
        --container: min(100vw - 24px, 720px);
    }

    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: grid;
        margin-left: auto;
    }

    .mobile-panel {
        position: fixed;
        inset: 72px 12px auto;
        display: block;
        padding: 18px;
        border-radius: 22px;
        background: rgba(13, 17, 23, 0.96);
        border: 1px solid rgba(77, 166, 255, 0.2);
        transform: translateY(-16px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
        box-shadow: var(--shadow-lg);
    }

    body.menu-open .mobile-panel {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-search input {
        width: 100%;
        margin: 16px 0;
    }

    .mobile-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hero-slider {
        min-height: 720px;
        margin-top: 16px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 28px;
    }

    .hero-poster {
        width: min(260px, 76vw);
        justify-self: center;
        order: -1;
    }

    .hero-dots {
        left: 28px;
        bottom: 22px;
    }

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

    .detail-hero,
    .category-detail-card {
        grid-template-columns: 1fr;
    }

    .detail-poster,
    .category-visual {
        width: min(280px, 76vw);
        margin: 0 auto;
    }

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

    .section-heading.with-link,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 66px;
    }

    .brand-name {
        font-size: 16px;
    }

    .hero-slider {
        min-height: 680px;
        border-radius: 22px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
        letter-spacing: -0.04em;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 126px minmax(0, 1fr);
    }

    .compact-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .poster-wrap {
        height: 100%;
        min-height: 178px;
    }

    .rank-info h2 {
        font-size: 17px;
    }

    .rank-info p {
        display: none;
    }

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
