:root {
    --dark-900: #050608;
    --dark-800: #0b0d10;
    --dark-700: #101419;
    --dark-600: #151a21;
    --dark-500: #26313d;
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --primary-500: #f5871f;
    --primary-400: #f79f3f;
    --primary-600: #d96f12;
    --ring: rgba(245, 135, 31, 0.32);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--dark-800);
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(245, 135, 31, 0.14), transparent 34rem),
        linear-gradient(180deg, var(--dark-800), var(--dark-900));
    min-height: 100vh;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(16, 20, 25, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--primary-500);
    color: #fff;
    box-shadow: 0 12px 28px var(--ring);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--text-soft);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--primary-400);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--dark-600);
    color: #fff;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 540px;
    height: 72vh;
    max-height: 820px;
    overflow: hidden;
    background: var(--dark-900);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 6, 8, 0.96) 0%, rgba(11, 13, 16, 0.86) 42%, rgba(11, 13, 16, 0.25) 100%),
        linear-gradient(0deg, var(--dark-800) 0%, transparent 35%);
}

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

.hero-content > * {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: var(--primary-400);
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.lead-text {
    color: var(--text-soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    margin: 20px 0 0;
}

.hero-tags {
    margin: 24px 0 0;
}

.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: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

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

.btn.primary {
    background: var(--primary-500);
    color: #fff;
    box-shadow: 0 14px 34px var(--ring);
}

.btn.primary:hover {
    background: var(--primary-600);
}

.btn.ghost {
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.hero-controls {
    position: absolute;
    right: clamp(20px, 5vw, 90px);
    bottom: 74px;
    z-index: 5;
    display: flex;
    gap: 12px;
}

.hero-controls button,
.hero-dot {
    border: 0;
    color: #fff;
    cursor: pointer;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 34px;
    line-height: 1;
}

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

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

.hero-dot.active {
    background: var(--primary-500);
}

.home-search-panel,
.section-block,
.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-search-panel {
    transform: translateY(-44px);
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 24px;
    padding: 28px;
    border-radius: 22px;
    background: rgba(16, 20, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

.home-search-panel h2,
.section-head h2,
.detail-article h2,
.side-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.home-search-panel p {
    margin: 8px 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.inline-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: var(--dark-600);
    color: #fff;
    padding: 0 14px;
    outline: none;
}

.inline-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--ring);
}

.inline-search button {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-500);
    color: #fff;
    font-weight: 800;
    padding: 0 20px;
    cursor: pointer;
}

.section-block {
    padding: 44px 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compact-head {
    margin-bottom: 18px;
}

.accent-bar {
    width: 5px;
    height: 30px;
    border-radius: 999px;
    background: var(--primary-500);
    box-shadow: 0 0 24px var(--ring);
}

.section-link {
    color: var(--primary-400);
    font-weight: 750;
}

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: var(--dark-600);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(245, 135, 31, 0.42);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-600), var(--dark-500));
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 4 / 3;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
}

.pill {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
}

.year-pill {
    top: 10px;
    right: 10px;
}

.region-pill {
    bottom: 10px;
    left: 10px;
    background: rgba(245, 135, 31, 0.9);
}

.hover-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 3;
    color: #fff;
    font-size: 36px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 0.22s ease;
}

.movie-card:hover .hover-play {
    opacity: 1;
}

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

.movie-card h3,
.horizontal-card h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3,
.horizontal-card:hover h3 {
    color: var(--primary-400);
}

.movie-card p,
.horizontal-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-card .tag-row {
    margin-top: 14px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(245, 135, 31, 0.14);
    color: var(--primary-400);
    font-size: 12px;
    font-weight: 700;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
}

.split-section > div,
.side-panel,
.detail-article {
    border-radius: 22px;
    background: rgba(16, 20, 25, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: var(--dark-600);
    color: var(--text-soft);
}

.rank-list a:hover {
    color: var(--primary-400);
}

.rank-list span,
.ranking-no {
    color: var(--primary-400);
    font-weight: 900;
}

.rank-list strong {
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 13px;
}

.horizontal-list,
.side-list {
    display: grid;
    gap: 12px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: var(--dark-600);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.horizontal-card img {
    width: 128px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--dark-500);
}

.mini-meta,
.horizontal-card em {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--primary-400);
    font-style: normal;
    font-size: 12px;
    font-weight: 750;
}

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

.category-tile {
    display: block;
    min-height: 170px;
    border-radius: 20px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(245, 135, 31, 0.16), rgba(245, 135, 31, 0.02)),
        var(--dark-600);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 135, 31, 0.38);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.category-tile span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--primary-400);
    font-weight: 800;
}

.page-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 42px auto 12px;
    min-height: 320px;
    display: grid;
    align-items: center;
    border-radius: 28px;
    overflow: hidden;
    padding: 48px;
    background:
        radial-gradient(circle at top right, rgba(245, 135, 31, 0.28), transparent 22rem),
        linear-gradient(135deg, var(--dark-700), var(--dark-600));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero.slim-hero,
.page-hero.category-hero {
    min-height: 280px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 1fr));
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: var(--dark-700);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-grid {
    display: grid;
    gap: 14px;
}

.ranking-card {
    position: relative;
    display: grid;
    grid-template-columns: 58px 150px 1fr;
    gap: 18px;
    align-items: center;
    min-height: 118px;
    border-radius: 18px;
    padding: 14px;
    background: var(--dark-600);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.ranking-card:hover {
    border-color: rgba(245, 135, 31, 0.42);
}

.ranking-card img {
    width: 150px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--dark-500);
}

.ranking-card strong {
    color: #fff;
    font-size: 18px;
}

.ranking-card p {
    margin: 8px 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.ranking-card em {
    color: var(--primary-400);
    font-style: normal;
    font-size: 13px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 42px;
    align-items: center;
    padding: 56px 0;
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--dark-600);
}

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

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

.breadcrumb a:hover {
    color: var(--primary-400);
}

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

.meta-pills span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-soft);
    font-weight: 700;
}

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

.watch-section {
    margin-top: -70px;
    position: relative;
    z-index: 6;
}

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

.video-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

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

.player-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--primary-500);
    box-shadow: 0 18px 45px var(--ring);
    font-size: 32px;
    padding-left: 5px;
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.detail-article p {
    color: var(--text-soft);
    line-height: 2;
    font-size: 16px;
}

.detail-article h2 + p {
    margin-top: 14px;
}

.detail-taxonomy {
    display: grid;
    gap: 20px;
    margin-top: 26px;
}

.detail-taxonomy strong {
    display: block;
    margin-bottom: 10px;
}

.site-footer {
    margin-top: 40px;
    background: var(--dark-700);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 850;
    margin-bottom: 12px;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: var(--text-muted);
    line-height: 1.8;
}

.site-footer h2 {
    font-size: 18px;
    margin: 0 0 14px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

@media (max-width: 1024px) {
    .poster-grid,
    .small-grid,
    .library-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .featured-grid,
    .split-section,
    .detail-content-grid,
    .home-search-panel {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .hero {
        min-height: 620px;
        height: 78vh;
    }

    .hero-overlay,
    .detail-hero-shade {
        background: linear-gradient(0deg, var(--dark-800) 0%, rgba(5, 6, 8, 0.66) 46%, rgba(5, 6, 8, 0.32) 100%);
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 100px;
    }

    .hero-controls {
        right: 16px;
        bottom: 28px;
    }

    .hero-dots {
        left: 16px;
        transform: none;
    }

    .home-search-panel {
        transform: translateY(-26px);
        padding: 20px;
    }

    .inline-search {
        flex-direction: column;
    }

    .inline-search button {
        width: 100%;
    }

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

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

    .movie-card h3,
    .horizontal-card h3 {
        font-size: 16px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-list a {
        grid-template-columns: 42px 1fr;
    }

    .rank-list em {
        grid-column: 2;
    }

    .page-hero {
        padding: 28px;
        margin-top: 24px;
        border-radius: 22px;
    }

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

    .ranking-card {
        grid-template-columns: 44px 94px 1fr;
        gap: 12px;
    }

    .ranking-card img {
        width: 94px;
        height: 70px;
    }

    .ranking-card p {
        display: none;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: auto;
        padding: 36px 0 94px;
    }

    .detail-cover {
        max-width: 260px;
    }

    .watch-section {
        margin-top: -48px;
    }

    .horizontal-card {
        grid-template-columns: 108px 1fr;
    }

    .horizontal-card img {
        width: 108px;
        height: 74px;
    }

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

@media (max-width: 460px) {
    .poster-grid,
    .small-grid,
    .library-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .btn {
        width: 100%;
    }
}
