:root {
    --night-950: #0f172a;
    --night-900: #1a1f35;
    --night-800: #1e293b;
    --night-700: #334155;
    --moonlight-300: #a5bbfc;
    --moonlight-400: #8196f8;
    --moonlight-500: #6172f3;
    --moonlight-700: #4338ca;
    --silver-100: #f8fafc;
    --silver-200: #e2e8f0;
    --silver-300: #cbd5e1;
    --silver-400: #94a3b8;
    --silver-500: #64748b;
    --line: rgba(148, 163, 184, 0.22);
    --panel: rgba(15, 23, 42, 0.62);
    --panel-strong: rgba(15, 23, 42, 0.86);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--silver-200);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(97, 114, 243, 0.22), transparent 34rem),
        radial-gradient(circle at 82% 18%, rgba(165, 187, 252, 0.11), transparent 32rem),
        linear-gradient(180deg, var(--night-950), var(--night-800), var(--night-700));
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(26, 31, 53, 0.88);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: "Noto Serif SC", Georgia, serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--moonlight-300);
    background: linear-gradient(145deg, rgba(97, 114, 243, 0.22), rgba(165, 187, 252, 0.08));
    border: 1px solid rgba(165, 187, 252, 0.22);
    box-shadow: 0 0 32px rgba(97, 114, 243, 0.25);
}

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

.nav-link,
.mobile-link {
    color: var(--silver-300);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fff;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    width: 220px;
}

.header-search input,
.mobile-search input,
.search-hero input,
.local-filter {
    width: 100%;
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.56);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    padding: 10px 42px 10px 16px;
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--moonlight-500);
    cursor: pointer;
}

.header-search input:focus,
.mobile-search input:focus,
.search-hero input:focus,
.local-filter:focus {
    border-color: rgba(129, 150, 248, 0.86);
    box-shadow: 0 0 0 4px rgba(97, 114, 243, 0.16);
    background: rgba(30, 41, 59, 0.76);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}

.mobile-search input {
    padding: 12px 16px;
}

.mobile-search button,
.btn,
.hero-btn,
.search-hero button,
.player-start {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--moonlight-500);
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(97, 114, 243, 0.26);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn,
.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    font-weight: 700;
}

.btn.secondary,
.hero-btn.secondary {
    background: rgba(226, 232, 240, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.2);
    box-shadow: none;
}

.btn:hover,
.hero-btn:hover,
.search-hero button:hover,
.player-start:hover {
    transform: translateY(-2px);
    background: var(--moonlight-700);
    box-shadow: 0 24px 48px rgba(97, 114, 243, 0.32);
}

.mobile-link {
    display: block;
    padding: 10px 4px;
}

.mobile-link.sub {
    color: var(--silver-400);
    padding-left: 18px;
}

main {
    padding-top: 64px;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.44), rgba(15, 23, 42, 0.96)),
        radial-gradient(circle at 65% 42%, rgba(97, 114, 243, 0.24), transparent 24rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 72px 0 50px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    color: var(--moonlight-300);
    background: rgba(97, 114, 243, 0.14);
    border: 1px solid rgba(129, 150, 248, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.hero h1,
.page-title h1,
.detail-title h1 {
    margin: 22px 0 18px;
    color: #fff;
    font-family: "Noto Serif SC", Georgia, serif;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.18;
}

.hero p {
    margin: 0;
    color: var(--silver-200);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.16);
    box-shadow: var(--shadow);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster-label {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.14);
    backdrop-filter: blur(14px);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.36);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--moonlight-400);
}

.section {
    padding: 70px 0;
}

.section.alt {
    background: linear-gradient(135deg, rgba(47, 46, 130, 0.10), rgba(15, 23, 42, 0.12));
}

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

.section-head h2,
.card-panel h2,
.info-panel h2 {
    margin: 0;
    color: #fff;
    font-family: "Noto Serif SC", Georgia, serif;
    font-size: clamp(26px, 3vw, 38px);
}

.section-head p,
.page-title p,
.category-copy,
.info-panel p {
    color: var(--silver-300);
    line-height: 1.8;
}

.more-link {
    color: var(--moonlight-300);
    white-space: nowrap;
}

.more-link:hover {
    color: #fff;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 150, 248, 0.48);
    box-shadow: 0 24px 60px rgba(97, 114, 243, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(97, 114, 243, 0.78);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-year {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.74);
    padding: 4px 9px;
    font-size: 12px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--moonlight-300);
}

.card-meta,
.card-desc {
    color: var(--silver-400);
    font-size: 14px;
}

.card-meta {
    margin: 0 0 8px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    color: var(--moonlight-300);
    background: rgba(97, 114, 243, 0.14);
    border: 1px solid rgba(129, 150, 248, 0.18);
    padding: 2px 9px;
    font-size: 12px;
}

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

.category-tile {
    min-height: 170px;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(47, 46, 130, 0.26), rgba(15, 23, 42, 0.42));
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(129, 150, 248, 0.46);
    box-shadow: 0 24px 56px rgba(97, 114, 243, 0.18);
}

.category-icon {
    display: block;
    margin-bottom: 14px;
    color: var(--moonlight-300);
    font-size: 34px;
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    color: #fff;
}

.category-tile p {
    margin: 0;
    color: var(--silver-400);
    line-height: 1.65;
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
    transform: translateX(5px);
    border-color: rgba(129, 150, 248, 0.42);
    background: rgba(47, 46, 130, 0.2);
}

.rank-no {
    color: var(--moonlight-300);
    font-size: 24px;
    font-weight: 800;
    text-align: center;
}

.rank-item img {
    width: 76px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-text {
    min-width: 0;
}

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

.rank-text strong {
    color: #fff;
    margin-bottom: 4px;
}

.rank-text em {
    color: var(--silver-400);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    padding: 118px 0 50px;
    background:
        radial-gradient(circle at 15% 20%, rgba(97, 114, 243, 0.22), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0));
}

.page-title h1 {
    max-width: 900px;
    font-size: clamp(38px, 5vw, 58px);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--silver-400);
}

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

.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 0;
}

.local-filter {
    max-width: 460px;
    padding: 14px 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 360px;
    gap: 32px;
    padding: 32px 0 70px;
}

.player-shell {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: var(--shadow);
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.25);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-start {
    position: relative;
    z-index: 2;
    min-width: 150px;
    min-height: 52px;
    padding: 0 28px;
    font-weight: 800;
}

.detail-title {
    padding: 22px 0 6px;
}

.detail-title h1 {
    font-size: clamp(32px, 5vw, 54px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--silver-400);
}

.info-panel,
.side-panel,
.card-panel {
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 24px;
}

.info-panel {
    margin-top: 22px;
}

.info-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 24px;
}

.info-panel p {
    margin: 0 0 18px;
}

.side-panel {
    position: sticky;
    top: 88px;
}

.side-cover {
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 18px;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.7);
}

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

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

.side-list a {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.38);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.side-list a:hover {
    border-color: rgba(129, 150, 248, 0.4);
}

.side-list img {
    width: 64px;
    height: 44px;
    border-radius: 9px;
    object-fit: cover;
}

.side-list strong,
.side-list span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-list strong {
    color: #fff;
    margin-bottom: 3px;
}

.side-list span {
    color: var(--silver-400);
    font-size: 13px;
}

.search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    max-width: 740px;
    margin-top: 24px;
}

.search-hero input {
    padding: 16px 20px;
    font-size: 18px;
}

.search-hero button {
    padding: 0 30px;
    font-weight: 800;
}

.empty-state {
    padding: 80px 20px;
    text-align: center;
    color: var(--silver-400);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.74);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 42px;
}

.footer-inner p,
.footer-inner a,
.footer-bottom {
    color: var(--silver-400);
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 17px;
}

.footer-inner ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.footer-inner a:hover {
    color: var(--moonlight-300);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

[data-card].is-hidden {
    display: none;
}

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

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

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

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        width: min(100% - 24px, 1200px);
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 48px;
        gap: 30px;
    }

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

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

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

    .search-hero,
    .filter-bar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .search-hero button {
        min-height: 52px;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

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

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

    .rank-item {
        grid-template-columns: 46px 68px minmax(0, 1fr);
    }

    .page-hero {
        padding-top: 104px;
    }
}
