:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --panel: #ffffff;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --slate: #0f172a;
    --slate-2: #1e293b;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef6fb 46%, #f8fafc 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(14, 116, 144, 0.96), rgba(37, 99, 235, 0.92));
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(8, 47, 73, 0.24);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.brand-text {
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.site-search input {
    width: 210px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 7px 4px 7px 12px;
}

.site-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.site-search button {
    border: 0;
    color: #0f172a;
    background: #ffffff;
    border-radius: 999px;
    padding: 7px 14px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.hero {
    position: relative;
    min-height: 680px;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 170px;
    background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
}

.hero-glow {
    position: absolute;
    right: 8%;
    top: 14%;
    width: 330px;
    height: 330px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.24);
    filter: blur(60px);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 440px;
    align-items: end;
    gap: 44px;
    padding: 80px 0 86px;
}

.hero-copy {
    color: #ffffff;
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
    color: #ffffff;
    background: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(226, 232, 240, 0.94);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-actions,
.detail-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 35px rgba(8, 145, 178, 0.26);
}

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

.btn.ghost.dark {
    color: var(--cyan-dark);
    background: #ecfeff;
    border-color: #cffafe;
}

.btn.small {
    padding: 10px 18px;
}

.btn.full {
    width: 100%;
}

.hero-panel {
    align-self: center;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    background: rgba(15, 23, 42, 0.7);
    aspect-ratio: 3 / 4;
}

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

.play-dot {
    position: absolute;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.28);
}

.hero-focus-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-mini img {
    width: 70px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.hero-mini strong,
.hero-mini em {
    display: block;
}

.hero-mini strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-mini em {
    color: #bae6fd;
    font-style: normal;
    font-size: 13px;
}

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

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

.flush-section {
    margin-top: -32px;
    position: relative;
    z-index: 3;
}

.no-top-pad {
    padding-top: 20px;
}

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

.section-head h2,
.page-hero h1,
.ranking-copy h2,
.panel h2 {
    margin: 10px 0 0;
    color: var(--text);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.ranking-copy p {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--muted);
}

.section-link {
    color: var(--cyan-dark);
    font-weight: 800;
}

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

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

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 252px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(8, 47, 73, 0.18);
}

.movie-card.compact {
    scroll-snap-align: start;
}

.card-link,
.poster-wrap,
.card-body,
.card-title,
.card-meta,
.card-desc {
    display: block;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #0f172a, #164e63);
    overflow: hidden;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.56));
}

.badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.badge-type {
    left: 12px;
    background: rgba(8, 145, 178, 0.9);
}

.badge-year {
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
}

.card-body {
    padding: 16px;
}

.card-title {
    color: var(--text);
    font-weight: 900;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    margin-top: 5px;
    color: var(--cyan-dark);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    min-height: 44px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span,
.detail-tags span,
.detail-labels span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #075985;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 24px;
    border-radius: 28px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-tile span {
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.category-tile strong {
    font-size: 26px;
    line-height: 1.1;
}

.category-tile em {
    color: #cffafe;
    font-style: normal;
    font-size: 14px;
}

.ranking-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 40px auto;
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 30px;
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    box-shadow: var(--shadow);
}

.full-ranking {
    width: 100%;
    grid-template-columns: 360px 1fr;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 1fr 70px;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e2e8f0;
}

.rank-row:hover {
    border-color: #67e8f9;
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.12);
}

.rank-number {
    color: var(--cyan-dark);
    font-weight: 900;
    font-size: 18px;
}

.rank-row.top-three .rank-number {
    color: #f97316;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    text-align: right;
}

.page-shell {
    padding: 34px 0 70px;
}

.page-hero {
    border-radius: 34px;
    padding: 54px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.24), transparent 32%), linear-gradient(135deg, #0f172a, #164e63 55%, #0e7490);
    box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

.page-hero p {
    color: #dbeafe;
}

.compact-hero {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding: 28px;
    margin-top: 26px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-overview-text p {
    color: var(--muted);
}

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

.filter-bar,
.search-controls {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 24px 0;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-bar input,
.filter-bar select,
.search-controls input,
.search-controls select {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    outline: 0;
    padding: 0 14px;
    background: #f8fafc;
}

.search-panel {
    padding: 26px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-status {
    margin: 12px 0 22px;
    color: var(--muted);
    font-weight: 700;
}

.detail-shell {
    padding: 28px 0 76px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--cyan-dark);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.panel,
.player-card {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.64));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    font-size: 28px;
}

.detail-info,
.prose-panel,
.cover-panel,
.sidebar-rank {
    padding: 26px;
}

.detail-info h1 {
    margin: 18px 0 10px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.lead {
    color: var(--slate-2);
    font-size: 18px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.meta-item {
    padding: 14px;
    border-radius: 16px;
    background: #f1f5f9;
}

.meta-item span,
.meta-item strong {
    display: block;
}

.meta-item span {
    color: var(--muted);
    font-size: 13px;
}

.meta-item strong {
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prose-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.prose-panel h2:not(:first-child) {
    margin-top: 28px;
}

.prose-panel p {
    color: #334155;
    font-size: 17px;
}

.detail-sidebar {
    display: grid;
    align-content: start;
    gap: 22px;
}

.cover-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    margin-bottom: 18px;
    background: #0f172a;
}

.sidebar-rank h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.compact-rank .rank-row {
    grid-template-columns: 44px 1fr 52px;
    padding: 8px 10px;
}

.related-section {
    width: 100%;
    padding: 0;
}

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

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #020617);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1.1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand p {
    max-width: 480px;
    color: #94a3b8;
}

.footer-logo {
    margin-bottom: 14px;
}

.footer-group {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-group h3 {
    margin: 0 0 8px;
    color: #ffffff;
}

.footer-group a {
    color: #cbd5e1;
}

.footer-tags div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.filter-item.is-hidden {
    display: none;
}

@media (max-width: 1120px) {
    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        padding: 18px;
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav.is-open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .site-search input {
        width: 160px;
    }

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

    .hero-panel {
        display: none;
    }

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

    .detail-layout,
    .ranking-panel,
    .full-ranking,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
        gap: 10px;
    }

    .site-search {
        display: none;
    }

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

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

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

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

    .movie-grid,
    .large-grid,
    .category-grid,
    .overview-samples,
    .related-grid,
    .meta-grid,
    .detail-sidebar,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll {
        grid-auto-columns: 82%;
    }

    .page-hero {
        padding: 34px 24px;
        border-radius: 26px;
    }

    .filter-bar,
    .search-controls {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        padding: 24px;
    }

    .rank-row {
        grid-template-columns: 48px 1fr 54px;
    }
}
