:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.28);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --red: #ef4444;
    --red-dark: #b91c1c;
    --blue: #38bdf8;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(239, 68, 68, 0.18), transparent 30rem),
        radial-gradient(circle at 88% 4%, rgba(56, 189, 248, 0.15), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444 0%, #7f1d1d 48%, #334155 100%);
    box-shadow: 0 15px 36px rgba(239, 68, 68, 0.22);
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.brand-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(51, 65, 85, 0.72);
    color: #fff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-links {
    display: grid;
    gap: 8px;
    padding: 14px 0 18px;
}

.mobile-links .nav-link {
    display: block;
}

.hero {
    position: relative;
    padding: 44px 0 32px;
    overflow: hidden;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 34px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

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

.hero-media img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, transparent 54%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: end;
    min-height: 620px;
    padding: 58px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.38);
    color: #fecaca;
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    font-weight: 900;
    text-wrap: balance;
}

.hero p {
    margin: 20px 0 0;
    max-width: 650px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.card-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.24);
}

.btn-secondary {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
}

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

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
}

.chip-hot {
    border-color: rgba(248, 113, 113, 0.42);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.35);
}

.hero-side {
    display: grid;
    gap: 12px;
    align-self: center;
}

.hero-mini {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-mini:hover,
.hero-mini.is-active {
    transform: translateX(-4px);
    border-color: rgba(248, 113, 113, 0.48);
    background: rgba(30, 41, 59, 0.82);
}

.hero-mini img {
    height: 96px;
    border-radius: 13px;
    object-fit: cover;
}

.hero-mini strong {
    display: block;
    margin: 3px 0 8px;
    color: #fff;
    font-size: 15px;
    line-height: 1.25;
}

.hero-mini span {
    color: var(--muted);
    font-size: 12px;
}

.section {
    padding: 34px 0;
}

.section-muted {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.52);
}

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

.section-title {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 10px 0 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.link-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fecaca;
    font-size: 14px;
    font-weight: 800;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.54);
}

.search-input,
.filter-select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 15px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    outline: none;
    padding: 0 14px;
}

.search-input:focus,
.filter-select:focus {
    border-color: rgba(248, 113, 113, 0.56);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.45);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
}

.movie-card.hide {
    display: none;
}

.card-cover {
    position: relative;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(248, 113, 113, 0.2), transparent 18rem),
        #111827;
}

.card-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.34s ease;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.9) 100%);
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #991b1b;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.card-body {
    padding: 15px;
}

.card-title {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

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

.card-desc {
    margin: 0;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.65;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.75);
    color: #cbd5e1;
    font-size: 11px;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 82% 18%, rgba(239, 68, 68, 0.22), transparent 12rem),
        rgba(15, 23, 42, 0.76);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(248, 113, 113, 0.42);
    background:
        radial-gradient(circle at 82% 18%, rgba(239, 68, 68, 0.32), transparent 12rem),
        rgba(30, 41, 59, 0.86);
}

.category-card h2,
.category-card h3 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--muted-strong);
    line-height: 1.75;
}

.category-card span {
    position: absolute;
    right: 20px;
    bottom: 18px;
    color: #fecaca;
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 88px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.64);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(30, 41, 59, 0.84);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-size: 18px;
    font-weight: 900;
}

.rank-cover {
    width: 88px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

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

.rank-title {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
}

.rank-desc {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

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

.page-panel {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 88% 12%, rgba(239, 68, 68, 0.18), transparent 18rem),
        rgba(15, 23, 42, 0.64);
}

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

.breadcrumb a {
    color: #fecaca;
}

.page-title {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.page-desc {
    max-width: 820px;
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.9;
}

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

.detail-poster {
    position: sticky;
    top: 102px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
}

.detail-poster-body {
    padding: 18px;
}

.detail-poster-body h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.detail-poster-body p {
    margin: 12px 0 0;
    color: var(--muted-strong);
    line-height: 1.75;
}

.player-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(2, 6, 23, 0.86);
    box-shadow: var(--shadow);
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(239, 68, 68, 0.24), transparent 18rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.82));
    cursor: pointer;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    box-shadow: 0 20px 48px rgba(239, 68, 68, 0.34);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-button {
    transform: scale(1.08);
    background: #dc2626;
}

.player-info {
    padding: 22px;
}

.player-info h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.player-info p {
    margin: 14px 0 0;
    color: var(--muted-strong);
    line-height: 1.85;
}

.text-block {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

.text-block h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.text-block p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.9;
}

.footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0.92));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 24px;
    padding: 42px 0;
}

.footer h2,
.footer h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.footer p,
.footer li {
    color: var(--muted);
    line-height: 1.75;
    font-size: 14px;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.copyright {
    padding: 18px 0 30px;
    color: #64748b;
    font-size: 13px;
}

.empty-result {
    display: none;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

.empty-result.show {
    display: block;
}

@media (max-width: 1080px) {
    .hero-content {
        grid-template-columns: 1fr;
        padding: 42px;
    }

    .hero-side {
        grid-template-columns: repeat(5, minmax(140px, 1fr));
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .hero-mini {
        min-width: 180px;
    }

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

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

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

    .detail-poster {
        position: relative;
        top: auto;
        display: grid;
        grid-template-columns: 220px 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .navbar {
        min-height: 68px;
    }

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

    .brand-subtitle {
        display: none;
    }

    .hero {
        padding-top: 24px;
    }

    .hero-shell {
        min-height: 720px;
        border-radius: 26px;
    }

    .hero-content {
        min-height: 720px;
        padding: 26px;
    }

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

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

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

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

    .section-head {
        display: block;
    }

    .link-more {
        margin-top: 12px;
    }

    .section-muted,
    .page-panel {
        padding: 22px;
        border-radius: 24px;
    }

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

    .rank-item {
        grid-template-columns: 42px 72px 1fr;
    }

    .rank-item .btn {
        grid-column: 2 / -1;
        width: 100%;
    }

    .rank-cover {
        width: 72px;
    }

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

    .detail-poster img {
        max-height: 540px;
    }

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

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

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .hero-shell {
        min-height: 760px;
    }

    .hero-content {
        min-height: 760px;
        padding: 22px;
    }

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

    .btn {
        width: 100%;
    }

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

    .page-title {
        font-size: 34px;
    }

    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-number,
    .rank-cover {
        width: 100%;
    }

    .rank-cover {
        aspect-ratio: 16 / 9;
    }
}
