:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #059669;
    --primary-dark: #047857;
    --primary-soft: #ecfdf5;
    --teal-soft: #f0fdfa;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-shell {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #0f766e);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(5, 150, 105, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    position: relative;
    padding: 24px 0;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    height: 3px;
    background: var(--primary);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: #f3f4f6;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

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

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    right: 24px;
    bottom: 126px;
    max-width: 760px;
    color: #ffffff;
}

.hero-tags,
.detail-tags,
.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-line em {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #065f46;
    background: rgba(236, 253, 245, 0.94);
    border-radius: 999px;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.hero h1 {
    margin: 16px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 14px 45px rgba(0, 0, 0, 0.45);
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
    text-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

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

.button.primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.32);
}

.button.primary:hover {
    background: var(--primary-dark);
}

.button.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

.button.ghost.dark {
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
}

.hero-search-panel {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    padding: 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(5, 150, 105, 0.55);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.hero-search button {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    background: var(--primary);
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.hero-category-links a {
    padding: 8px 12px;
    color: #047857;
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 154px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.52);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.section-shell,
.category-block {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0;
}

.soft-panel {
    width: min(1180px, calc(100% - 40px));
    margin-top: 8px;
    padding: 42px;
    background: linear-gradient(135deg, var(--primary-soft), var(--teal-soft));
    border-radius: 26px;
}

.ranking-panel {
    padding-top: 28px;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-head h2,
.category-block h2,
.detail-content h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-link {
    color: var(--primary);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(5, 150, 105, 0.28);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    background: rgba(5, 150, 105, 0.94);
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    background: rgba(17, 24, 39, 0.84);
    border-radius: 10px;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.card-meta span {
    padding: 3px 7px;
    background: #f3f4f6;
    border-radius: 999px;
}

.card-body h3 {
    margin: 11px 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.card-body h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--primary);
}

.card-body p {
    min-height: 48px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.card-foot strong {
    color: #f59e0b;
    font-size: 16px;
}

.movie-card.compact .card-body {
    padding: 12px;
}

.movie-card.compact .card-body p,
.movie-card.compact .card-foot {
    display: none;
}

.movie-card.compact .card-body h3 {
    font-size: 15px;
}

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

.category-tile {
    display: block;
    min-height: 148px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(5, 150, 105, 0.32);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
}

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

.category-tile.large {
    min-height: 170px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(160px, 0.35fr) 56px;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(5, 150, 105, 0.32);
}

.rank-row span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--primary);
    border-radius: 10px;
    font-weight: 900;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
}

.rank-row b {
    color: #f59e0b;
    text-align: right;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 62px 0 28px;
}

.page-hero.small {
    padding: 54px 0 20px;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.empty-state {
    padding: 38px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px dashed var(--line);
    border-radius: 18px;
}

.ranking-stack {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 72px;
    gap: 20px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.ranking-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #e5e7eb;
}

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

.ranking-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.95);
    border-radius: 10px;
    font-weight: 900;
}

.ranking-info h2 {
    margin: 10px 0 8px;
    font-size: 22px;
    line-height: 1.22;
}

.ranking-info p {
    margin: 0 0 12px;
    color: var(--muted);
}

.score {
    color: #f59e0b;
    font-size: 24px;
    text-align: right;
}

.detail-hero-section {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(5, 150, 105, 0.45), transparent 38%), linear-gradient(135deg, #0f172a, #111827 54%, #064e3b);
}

.detail-hero-section .breadcrumb {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding-top: 34px;
    color: rgba(255, 255, 255, 0.72);
}

.detail-layout {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 58px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.lead {
    max-width: 820px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    padding-top: 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 24px;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    padding: 0;
    overflow: hidden;
    color: #ffffff;
    background: #000000;
    border: 0;
    cursor: pointer;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    background: rgba(5, 150, 105, 0.94);
    border-radius: 999px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
    font-size: 32px;
}

.detail-content {
    padding-top: 0;
}

.detail-content p {
    margin: 12px 0 28px;
    color: #374151;
    font-size: 18px;
}

.site-footer {
    margin-top: 46px;
    color: #d1d5db;
    background: #111827;
}

.footer-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 32px;
}

.footer-logo .brand-copy strong {
    color: #ffffff;
}

.footer-brand p {
    max-width: 620px;
    margin: 18px 0 0;
    color: #9ca3af;
}

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

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

.footer-bottom {
    padding: 18px 20px;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden] {
    display: none !important;
}

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

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

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

    .nav-menu {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        background: var(--primary-soft);
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        left: 20px;
        bottom: 230px;
    }

    .hero-dots {
        left: 20px;
        right: auto;
        bottom: 198px;
    }

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

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

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

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

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

    .detail-poster {
        max-width: 260px;
    }

    .ranking-card {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .ranking-card .score {
        grid-column: 2;
        text-align: left;
    }

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

@media (max-width: 560px) {
    .nav-shell {
        height: 64px;
        padding: 0 14px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-content {
        bottom: 252px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-search-panel,
    .section-shell,
    .category-block,
    .page-hero,
    .detail-layout,
    .detail-hero-section .breadcrumb,
    .footer-shell {
        width: calc(100% - 28px);
    }

    .hero-dots {
        bottom: 216px;
    }

    .soft-panel {
        width: calc(100% - 28px);
        padding: 24px;
    }

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

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

    .rank-row em {
        display: none;
    }

    .player-play {
        width: 68px;
        height: 68px;
        font-size: 25px;
    }
}
