:root {
    --bg: #0b1020;
    --bg-soft: #11182b;
    --card: rgba(255, 255, 255, 0.08);
    --card-strong: rgba(255, 255, 255, 0.14);
    --line: rgba(255, 255, 255, 0.16);
    --text: #f8fafc;
    --muted: #aab6cf;
    --brand: #f97316;
    --brand-2: #ef4444;
    --brand-3: #facc15;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.28), transparent 34rem),
        radial-gradient(circle at 85% 8%, rgba(239, 68, 68, 0.24), transparent 30rem),
        linear-gradient(135deg, #070b16 0%, #111827 52%, #1f2937 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
    z-index: -1;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(8, 13, 27, 0.72);
    border-bottom: 1px solid var(--line);
}

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

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

.brand {
    font-size: 1.18rem;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #111827;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-3), var(--brand), var(--brand-2));
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a,
.footer-links a {
    color: #dbeafe;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #fff;
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #050816;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.04);
    transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.15);
    transform: scale(1.12);
    opacity: 0.55;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 8, 22, 0.94) 0%, rgba(5, 8, 22, 0.72) 46%, rgba(5, 8, 22, 0.32) 100%),
        linear-gradient(to top, #070b16 0%, transparent 46%);
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 54px;
    padding-top: 72px;
}

.hero-copy {
    animation: fadeUp 0.78s ease both;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 14px;
    color: #fed7aa;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.inner-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 850px;
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-lead,
.inner-hero p,
.detail-lead {
    max-width: 760px;
    margin: 24px 0 0;
    color: #d7deef;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.9;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #ffedd5;
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.13);
    font-size: 0.78rem;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-action,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, #fef08a, #fb923c, #ef4444);
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.35);
}

.ghost-btn,
.section-action,
.filter-panel button {
    color: #f8fafc;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.filter-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 36px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 54%);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 62px;
    color: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
    font-size: 2rem;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 64px;
    background: linear-gradient(90deg, #facc15, #fb923c);
}

.section {
    padding: 72px 0;
}

.section-dark {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 3rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px) minmax(140px, 180px) auto;
    gap: 14px;
    padding: 16px;
    margin: 0 0 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    outline: none;
    background: rgba(15, 23, 42, 0.82);
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(251, 146, 60, 0.72);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.16);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(251, 146, 60, 0.5);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
    transform: translateY(-6px);
}

.movie-card.is-hidden {
    display: none;
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 58%);
}

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
}

.poster-type {
    right: 10px;
    bottom: 10px;
    color: #111827;
    background: rgba(254, 240, 138, 0.92);
}

.rank-badge {
    left: 10px;
    top: 10px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 2.8em;
    overflow: hidden;
    color: #fff;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.38;
}

.movie-title:hover {
    color: #fed7aa;
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    line-height: 1.65;
}

.movie-meta {
    margin: 9px 0 0;
    font-size: 0.84rem;
}

.movie-desc {
    display: -webkit-box;
    min-height: 4.95em;
    margin: 10px 0 14px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 0.9rem;
}

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

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

.category-card {
    position: relative;
    display: grid;
    min-height: 190px;
    align-content: end;
    gap: 10px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #111827;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.14)), var(--category-image);
    background-position: center;
    background-size: cover;
    transition: transform 0.35s ease;
}

.category-card:hover::before {
    transform: scale(1.06);
}

.category-card span,
.category-card strong {
    position: relative;
    z-index: 2;
}

.category-card span {
    color: #fef3c7;
    font-size: 1.6rem;
    font-weight: 950;
}

.category-card strong {
    color: #e5e7eb;
    line-height: 1.7;
}

.inner-hero {
    padding: 106px 0 64px;
    background:
        radial-gradient(circle at 18% 18%, rgba(249, 115, 22, 0.28), transparent 28rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    border-bottom: 1px solid var(--line);
}

.inner-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 70px;
    background: #050816;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--detail-image);
    background-position: center;
    background-size: cover;
    filter: blur(24px) saturate(1.1);
    opacity: 0.42;
    transform: scale(1.12);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 8, 22, 0.95), rgba(5, 8, 22, 0.72), rgba(5, 8, 22, 0.42));
}

.detail-grid {
    position: relative;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fed7aa;
    font-weight: 800;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    font-weight: 800;
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.68)),
        linear-gradient(to top, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.18));
}

.play-overlay span {
    display: grid;
    width: clamp(78px, 10vw, 116px);
    height: clamp(78px, 10vw, 116px);
    place-items: center;
    padding-left: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fef08a, #fb923c, #ef4444);
    box-shadow: 0 24px 58px rgba(249, 115, 22, 0.45);
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.content-card {
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 2.2vw, 2.2rem);
    font-weight: 950;
}

.content-card h2:not(:first-child) {
    margin-top: 32px;
}

.content-card p {
    margin: 0;
    color: #dbe4f4;
    font-size: 1.02rem;
    line-height: 2;
}

.larger-tags {
    margin-top: 12px;
}

.site-footer {
    padding: 46px 0;
    border-top: 1px solid var(--line);
    background: rgba(8, 13, 27, 0.68);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 8px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .site-nav {
        position: absolute;
        top: 72px;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(8, 13, 27, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel {
        min-height: 780px;
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 330px;
        margin: 0 auto;
    }

    .hero-control {
        display: none;
    }

    .section-heading,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .hero-carousel {
        min-height: 730px;
    }

    .hero-grid {
        gap: 28px;
        padding-top: 42px;
    }

    .hero-copy h1,
    .hero-copy h2,
    .inner-hero h1,
    .detail-info h1 {
        font-size: clamp(2.2rem, 15vw, 3.8rem);
    }

    .section {
        padding: 48px 0;
    }

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

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