:root {
    --bg: #060708;
    --panel: #0b0d10;
    --panel-soft: #101419;
    --panel-light: #151a21;
    --line: #1a2129;
    --text: #ffffff;
    --muted: #9ca3af;
    --muted-soft: #d1d5db;
    --primary: #f5871f;
    --primary-light: #f79f3f;
    --primary-deep: #d96908;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 135, 31, 0.16), transparent 35rem),
        linear-gradient(180deg, #060708 0%, #0b0d10 45%, #060708 100%);
}

body.no-scroll {
    overflow: hidden;
}

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

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

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 12px 35px rgba(245, 135, 31, 0.28);
}

.brand-text {
    font-size: 1.22rem;
}

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

.nav-link {
    color: var(--muted-soft);
    font-size: 0.94rem;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 42px;
    height: 42px;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #ffffff;
    background: var(--panel-light);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--line);
    background: rgba(11, 13, 16, 0.98);
}

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

.hero {
    position: relative;
    min-height: 560px;
    height: 70vh;
    max-height: 820px;
    overflow: hidden;
    background: #050607;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(6, 7, 8, 0.98) 0%, rgba(11, 13, 16, 0.92) 38%, rgba(6, 7, 8, 0.38) 100%),
        var(--cover);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, var(--panel));
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: inherit;
    height: 100%;
}

.hero-copy {
    width: min(650px, 100%);
    padding: 80px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--primary-light);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 22px var(--primary);
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.5rem, 6vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 26px;
    color: var(--muted-soft);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 135, 31, 0.25);
    border-radius: 999px;
    color: var(--primary-light);
    background: rgba(245, 135, 31, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span,
.meta-pill {
    padding: 8px 14px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
}

.button-primary,
.button-ghost,
.section-link,
.page-link,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button-primary,
.filter-button {
    border: 1px solid rgba(245, 135, 31, 0.55);
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 16px 45px rgba(245, 135, 31, 0.28);
}

.button-ghost,
.section-link,
.page-link {
    border: 1px solid var(--line);
    color: var(--muted-soft);
    background: rgba(21, 26, 33, 0.72);
}

.button-primary:hover,
.button-ghost:hover,
.section-link:hover,
.page-link:hover,
.filter-button:hover {
    transform: translateY(-2px);
}

.button-ghost:hover,
.section-link:hover,
.page-link:hover {
    border-color: rgba(245, 135, 31, 0.42);
    color: var(--primary-light);
}

.main-content {
    padding: 72px 0;
}

.content-section {
    margin-bottom: 82px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.15;
}

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

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(21, 26, 33, 0.96), rgba(11, 13, 16, 0.96));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 135, 31, 0.42);
    background: linear-gradient(180deg, rgba(26, 33, 41, 0.98), rgba(11, 13, 16, 0.98));
}

.poster,
.row-poster,
.category-cover,
.detail-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72)),
        radial-gradient(circle at 30% 10%, rgba(245, 135, 31, 0.28), transparent 45%),
        var(--cover),
        #111820;
    background-size: cover;
    background-position: center;
}

.poster {
    aspect-ratio: 3 / 4.1;
}

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

.poster-badge,
.poster-type {
    position: absolute;
    top: 12px;
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.poster-badge {
    left: 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.54);
}

.poster-type {
    right: 12px;
    color: var(--primary-light);
    background: rgba(245, 135, 31, 0.18);
}

.card-content {
    display: grid;
    gap: 9px;
    padding: 15px;
}

.card-content strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-content em,
.row-info em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    font-style: normal;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.row-info span {
    overflow: hidden;
    color: #737b86;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-row span {
    padding: 5px 9px;
}

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

.movie-row-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 112px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background: rgba(21, 26, 33, 0.84);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-row-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 135, 31, 0.38);
}

.row-info {
    display: grid;
    align-content: center;
    gap: 8px;
    min-width: 0;
    padding: 16px;
}

.row-info strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 1.02rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(21, 26, 33, 0.9);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 135, 31, 0.42);
}

.category-cover {
    height: 170px;
}

.category-body {
    padding: 20px;
}

.category-body h2,
.category-body h3 {
    margin: 0 0 10px;
    font-size: 1.24rem;
}

.category-body p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.search-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(21, 26, 33, 0.94), rgba(11, 13, 16, 0.94));
    box-shadow: var(--shadow);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: #ffffff;
    background: #0b0d10;
    padding: 0 14px;
}

.search-form input:focus,
.search-form select:focus {
    border-color: rgba(245, 135, 31, 0.55);
}

.search-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.search-empty {
    margin: 18px 0 0;
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 42px;
}

.page-link.current {
    border-color: rgba(245, 135, 31, 0.65);
    color: #ffffff;
    background: var(--primary-deep);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 66px 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    background: rgba(21, 26, 33, 0.82);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 135, 31, 0.38);
}

.rank-number {
    color: var(--primary-light);
    font-size: 1.4rem;
    font-weight: 900;
    text-align: center;
}

.rank-poster {
    display: block;
    height: 72px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58)),
        var(--cover),
        #111820;
    background-size: cover;
    background-position: center;
}

.rank-text {
    min-width: 0;
}

.rank-text strong {
    display: block;
    overflow: hidden;
    margin-bottom: 6px;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-meta {
    color: #737b86;
    font-size: 0.86rem;
    white-space: nowrap;
}

.detail-hero {
    padding: 42px 0 28px;
    background:
        linear-gradient(180deg, rgba(11, 13, 16, 0.35), var(--panel)),
        radial-gradient(circle at 20% 0%, rgba(245, 135, 31, 0.16), transparent 34rem);
}

.back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 700;
}

.back-link:hover {
    color: var(--primary-light);
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-cover {
    aspect-ratio: 3 / 4.2;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-copy p {
    max-width: 850px;
    color: var(--muted-soft);
    font-size: 1.05rem;
    line-height: 1.85;
}

.player-section {
    padding: 44px 0 84px;
}

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

.player-box,
.detail-panel,
.sidebar-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(16, 20, 25, 0.92);
    box-shadow: var(--shadow);
}

.player-box {
    overflow: hidden;
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-stage video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-cover-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(245, 135, 31, 0.16), transparent 35%),
        rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 20px 55px rgba(245, 135, 31, 0.36);
    font-size: 2rem;
    transform: translateZ(0);
}

.player-title {
    padding: 18px 22px 22px;
}

.player-title h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

.player-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.detail-panel,
.sidebar-panel {
    padding: 24px;
}

.detail-panel h2,
.sidebar-panel h2 {
    margin: 0 0 18px;
    font-size: 1.35rem;
}

.detail-panel p {
    color: var(--muted-soft);
    line-height: 1.9;
}

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

.sidebar-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.sidebar-card:hover {
    background: rgba(245, 135, 31, 0.1);
}

.sidebar-poster {
    display: block;
    height: 60px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5)),
        var(--cover),
        #111820;
    background-size: cover;
    background-position: center;
}

.sidebar-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-size: 0.92rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-card span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: #070809;
    padding: 48px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.site-footer p {
    max-width: 560px;
    color: var(--muted);
    line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

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

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

    .menu-button {
        display: flex;
    }

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

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

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

@media (max-width: 820px) {
    .hero {
        min-height: 520px;
        height: auto;
    }

    .hero-copy {
        padding: 70px 0 92px;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        margin-top: 18px;
    }

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

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

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

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

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

    .ranking-item {
        grid-template-columns: 48px 80px 1fr;
    }

    .rank-meta {
        display: none;
    }
}

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

    .hero h1 {
        font-size: 2.75rem;
    }

    .movie-grid,
    .movie-grid.compact-grid,
    .search-results,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-content {
        padding: 12px;
    }

    .card-content em,
    .tag-row {
        display: none;
    }

    .movie-row-card {
        grid-template-columns: 112px 1fr;
    }

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

    .rank-poster {
        display: none;
    }

    .play-circle {
        width: 70px;
        height: 70px;
    }
}
