:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --deep: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #334155, #020617);
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.24);
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(135deg, #334155, #020617);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-drop-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.nav-drop-panel {
    position: absolute;
    top: 32px;
    left: 0;
    min-width: 180px;
    padding: 12px;
    display: grid;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-drop-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-panel a {
    padding: 8px 10px;
    border-radius: 10px;
    color: #475569;
}

.nav-drop-panel a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 290px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.page-search input,
.filter-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #ffffff;
    color: var(--ink);
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.page-search input:focus,
.filter-panel input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.22);
}

.header-search button,
.mobile-search button,
.hero-search button,
.page-search button,
.filter-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: #0f172a;
    cursor: pointer;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    place-items: center;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    background: #0f172a;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: #ffffff;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-link {
    display: block;
    padding: 10px 6px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-weight: 650;
}

.mobile-link.small {
    color: #64748b;
    font-weight: 500;
}

.hero {
    min-height: 610px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #334155 0%, #475569 45%, #0f172a 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.14));
    pointer-events: none;
}

.hero-stage {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 610px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

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

.hero-image-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: saturate(1.1) contrast(1.05);
    transform: scale(1.04);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 80px 0 130px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 10px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-title {
    margin: 0 0 10px;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
}

.hero-desc,
.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-search {
    width: min(100%, 560px);
    display: flex;
    gap: 10px;
    margin: 24px 0;
}

.hero-search input {
    min-height: 48px;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.92);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(255, 255, 255, 0.18);
}

.button.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 0;
    bottom: 98px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #ffffff;
}

.hero-card-wrap {
    position: relative;
    z-index: 10;
    margin-top: -82px;
}

.hero-card-grid,
.content-section,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

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

.content-section {
    padding: 68px 0 0;
}

.muted-section {
    width: 100%;
    max-width: none;
    margin-top: 70px;
    padding: 70px max(16px, calc((100% - 1180px) / 2)) 76px;
    background: #eef2f7;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-weight: 750;
    white-space: nowrap;
}

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

.movie-card {
    display: grid;
    gap: 12px;
    color: #0f172a;
}

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

.movie-card:hover strong {
    color: #334155;
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
        linear-gradient(135deg, #475569, #0f172a);
    box-shadow: var(--shadow-card);
}

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

.poster-frame img.image-missing,
.hero-image-layer img.image-missing,
.detail-bg img.image-missing,
.detail-poster img.image-missing,
.wide-poster img.image-missing {
    opacity: 0;
}

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.62));
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 9px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    backdrop-filter: blur(10px);
}

.year-badge {
    right: 10px;
    top: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
}

.movie-card-body {
    display: grid;
    gap: 6px;
}

.movie-card strong {
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card em {
    color: #64748b;
    font-size: 14px;
    font-style: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
}

.movie-card.compact {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    min-height: 150px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.movie-card.compact .poster-frame {
    border-radius: 18px;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    border-radius: 26px;
    background: linear-gradient(135deg, #475569, #0f172a);
    box-shadow: var(--shadow-card);
}

.category-glow {
    position: absolute;
    inset: -40px -40px auto auto;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    filter: blur(8px);
}

.category-tile strong {
    position: relative;
    z-index: 1;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.category-tile em {
    position: relative;
    z-index: 1;
    color: #dbeafe;
    font-style: normal;
}

.category-samples {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-samples span {
    max-width: 100%;
    padding: 5px 9px;
    overflow: hidden;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

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

.side-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.filter-panel {
    display: grid;
    gap: 10px;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.quick-tags a {
    padding: 7px 10px;
    color: #334155;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #334155, #020617);
}

.small-hero {
    padding: 86px max(16px, calc((100% - 1180px) / 2));
}

.small-hero > div {
    max-width: 760px;
}

.small-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -160px;
    width: 430px;
    height: 430px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(3px);
}

.page-search {
    display: flex;
    gap: 10px;
    width: min(100%, 640px);
    margin-top: 24px;
}

.category-overview-list {
    display: grid;
    gap: 26px;
}

.category-overview-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.category-overview-head p {
    margin: 0;
    color: var(--muted);
}

.category-overview-head a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: #0f172a;
    white-space: nowrap;
}

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

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

.ranking-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.library-index {
    display: grid;
    gap: 24px;
}

.index-group {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
}

.index-group h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.index-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 10px;
    color: #334155;
    background: #f8fafc;
    border-radius: 12px;
}

.index-links span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.index-links em {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

.search-summary {
    margin-bottom: 22px;
    padding: 16px 18px;
    color: #475569;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.48));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, #475569, #0f172a);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
    max-width: 780px;
}

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

.detail-meta span {
    padding: 7px 11px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
}

.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: -38px auto 0;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    object-fit: contain;
}

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

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

.play-icon {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-size: 30px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

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

.story-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

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

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: #020617;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 40px;
    padding: 50px 0 36px;
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

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

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 1080px) {
    .header-search {
        display: none;
    }

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

    .category-grid,
    .ranking-list,
    .index-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .side-panel {
        position: static;
    }
}

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

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

    .header-inner {
        min-height: 64px;
    }

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

    .hero,
    .hero-stage {
        min-height: 680px;
    }

    .hero-copy {
        padding: 56px 0 142px;
    }

    .hero-search,
    .page-search,
    .mobile-search {
        flex-direction: column;
    }

    .hero-dots {
        bottom: 118px;
    }

    .hero-card-grid,
    .movie-grid,
    .category-grid,
    .ranking-grid,
    .ranking-list,
    .mini-grid,
    .related-grid,
    .index-links,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .movie-card.compact {
        grid-template-columns: 92px minmax(0, 1fr);
        min-height: 130px;
    }

    .section-heading,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .small-hero {
        padding-top: 64px;
        padding-bottom: 64px;
    }

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

    .detail-poster {
        width: min(260px, 100%);
    }

    .player-shell {
        border-radius: 20px;
    }

    .play-icon {
        width: 64px;
        height: 64px;
    }
}
