:root {
    color-scheme: dark;
    --night-950: #070b16;
    --night-900: #0f172a;
    --night-850: #111827;
    --night-800: #1e293b;
    --silver-900: #0b1120;
    --silver-800: #1f2937;
    --silver-700: #334155;
    --silver-500: #94a3b8;
    --silver-400: #cbd5e1;
    --silver-300: #e2e8f0;
    --moonlight-600: #5d6df0;
    --moonlight-500: #6d7df5;
    --moonlight-400: #8196f8;
    --moonlight-300: #a5b4fc;
    --gold: #f8d47a;
    --danger: #ff6b8b;
    --max-width: 1180px;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(109, 125, 245, 0.20), transparent 32rem),
        radial-gradient(circle at 90% 10%, rgba(165, 180, 252, 0.12), transparent 28rem),
        linear-gradient(180deg, var(--night-900), var(--night-800) 52%, var(--night-950));
    color: var(--silver-300);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.65;
}

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(100% - 32px, var(--max-width));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--moonlight-400), var(--moonlight-600));
    box-shadow: 0 14px 30px rgba(109, 125, 245, 0.32);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--silver-400);
    font-size: 15px;
}

.desktop-nav a,
.mobile-menu a,
.footer-links a {
    transition: color 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
    color: var(--moonlight-300);
}

.nav-search {
    position: relative;
    min-width: 210px;
}

.nav-search input,
.search-panel input,
.page-filter input,
.search-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.70);
    color: #ffffff;
    outline: 0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search input {
    padding: 10px 15px 10px 42px;
}

.nav-search span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--silver-500);
}

.nav-search input:focus,
.search-panel input:focus,
.page-filter input:focus,
.search-panel select:focus {
    border-color: rgba(129, 150, 248, 0.9);
    background: rgba(30, 41, 59, 0.92);
    box-shadow: 0 0 0 4px rgba(109, 125, 245, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.88);
}

.mobile-menu {
    display: none;
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-menu nav {
    display: grid;
    gap: 12px;
    color: var(--silver-300);
}

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

.hero-shell {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    isolation: isolate;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(7, 11, 22, 0.94), rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.28)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), var(--night-900)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
    transform: scale(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 40%, rgba(129, 150, 248, 0.22), transparent 34rem);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--max-width));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 52px;
    padding: 80px 0 64px;
}

.hero-content {
    animation: slideUp 0.55s ease both;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--moonlight-300);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-weight: 800;
    line-height: 1.08;
}

.hero-content h1 {
    max-width: 820px;
    font-size: clamp(42px, 6vw, 76px);
}

.hero-content h2 {
    margin-top: 16px;
    font-size: clamp(30px, 4.3vw, 54px);
}

.hero-content p {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--silver-300);
    font-size: clamp(17px, 2vw, 23px);
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
}

.button-primary,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 750;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--moonlight-400), var(--moonlight-600));
    box-shadow: 0 20px 45px rgba(109, 125, 245, 0.28);
}

.button-secondary {
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(30, 41, 59, 0.66);
}

.button-ghost {
    color: var(--moonlight-300);
    padding-inline: 0;
}

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 54px rgba(109, 125, 245, 0.34);
}

.hero-poster-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 2 / 2.7;
    background: rgba(30, 41, 59, 0.72);
    transform: perspective(900px) rotateY(-6deg);
}

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

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
    background: linear-gradient(0deg, rgba(7, 11, 22, 0.96), rgba(7, 11, 22, 0));
}

.hero-poster-info strong {
    display: block;
    color: #ffffff;
    font-size: 21px;
}

.hero-poster-info span {
    display: block;
    color: var(--silver-400);
    margin-top: 6px;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 32px;
    width: min(100% - 32px, var(--max-width));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 58px;
    background: var(--moonlight-300);
}

.hero-mini-nav {
    display: flex;
    gap: 10px;
}

.hero-mini-nav button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.section {
    padding: 74px 0;
}

.section.alt {
    background: rgba(15, 23, 42, 0.34);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-title {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.2;
}

.section-subtitle {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--silver-400);
}

.movie-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 22px;
    scroll-snap-type: x proximity;
}

.movie-row .movie-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

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

.movie-card {
    position: relative;
    display: grid;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
    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.52);
    box-shadow: 0 24px 70px rgba(109, 125, 245, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 2.72;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.05);
    opacity: 0.92;
}

.card-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(7, 11, 22, 0.92), transparent);
}

.card-badge,
.card-year,
.rank-badge,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    white-space: nowrap;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(10px);
}

.card-year {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 10px;
    color: var(--moonlight-300);
    font-size: 12px;
    font-weight: 750;
    background: rgba(15, 23, 42, 0.78);
}

.card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.card-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.36;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    min-height: 45px;
    color: var(--silver-400);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--silver-500);
    font-size: 13px;
}

.card-meta span {
    color: var(--moonlight-300);
}

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

.category-card {
    display: grid;
    gap: 12px;
    min-height: 178px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(109, 125, 245, 0.12), rgba(30, 41, 59, 0.44));
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(129, 150, 248, 0.52);
    box-shadow: 0 24px 60px rgba(109, 125, 245, 0.13);
}

.category-icon {
    font-size: 34px;
}

.category-card strong {
    color: #ffffff;
    font-size: 19px;
}

.category-card span {
    color: var(--silver-400);
    font-size: 14px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: auto 82px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.42);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: rgba(129, 150, 248, 0.44);
}

.rank-badge {
    width: 42px;
    height: 42px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(109, 125, 245, 0.24);
}

.ranking-item:nth-child(-n + 3) .rank-badge {
    color: #1f2937;
    background: linear-gradient(135deg, #fef3c7, var(--gold));
}

.ranking-thumb {
    width: 82px;
    height: 108px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
}

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

.ranking-info strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.ranking-info span,
.ranking-action {
    color: var(--silver-400);
    font-size: 14px;
}

.ranking-action {
    color: var(--moonlight-300);
    font-weight: 750;
}

.page-hero {
    padding: 82px 0 46px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    background:
        radial-gradient(circle at 20% 0%, rgba(109, 125, 245, 0.20), transparent 36rem),
        rgba(15, 23, 42, 0.36);
}

.page-hero h1,
.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: var(--silver-400);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--silver-500);
    font-size: 14px;
}

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

.search-panel,
.page-filter {
    margin: 0 0 30px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.44);
}

.search-panel form {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(140px, 0.5fr));
    gap: 14px;
}

.search-panel input,
.search-panel select,
.page-filter input {
    padding: 13px 16px;
    border-radius: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 360px;
    gap: 34px;
    align-items: start;
    padding: 44px 0 76px;
}

.player-card,
.detail-panel,
.related-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.50);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(7, 11, 22, 0.18), rgba(7, 11, 22, 0.68));
    transition: opacity 0.25s ease;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    background: linear-gradient(135deg, var(--moonlight-400), var(--moonlight-600));
    box-shadow: 0 24px 55px rgba(109, 125, 245, 0.36);
}

.detail-title {
    padding: 24px 26px 28px;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.meta-pill,
.tag {
    padding: 7px 12px;
    color: var(--silver-300);
    background: rgba(30, 41, 59, 0.70);
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 13px;
}

.tag {
    color: var(--moonlight-300);
}

.detail-panel {
    padding: 28px;
}

.detail-panel h2,
.related-panel h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: var(--silver-300);
    line-height: 1.9;
}

.side-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 2 / 2.72;
    background: rgba(30, 41, 59, 0.62);
}

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

.related-panel {
    padding: 20px;
}

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

.related-link {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.42);
    transition: background 0.25s ease, transform 0.25s ease;
}

.related-link:hover {
    background: rgba(30, 41, 59, 0.78);
    transform: translateX(3px);
}

.related-link img {
    width: 68px;
    height: 86px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.82);
}

.related-link strong {
    display: block;
    color: #ffffff;
    line-height: 1.35;
}

.related-link span {
    display: block;
    margin-top: 5px;
    color: var(--silver-500);
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(7, 11, 22, 0.72);
}

.footer-inner {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
}

.footer-copy {
    color: var(--silver-500);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--silver-400);
    font-size: 14px;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 64px;
    }

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

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

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

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

    .search-panel form {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .hero-shell,
    .hero-inner {
        min-height: 760px;
    }

    .hero-controls {
        bottom: 18px;
    }

    .hero-mini-nav {
        display: none;
    }

    .section {
        padding: 50px 0;
    }

    .section-header {
        display: grid;
        gap: 12px;
    }

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

    .movie-row .movie-card {
        flex-basis: 230px;
    }

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

    .ranking-item {
        grid-template-columns: auto 70px minmax(0, 1fr);
    }

    .ranking-action {
        display: none;
    }

    .search-panel form {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content h2 {
        font-size: 28px;
    }
}
