* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #020617;
    color: #f8fafc;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff7ed;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    box-shadow: 0 0 24px rgba(249, 115, 22, 0.45);
}

.brand-text,
.footer-brand {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fb923c, #fcd34d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    position: relative;
    padding: 20px 0;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    height: 2px;
    border-radius: 999px;
    background: #fb923c;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fb923c;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.search-form {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.search-form input {
    width: 260px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.55);
    color: #fff;
    outline: none;
    padding: 9px 44px 9px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input:focus,
.filter-panel input:focus {
    border-color: rgba(251, 146, 60, 0.8);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
    background: rgba(15, 23, 42, 0.8);
}

.search-form button {
    position: absolute;
    right: 4px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: #f8fafc;
    background: transparent;
    cursor: pointer;
}

.search-form button:hover {
    color: #fb923c;
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-link {
    padding: 10px 0;
    color: #f8fafc;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.mobile-link.muted {
    color: #94a3b8;
}

.mobile-link.active {
    color: #fb923c;
}

.mobile-search {
    width: 100%;
    margin: 14px 0 4px;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(15, 23, 42, 0.7) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.38) 48%, rgba(2, 6, 23, 0.06) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 64px;
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: #fb923c;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1;
    font-weight: 900;
    text-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
}

.hero-summary {
    max-width: 660px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-tags,
.card-tags,
.side-genres,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.card-tags span,
.side-genres span,
.filter-chip,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.14);
    color: #fdba74;
    border: 1px solid rgba(249, 115, 22, 0.24);
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    padding: 12px 24px;
    color: #fff;
    background: linear-gradient(90deg, #f97316, #f59e0b);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.25);
}

.primary-button.small {
    padding: 9px 16px;
    font-size: 14px;
}

.ghost-button,
.section-link {
    padding: 11px 20px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(226, 232, 240, 0.16);
}

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

.primary-button:hover {
    box-shadow: 0 22px 46px rgba(249, 115, 22, 0.36);
}

.ghost-button:hover,
.section-link:hover {
    color: #fdba74;
    border-color: rgba(251, 146, 60, 0.55);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 38px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #fb923c;
}

.main-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0;
}

.main-shell.stacked {
    display: grid;
    gap: 28px;
}

.content-section {
    margin: 0 0 70px;
}

.content-section.no-gap {
    margin-bottom: 0;
}

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

.section-head h2,
.category-block-head h2,
.detail-card h2,
.side-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.category-block-head p {
    max-width: 760px;
    margin: 8px 0 0;
    color: #94a3b8;
}

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

.category-tile a {
    position: relative;
    display: block;
    height: 210px;
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.category-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.3));
}

.category-copy {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.category-copy strong {
    display: block;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.category-copy em {
    display: -webkit-box;
    margin-top: 6px;
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.movie-card {
    min-width: 0;
}

.poster-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.poster-link:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 146, 60, 0.65);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

.poster-link:hover img {
    transform: scale(1.08);
}

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.02));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-link:hover .poster-glow {
    opacity: 1;
}

.play-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-link:hover .play-badge {
    opacity: 1;
    transform: scale(1);
}

.card-body {
    display: grid;
    gap: 9px;
    padding: 14px;
}

.card-title {
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.poster-link:hover .card-title {
    color: #fb923c;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    color: #cbd5e1;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card.compact .card-desc {
    display: none;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 210px;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: none;
}

.scroll-row.tight {
    grid-auto-columns: 185px;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.small-card a {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.small-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 146, 60, 0.58);
}

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

.small-card span {
    display: grid;
    gap: 4px;
    padding: 12px;
}

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

.small-card em {
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

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

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

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

.rank-link {
    display: grid;
    grid-template-columns: 44px 72px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-link:hover {
    transform: translateX(4px);
    border-color: rgba(251, 146, 60, 0.56);
}

.rank-number {
    color: #fb923c;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-link img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-copy strong {
    color: #fff;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-copy em,
.rank-copy span {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

.rank-copy span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    min-height: 310px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.24), transparent 34%), linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.compact-hero > div {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.page-hero h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
}

.page-hero p:last-child {
    max-width: 780px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.category-block {
    padding: 28px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.filter-panel {
    position: sticky;
    top: 82px;
    z-index: 20;
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.13);
    backdrop-filter: blur(10px);
}

.filter-panel input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    color: #fff;
    background: rgba(30, 41, 59, 0.78);
    outline: none;
    padding: 13px 16px;
}

.filter-chip {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.18);
}

.filter-chip.active,
.filter-chip:hover {
    color: #fdba74;
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(249, 115, 22, 0.14);
}

.detail-shell {
    padding-top: 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 22px;
}

.breadcrumb a:hover {
    color: #fb923c;
}

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

.detail-main {
    display: grid;
    gap: 26px;
}

.player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
    aspect-ratio: 16 / 9;
}

.player video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    color: #fff;
    background: #000;
    cursor: pointer;
}

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

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

.player-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(15, 23, 42, 0.12));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #f59e0b);
    box-shadow: 0 22px 54px rgba(249, 115, 22, 0.35);
    transform: translate(-50%, -50%);
    font-size: 34px;
}

.player-cover strong {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 58px);
    font-size: 18px;
}

.player-state {
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    color: #fed7aa;
    font-size: 13px;
}

.detail-card,
.side-card {
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 24px;
}

.detail-card h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
}

.lead-text {
    margin: 0 0 20px;
    color: #e2e8f0;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
}

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

.detail-card h2 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 24px;
}

.detail-card p {
    color: #cbd5e1;
}

.detail-aside {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 18px;
}

.poster-side {
    padding: 0;
    overflow: hidden;
}

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

.side-card dl {
    display: grid;
    gap: 11px;
    margin: 0 0 18px;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
}

.side-card dt {
    color: #94a3b8;
}

.side-card dd {
    margin: 0;
    color: #fff;
}

.side-card a:hover {
    color: #fb923c;
}

.side-link {
    display: block;
    padding: 12px 0;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.site-footer {
    margin-top: 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: #020617;
}

.footer-inner {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 42px 0 28px;
}

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

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: #94a3b8;
    font-size: 14px;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: #fff;
}

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

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

.footer-bottom {
    margin-top: 30px;
    padding-top: 22px;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.is-filtered-out {
    display: none !important;
}

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

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

    .detail-aside {
        position: static;
        grid-template-columns: 240px 1fr 1fr;
    }

    .home-rank,
    .full-rank {
        grid-template-columns: 1fr;
    }
}

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

    .menu-button {
        display: inline-flex;
    }

    .nav-shell {
        padding: 0 18px;
    }

    .hero {
        min-height: 560px;
        height: 74vh;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 70px;
    }

    .hero-actions {
        gap: 10px;
    }

    .hero-actions a {
        width: 100%;
    }

    .hero-dots {
        left: 22px;
        right: auto;
    }

    .main-shell,
    .compact-hero > div,
    .footer-inner {
        width: min(100% - 32px, 1280px);
    }

    .section-head,
    .category-block-head {
        display: grid;
        align-items: start;
    }

    .category-grid,
    .movie-grid,
    .movie-grid.wide,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .poster-side img {
        max-height: 520px;
    }

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

@media (max-width: 520px) {
    .brand-text {
        font-size: 18px;
    }

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

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

    .category-grid,
    .movie-grid,
    .movie-grid.wide,
    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 11px;
    }

    .card-tags,
    .movie-card.compact .card-meta {
        display: none;
    }

    .rank-link {
        grid-template-columns: 36px 62px 1fr;
    }

    .rank-link img {
        width: 62px;
        height: 86px;
    }

    .player-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
