:root {
    color-scheme: dark;
    --bg: #080b12;
    --bg-soft: #101522;
    --bg-card: rgba(17, 24, 39, 0.82);
    --line: rgba(255, 255, 255, 0.09);
    --text: #f8fafc;
    --muted: #aeb7c7;
    --subtle: #7d8799;
    --brand: #f97316;
    --brand-strong: #ef4444;
    --gold: #facc15;
    --shadow: 0 28px 80px 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(249, 115, 22, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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: 80;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 11, 18, 0.88);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 70px;
    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-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 12px 34px rgba(249, 115, 22, 0.35);
}

.brand-text,
.footer-brand {
    font-size: 21px;
    background: linear-gradient(135deg, #ffb86c, #ff4d4d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(239, 68, 68, 0.94));
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

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

.hero {
    padding: 24px 0 34px;
}

.hero-shell {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
    transform: scale(1.02);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 8, 15, 0.95) 0%, rgba(8, 11, 18, 0.8) 45%, rgba(8, 11, 18, 0.25) 100%),
        linear-gradient(0deg, rgba(8, 11, 18, 0.94) 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(690px, 92%);
    padding: 92px 0 0 70px;
}

.eyebrow,
.hero-content .eyebrow,
.page-hero span,
.category-card-large span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.hero-content p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #d9e1ee;
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fdebd7;
    background: rgba(255, 255, 255, 0.07);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.text-link,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.home-search button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 16px 42px rgba(249, 115, 22, 0.32);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.home-search button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: absolute;
    right: 72px;
    bottom: 98px;
    z-index: 3;
    width: min(330px, 27vw);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

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

.hero-dots {
    position: absolute;
    left: 70px;
    right: 70px;
    bottom: 28px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.hero-dot {
    height: 74px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.62;
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-dot.active,
.hero-dot:hover {
    opacity: 1;
    border-color: rgba(249, 115, 22, 0.85);
    transform: translateY(-2px);
}

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

.home-search,
.content-section,
.filter-panel,
.detail-layout,
.player-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search {
    margin-top: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.76);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.home-search form {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 18px;
    align-items: center;
}

.home-search label {
    color: #fff;
    font-weight: 900;
}

.home-search form div,
.filter-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.home-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    outline: none;
}

.filter-controls select option {
    color: #111827;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-hero h1,
.detail-content h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-hero p,
.detail-content p,
.category-card-large p,
.movie-info p,
.site-footer p {
    color: var(--muted);
}

.section-heading a,
.text-link {
    color: #fed7aa;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.42;
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 18px;
}

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

.category-tile p {
    margin: 8px 0 0;
    color: #d6deeb;
    font-size: 13px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(239, 68, 68, 0.12));
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(8, 11, 18, 0.88), transparent);
}

.poster-type,
.rank-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 900;
}

.poster-type {
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    color: #fff;
    background: rgba(8, 11, 18, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
}

.rank-badge {
    right: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f97316);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 14px 32px rgba(249, 115, 22, 0.4);
}

.movie-info {
    padding: 15px;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    font-size: 12px;
    font-weight: 800;
}

.movie-info h2 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.25;
}

.movie-info h2 a:hover {
    color: #fb923c;
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
}

.movie-card.compact .movie-info h2 {
    font-size: 16px;
}

.movie-card.compact .movie-info p {
    min-height: 40px;
    font-size: 12px;
}

.page-hero {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 24px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(239, 68, 68, 0.1)),
        rgba(17, 24, 39, 0.9);
    box-shadow: var(--shadow);
}

.small-hero {
    padding: 56px;
}

.small-hero p {
    max-width: 720px;
    margin: 14px 0 0;
    font-size: 17px;
}

.filter-panel {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.82);
}

.filter-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: center;
}

.filter-copy span {
    display: block;
    color: #fed7aa;
    font-size: 12px;
    font-weight: 900;
}

.filter-copy strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
}

.filter-controls {
    grid-template-columns: 1.5fr repeat(3, minmax(120px, 0.6fr));
}

.empty-state {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: #fed7aa;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-card);
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

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

.category-card-large h2 {
    margin: 6px 0 10px;
    font-size: 26px;
}

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.category-mini-links a {
    padding: 5px 9px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.detail-hero {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    background: #111827;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.08);
    transform: scale(1.04);
}

.detail-hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 11, 18, 0.96), rgba(8, 11, 18, 0.75), rgba(8, 11, 18, 0.42)),
        linear-gradient(0deg, var(--bg), transparent 60%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 74px 0;
}

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

.detail-hero h1 {
    max-width: 900px;
    margin-top: 18px;
}

.detail-hero p {
    max-width: 760px;
    margin: 16px 0 20px;
    font-size: 18px;
}

.player-section {
    margin-top: -90px;
    position: relative;
    z-index: 4;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.38);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    padding-top: 34px;
}

.detail-content,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.detail-content {
    padding: 30px;
}

.detail-content h2:not(:first-of-type) {
    margin-top: 30px;
}

.detail-content p {
    font-size: 17px;
}

.detail-tags {
    margin-top: 24px;
}

.detail-side {
    padding: 18px;
}

.detail-side h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-rank {
    display: grid;
    gap: 14px;
}

.side-rank .movie-card {
    display: grid;
    grid-template-columns: 88px 1fr;
}

.side-rank .poster {
    height: 132px;
}

.side-rank .movie-info p,
.side-rank .tag-row {
    display: none;
}

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

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: rgba(5, 8, 15, 0.9);
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--muted);
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--subtle);
    font-size: 13px;
}

[hidden] {
    display: none !important;
}

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

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

    .hero-content {
        padding-left: 42px;
    }

    .hero-poster {
        right: 42px;
        width: 260px;
    }

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

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

    .nav-menu {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(8, 11, 18, 0.96);
        box-shadow: var(--shadow);
    }

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

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

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

    .hero-content {
        width: 100%;
        padding: 44px 24px 0;
    }

    .hero-poster {
        left: 24px;
        right: auto;
        bottom: 124px;
        width: 180px;
    }

    .hero-dots {
        left: 24px;
        right: 24px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-dot {
        height: 56px;
    }

    .home-search form,
    .filter-panel,
    .footer-grid,
    .category-card-large {
        grid-template-columns: 1fr;
    }

    .filter-controls,
    .home-search form div {
        grid-template-columns: 1fr;
    }

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

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

    .small-hero {
        padding: 34px 24px;
    }

    .player-section {
        margin-top: -40px;
    }

    .detail-content {
        padding: 22px;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .hero-shell,
    .home-search,
    .content-section,
    .filter-panel,
    .detail-layout,
    .player-section,
    .page-hero,
    .detail-hero-content,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1240px);
    }

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

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

    .hero-content p {
        font-size: 15px;
    }

    .hero-actions {
        gap: 8px;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

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

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

    .side-rank .movie-card {
        grid-template-columns: 96px 1fr;
    }
}
