:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --emerald-50: #ecfdf5;
    --white: #ffffff;
    --shadow-soft: 0 22px 50px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.10);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 45%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800) 52%, var(--slate-900));
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    color: var(--emerald-400);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 24px;
    letter-spacing: 0.03em;
}

.brand-text small {
    color: #cbd5e1;
    font-size: 12px;
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    color: #e2e8f0;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--emerald-400);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 16px;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-section {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-collage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    min-height: 100%;
}

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

.hero-panel:hover img {
    transform: scale(1.08);
}

.hero-panel span {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    z-index: 2;
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.22) 42%, rgba(2, 6, 23, 0.78)), linear-gradient(90deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 72px 0 56px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald-400);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 980px;
    margin: 22px auto 20px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 780px;
    margin: 0 auto 28px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 24px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

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

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

.btn-primary {
    color: var(--white);
    background: var(--emerald-600);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.36);
}

.btn-primary:hover {
    background: var(--emerald-700);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(16px);
}

.btn-dark {
    color: var(--white);
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-ghost-dark {
    color: var(--slate-700);
    background: var(--slate-100);
}

.hero-search {
    width: min(680px, 100%);
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--white);
    padding: 0 18px;
    background: transparent;
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

.hero-search button {
    border: 0;
    color: var(--white);
    background: var(--emerald-600);
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    cursor: pointer;
}

.hero-hot,
.hero-categories,
.page-hero-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.hero-hot span {
    color: #cbd5e1;
}

.hero-hot a,
.hero-categories a,
.page-hero-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.section {
    padding: 66px 0;
}

.muted-section {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

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

.section-head h2 {
    margin: 8px 0 8px;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.section-head p {
    max-width: 680px;
    margin: 0;
    color: var(--slate-500);
}

.section-link,
.text-link {
    color: var(--emerald-700);
    font-weight: 800;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.92);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-play::after,
.play-circle::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 17px;
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 16px solid var(--white);
}

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: var(--emerald-600);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(245, 158, 11, 0.96);
}

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--emerald-700);
}

.movie-info p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--slate-500);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--slate-100);
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--emerald-700);
    background: var(--emerald-50);
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.category-tile span {
    color: var(--emerald-400);
    font-weight: 900;
    font-size: 20px;
}

.category-tile strong {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
}

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

.ranking-panel,
.sidebar-panel,
.poster-card,
.detail-card,
.player-card,
.category-card-large {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.ranking-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ranking-panel-head span,
.sidebar-panel h2,
.poster-card h2 {
    color: var(--slate-900);
    font-size: 20px;
    font-weight: 900;
}

.ranking-panel-head a {
    color: var(--emerald-700);
    font-size: 14px;
    font-weight: 800;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 78px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
}

.rank-number {
    color: var(--emerald-600);
    font-weight: 900;
    font-size: 20px;
}

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

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

.rank-copy strong {
    display: block;
    overflow: hidden;
    color: var(--slate-900);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy em {
    display: block;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: #f59e0b;
    font-weight: 900;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 52px 0 34px;
}

.footer-brand {
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.footer-grid p {
    max-width: 420px;
    color: #94a3b8;
}

.footer-grid h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: var(--emerald-400);
}

.footer-bottom {
    padding: 18px 16px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.page-main {
    background: linear-gradient(180deg, var(--slate-50), #ffffff);
}

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.34), transparent 34%), linear-gradient(135deg, var(--slate-900), var(--slate-800));
    padding: 74px 0 70px;
}

.page-hero h1 {
    max-width: 920px;
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.breadcrumb a:hover {
    color: var(--emerald-400);
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.category-cover-stack img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.category-card-large h2 {
    margin: 0 0 10px;
    color: var(--slate-900);
}

.category-card-large p {
    color: var(--slate-500);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px 170px;
    gap: 12px;
    padding: 12px;
    margin-bottom: 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    outline: 0;
    padding: 0 14px;
    color: var(--slate-700);
    background: var(--slate-50);
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.empty-state {
    padding: 36px;
    color: var(--slate-500);
    text-align: center;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.ranking-list-wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin-top: 34px;
    padding: 10px 24px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

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

.detail-primary .breadcrumb {
    color: var(--slate-500);
}

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
    background: #000000;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.42));
}

.play-overlay.is-hidden {
    display: none;
}

.play-circle {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--emerald-600);
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.38);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-circle {
    transform: scale(1.08);
    background: var(--emerald-700);
}

.play-circle::after {
    left: 35px;
    top: 28px;
    border-top-width: 15px;
    border-bottom-width: 15px;
    border-left-width: 22px;
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.16;
}

.detail-card h2 {
    margin: 28px 0 10px;
    color: var(--slate-900);
    font-size: 24px;
}

.detail-card p {
    color: var(--slate-600);
    font-size: 16px;
}

.lead-text {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    color: var(--slate-700);
    background: var(--slate-50);
    border-left: 4px solid var(--emerald-500);
}

.detail-tags {
    margin-top: 18px;
}

.detail-actions {
    justify-content: flex-start;
    margin-top: 26px;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.poster-card,
.sidebar-panel {
    padding: 20px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.poster-card p {
    color: var(--slate-500);
}

.sidebar-panel .rank-row {
    grid-template-columns: 32px 62px minmax(0, 1fr);
}

.sidebar-panel .rank-score {
    display: none;
}

.sidebar-panel .rank-row img {
    width: 62px;
    height: 44px;
}

.related-section {
    padding-bottom: 0;
}

[hidden] {
    display: none !important;
}

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

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

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

    .ranking-panel {
        position: static;
    }

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

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

    .nav-toggle {
        display: block;
    }

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

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

    .hero-collage {
        grid-template-columns: 1fr;
    }

    .hero-panel:nth-child(n + 2) {
        display: none;
    }

    .hero-content,
    .hero-section {
        min-height: 72vh;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 22px;
    }

    .hero-search input {
        min-height: 44px;
    }

    .section-head {
        display: block;
    }

    .section-link {
        display: inline-flex;
        margin-top: 14px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .category-list-grid,
    .ranking-list-wide,
    .detail-sidebar {
        grid-template-columns: 1fr 1fr;
    }

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

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

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

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

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .category-list-grid,
    .ranking-list-wide,
    .detail-sidebar,
    .filter-bar,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 52px 0;
    }

    .section {
        padding: 46px 0;
    }

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

    .rank-score {
        display: none;
    }

    .detail-card {
        padding: 22px;
    }

    .play-circle {
        width: 72px;
        height: 72px;
    }

    .play-circle::after {
        left: 30px;
        top: 23px;
    }
}
