:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --card: #111827;
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #e5e7eb;
    --amber: #d97706;
    --amber-light: #fbbf24;
    --red: #dc2626;
    --line: rgba(148, 163, 184, 0.18);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.14), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: #1e293b;
}

body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: var(--amber);
    border-radius: 999px;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff;
    box-shadow: 0 14px 35px rgba(217, 119, 6, 0.35);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(217, 119, 6, 0.18);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(15, 23, 42, 0.88);
    border-radius: 12px;
    padding: 8px 12px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-stage {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.05);
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.35) 68%, rgba(2, 6, 23, 0.86)),
        linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 0 140px;
    max-width: 1280px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 999px;
    color: var(--amber-light);
    background: rgba(217, 119, 6, 0.13);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    max-width: 820px;
}

.hero-desc {
    margin: 0;
    max-width: 720px;
    color: #e5e7eb;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.48);
    border: 1px solid rgba(251, 191, 36, 0.22);
    font-size: 12px;
}

.hero-actions,
.detail-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    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: #fff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 18px 40px rgba(217, 119, 6, 0.35);
}

.btn-ghost {
    color: #fff;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.7);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 4;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1.1fr 2fr auto;
    gap: 14px;
    align-items: stretch;
}

.hero-search,
.page-search {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search input,
.page-search input {
    min-width: 0;
    flex: 1;
    color: #fff;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 8px;
}

.hero-search button,
.page-search button {
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--amber);
    padding: 0 16px;
    cursor: pointer;
}

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

.mini-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.mini-card:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.92);
}

.mini-card img {
    width: 54px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.8);
}

.mini-card strong,
.mini-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card strong {
    color: #fff;
    font-size: 14px;
}

.mini-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}

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

.hero-dot.is-active {
    width: 28px;
    background: var(--amber-light);
}

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

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

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

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-link {
    color: var(--amber-light);
    font-weight: 800;
}

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

.category-card {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(120, 53, 15, 0.3));
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.55);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.8);
}

.category-card span {
    font-size: 20px;
    font-weight: 800;
}

.category-card strong {
    margin-top: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.46);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

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

.poster-badge,
.poster-year {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 4px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 10px;
}

.poster-year {
    right: 10px;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.9);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--red));
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

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

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--amber-light);
}

.card-meta {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.card-desc {
    min-height: 42px;
    margin: 0 0 12px;
    color: #cbd5e1;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    line-height: 1.6;
}

.rank-grid {
    columns: 3;
    column-gap: 18px;
}

.rank-row {
    break-inside: avoid;
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.86);
}

.rank-no {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--red));
}

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

.rank-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 13px;
}

.page-main {
    padding-top: 42px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(120, 53, 15, 0.46), rgba(15, 23, 42, 0.88)),
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.32), transparent 22rem);
    box-shadow: var(--shadow);
}

.compact-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 430px);
    gap: 28px;
    align-items: center;
    padding: clamp(28px, 5vw, 58px);
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-poster {
    position: relative;
    display: block;
}

.ranking-poster img {
    width: 110px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.8);
}

.ranking-poster span {
    position: absolute;
    left: 8px;
    top: 8px;
    border-radius: 10px;
    padding: 4px 7px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--red));
}

.ranking-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.ranking-card h2 a:hover {
    color: var(--amber-light);
}

.ranking-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.detail-main {
    padding: 28px 0 0;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: clamp(22px, 5vw, 52px);
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: clamp(18px, 4vw, 42px);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(120, 53, 15, 0.28)),
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.2), transparent 24rem);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
    margin-top: 16px;
}

.detail-one-line {
    margin: 0 0 16px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 16px;
    color: var(--muted);
}

.player-section,
.detail-section {
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(18px, 3vw, 30px);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.player-section h2,
.detail-section h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.detail-section p {
    margin: 0;
    color: #d1d5db;
    font-size: 17px;
    line-height: 1.95;
    white-space: pre-line;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
    font-size: 34px;
    padding-left: 4px;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #cbd5e1;
}

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

.footer-links a:hover,
.footer-brand:hover {
    color: var(--amber-light);
}

[data-card].is-hidden {
    display: none;
}

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

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

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

    .hero-side-list {
        display: none;
    }
}

@media (max-width: 900px) {
    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 10px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-toggle {
        display: inline-flex;
    }

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

    .rank-grid {
        columns: 1;
    }

    .compact-hero,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .nav-shell,
    .content-section,
    .page-main,
    .detail-main,
    .footer-inner {
        width: min(100% - 22px, 1280px);
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .hero-content {
        width: min(100% - 22px, 1280px);
        padding-top: 58px;
        padding-bottom: 160px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .hero-panel {
        width: min(100% - 22px, 1280px);
        bottom: 18px;
    }

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

    .hero-search button,
    .page-search button {
        min-height: 42px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-desc {
        min-height: auto;
    }

    .ranking-card {
        grid-template-columns: 88px 1fr;
    }

    .ranking-poster img {
        width: 88px;
    }

    .footer-inner {
        display: grid;
    }
}
