:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #059669;
    --brand-dark: #047857;
    --brand-soft: #d1fae5;
    --teal: #0f766e;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    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;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.22);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--teal));
    box-shadow: 0 12px 26px rgba(5, 150, 105, 0.35);
    font-size: 15px;
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    transition: 0.2s ease;
}

.main-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.03);
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-info p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

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

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    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(--brand), var(--teal));
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.3);
}

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

.btn.full {
    width: 100%;
    margin-top: 16px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

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

.section {
    padding: 74px 0;
}

.section.muted {
    background: #eef2f7;
}

.section-head {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-head.left-head {
    text-align: left;
    margin: 0;
}

.section-head h2,
.side-card h2,
.content-card h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p,
.category-overview-card p,
.side-card p {
    color: var(--muted);
    margin: 12px 0 0;
}

.split-section {
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    gap: 38px;
    align-items: start;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.7), transparent 28%), linear-gradient(135deg, #0f172a, #0f766e);
}

.poster-wrap img,
.category-tile img,
.rank-item img,
.detail-poster img,
.category-preview-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.2s ease;
}

.image-missing {
    opacity: 0;
}

.poster-wrap:hover img,
.category-tile:hover img {
    transform: scale(1.06);
}

.play-dot {
    position: absolute;
    inset: auto 14px 14px auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.88);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.card-year {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    font-weight: 800;
    font-size: 13px;
}

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

.movie-title {
    display: block;
    font-weight: 900;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.movie-title:hover,
.text-link:hover {
    color: var(--brand);
}

.movie-meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.movie-card p {
    margin: 10px 0 0;
    color: #475569;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 700;
}

.large-tags span {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.24);
    border: 1px solid rgba(167, 243, 208, 0.3);
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.category-tile img {
    position: absolute;
    inset: 0;
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
    margin-top: 6px;
}

.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 46px 60px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

.rank-item img {
    width: 60px;
    height: 76px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
}

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

.rank-main strong,
.rank-main em {
    display: block;
}

.rank-main strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-main em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    margin-top: 4px;
}

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

.page-hero {
    color: #ffffff;
    padding: 92px 0;
    background: radial-gradient(circle at 75% 20%, rgba(16, 185, 129, 0.42), transparent 30%), linear-gradient(135deg, #020617, #064e3b 52%, #0f766e);
}

.category-page-hero,
.ranking-hero {
    background: radial-gradient(circle at 20% 25%, rgba(20, 184, 166, 0.4), transparent 32%), linear-gradient(135deg, #020617, #115e59);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    padding: 16px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--ink);
    background: #f8fafc;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.empty-state {
    padding: 28px;
    text-align: center;
    border-radius: 22px;
    background: #ffffff;
    color: var(--muted);
}

.overview-grid {
    display: grid;
    gap: 20px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.category-preview-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    min-height: 190px;
}

.category-preview-images img {
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--brand-dark);
    font-weight: 900;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
    align-items: start;
}

.side-card,
.content-card,
.player-card {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.side-card {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.side-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.side-links a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f1f5f9;
    font-weight: 800;
}

.side-links a:hover {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.detail-hero {
    padding: 88px 0;
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a, #0f766e);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

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

.player-card {
    overflow: hidden;
    padding: 12px;
    background: #020617;
}

.player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.28), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

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

.big-play {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--teal));
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.28);
    font-size: 30px;
}

.content-card {
    padding: 28px;
}

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

.info-list {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 18px 0 0;
}

.info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

.site-footer {
    padding: 44px 0;
    color: rgba(255, 255, 255, 0.75);
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    margin-top: 12px;
}

.footer-links strong {
    display: block;
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-links div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

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

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px 18px;
        background: rgba(15, 23, 42, 0.98);
    }

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

    .main-nav a {
        border-radius: 14px;
    }

    .hero {
        min-height: 560px;
    }

    .hero p,
    .page-hero p,
    .detail-info p {
        font-size: 16px;
    }

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

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

    .movie-title {
        font-size: 16px;
    }

    .category-overview-card,
    .detail-hero-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-preview-images {
        min-height: 160px;
    }

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

    .rank-item a {
        grid-template-columns: 38px 54px minmax(0, 1fr);
    }

    .heat {
        display: none;
    }

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

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

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

    .section {
        padding: 52px 0;
    }

    .hero-actions {
        flex-direction: column;
    }
}
