:root {
    --night-950: #0b1020;
    --night-900: #1a1f35;
    --night-800: #3730a3;
    --silver-950: #020617;
    --silver-900: #0f172a;
    --silver-800: #1e293b;
    --silver-700: #334155;
    --silver-500: #64748b;
    --silver-400: #94a3b8;
    --silver-300: #cbd5e1;
    --silver-200: #e2e8f0;
    --moonlight-700: #4338ca;
    --moonlight-600: #4f46e5;
    --moonlight-500: #6172f3;
    --moonlight-400: #8196f8;
    --moonlight-300: #a5bbfc;
    --card-bg: rgba(30, 41, 59, 0.46);
    --card-bg-strong: rgba(30, 41, 59, 0.72);
    --border-soft: rgba(51, 65, 85, 0.42);
    --shadow-soft: 0 24px 80px rgba(2, 6, 23, 0.32);
    --font-sans: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-serif: "Noto Serif SC", Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #334155 100%);
    color: var(--silver-200);
    font-family: var(--font-sans);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.24);
    background: rgba(26, 31, 53, 0.95);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--moonlight-500), #9f7aea);
    color: #fff;
    box-shadow: 0 0 34px rgba(97, 114, 243, 0.42);
    font-family: var(--font-serif);
    font-size: 18px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--silver-300);
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 230px;
}

.header-search input {
    width: 100%;
    border: 1px solid rgba(51, 65, 85, 0.44);
    border-radius: 999px;
    padding: 10px 42px 10px 16px;
    background: rgba(30, 41, 59, 0.58);
    color: #fff;
    outline: none;
}

.header-search input:focus {
    border-color: var(--moonlight-500);
    box-shadow: 0 0 0 3px rgba(97, 114, 243, 0.22);
}

.header-search button {
    position: absolute;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(97, 114, 243, 0.2);
    color: var(--moonlight-300);
    cursor: pointer;
}

.nav-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

main {
    min-height: 72vh;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transform: scale(1.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(97, 114, 243, 0.26), transparent 35%),
        linear-gradient(180deg, rgba(26, 31, 53, 0.84) 0%, rgba(26, 31, 53, 0.48) 45%, #1a1f35 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 42px;
    width: min(1180px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    padding: 84px 0 60px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 14px;
    border: 1px solid rgba(97, 114, 243, 0.3);
    border-radius: 999px;
    background: rgba(47, 46, 130, 0.2);
    color: var(--moonlight-300);
    font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--silver-200);
    font-size: clamp(18px, 2vw, 24px);
}

.hero-feature {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(97, 114, 243, 0.28);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.48);
    box-shadow: var(--shadow-soft);
}

.hero-feature strong {
    display: block;
    color: var(--moonlight-300);
    font-size: 14px;
    margin-bottom: 6px;
}

.hero-feature a {
    color: #fff;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
}

.hero-feature p {
    margin: 8px 0 0;
    color: var(--silver-300);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 999px;
    padding: 12px 22px;
    border: 1px solid rgba(97, 114, 243, 0.28);
    background: rgba(30, 41, 59, 0.5);
    color: #fff;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.3);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--moonlight-500), var(--moonlight-700));
    box-shadow: 0 16px 46px rgba(97, 114, 243, 0.3);
}

.hero-panel {
    border: 1px solid rgba(51, 65, 85, 0.46);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.54);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.hero-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 0;
}

.hero-panel-head h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.hero-dots {
    display: flex;
    gap: 6px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: var(--silver-500);
    cursor: pointer;
}

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

.hero-focus-list {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.hero-focus-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.5);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-focus-item:hover {
    transform: translateX(4px);
    background: rgba(97, 114, 243, 0.16);
}

.hero-focus-item img {
    width: 64px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-focus-item h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 15px;
}

.hero-focus-item p {
    margin: 0;
    color: var(--silver-400);
    font-size: 13px;
}

.section,
.page-hero,
.detail-page {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 56px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--moonlight-300);
    font-size: 14px;
    font-weight: 700;
}

.section h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    color: #fff;
    font-family: var(--font-serif);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
}

.section-header p,
.page-hero p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--silver-300);
}

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

.movie-card {
    position: relative;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: var(--card-bg);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(97, 114, 243, 0.42);
    box-shadow: 0 22px 56px rgba(2, 6, 23, 0.35);
}

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

.poster-link img,
.detail-cover img,
.rank-cover img,
.search-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #111827;
    font-weight: 900;
}

.movie-card-body {
    padding: 16px;
}

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

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--silver-500);
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 1.28;
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    color: var(--silver-300);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(97, 114, 243, 0.18);
    border-radius: 999px;
    background: rgba(97, 114, 243, 0.1);
    color: var(--moonlight-300);
    font-size: 12px;
}

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

.category-card {
    min-height: 190px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 24px;
    background:
        radial-gradient(circle at 80% 10%, rgba(97, 114, 243, 0.24), transparent 34%),
        rgba(30, 41, 59, 0.48);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(97, 114, 243, 0.42);
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: rgba(97, 114, 243, 0.16);
    color: #fff;
    font-weight: 900;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--silver-300);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px 1fr;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 14px;
    background: rgba(30, 41, 59, 0.42);
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(97, 114, 243, 0.16);
    color: var(--moonlight-300);
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    width: 92px;
    height: 122px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.48);
}

.rank-info h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--silver-300);
}

.page-hero {
    padding: 120px 0 34px;
}

.page-hero-panel {
    border: 1px solid rgba(97, 114, 243, 0.22);
    border-radius: 28px;
    padding: clamp(28px, 5vw, 52px);
    background:
        radial-gradient(circle at 15% 15%, rgba(97, 114, 243, 0.25), transparent 30%),
        linear-gradient(135deg, rgba(47, 46, 130, 0.22), rgba(15, 23, 42, 0.44));
    box-shadow: var(--shadow-soft);
}

.local-filter {
    display: flex;
    gap: 12px;
    max-width: 540px;
    margin-top: 24px;
}

.local-filter input {
    flex: 1;
    border: 1px solid rgba(51, 65, 85, 0.44);
    border-radius: 999px;
    padding: 13px 18px;
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    outline: none;
}

.local-filter input:focus {
    border-color: var(--moonlight-500);
    box-shadow: 0 0 0 3px rgba(97, 114, 243, 0.18);
}

.detail-page {
    padding: 92px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: var(--silver-400);
    font-size: 14px;
}

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

.player-shell {
    position: relative;
    border: 1px solid rgba(97, 114, 243, 0.26);
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

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

.player-cover-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(97, 114, 243, 0.18), rgba(2, 6, 23, 0.55));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: inline-grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--moonlight-500), var(--moonlight-700));
    box-shadow: 0 24px 60px rgba(97, 114, 243, 0.46);
    font-size: 38px;
    padding-left: 6px;
}

.detail-head {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    margin-top: 32px;
    align-items: start;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.48);
}

.detail-title {
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 28px;
    background: rgba(30, 41, 59, 0.42);
}

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

.detail-title .lead {
    margin: 18px 0 0;
    color: var(--silver-200);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    border: 1px solid rgba(51, 65, 85, 0.46);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(15, 23, 42, 0.34);
    color: var(--silver-300);
    font-size: 14px;
}

.detail-section {
    margin-top: 28px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 28px;
    background: rgba(30, 41, 59, 0.42);
}

.detail-section p {
    margin: 14px 0 0;
    color: var(--silver-200);
    font-size: 17px;
}

.search-layout {
    display: grid;
    gap: 16px;
}

.search-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 14px;
    background: rgba(30, 41, 59, 0.42);
}

.search-card-image {
    display: block;
    width: 120px;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.48);
}

.search-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
}

.search-card p {
    margin: 0 0 12px;
    color: var(--silver-300);
}

.empty-state {
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 34px;
    background: rgba(30, 41, 59, 0.38);
    color: var(--silver-300);
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.34);
    background: rgba(15, 23, 42, 0.48);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    color: var(--silver-400);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 14px 0;
}

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

.copyright {
    margin: 0;
    font-size: 13px;
}

.fade-in {
    animation: fadeIn 0.5s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

@media (max-width: 1100px) {
    .header-search {
        width: 190px;
    }

    .nav-links {
        gap: 14px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-panel {
        max-width: 620px;
    }

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

@media (max-width: 820px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links,
    .header-search {
        display: none;
        width: 100%;
    }

    .site-header.is-open .nav-links,
    .site-header.is-open .header-search {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        order: 3;
    }

    .nav-link {
        padding: 12px 0;
        border-top: 1px solid rgba(51, 65, 85, 0.28);
    }

    .header-search {
        order: 4;
        margin-bottom: 4px;
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 72px 0 46px;
    }

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

    .section-header,
    .detail-head {
        grid-template-columns: 1fr;
    }

    .section-header {
        display: block;
    }

    .section-actions {
        margin-top: 18px;
    }

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

    .rank-item {
        grid-template-columns: 48px 76px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .rank-cover {
        width: 76px;
        height: 104px;
    }

    .detail-cover {
        max-width: 240px;
    }

    .search-card {
        grid-template-columns: 92px 1fr;
    }

    .search-card-image {
        width: 92px;
        height: 126px;
    }
}

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

    .hero-panel {
        display: none;
    }

    .hero-actions,
    .local-filter {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .rank-item,
    .search-card {
        grid-template-columns: 1fr;
    }

    .rank-number {
        width: 100%;
    }

    .rank-cover,
    .search-card-image {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .detail-title,
    .detail-section,
    .page-hero-panel {
        padding: 22px;
    }
}
