*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --bg-card-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(248, 113, 113, 0.24);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-soft: #fde68a;
    --red: #dc2626;
    --red-dark: #7f1d1d;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
}

.brand-text {
    font-size: clamp(20px, 2vw, 28px);
    background: linear-gradient(90deg, var(--amber-soft), #fecaca, var(--amber-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #e5e7eb;
}

.nav-link {
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-soft);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.65);
    color: white;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 12px;
    color: #e5e7eb;
}

.mobile-nav a:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber-soft);
}

.hero {
    position: relative;
    height: min(720px, 74vh);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    filter: saturate(1.1) contrast(1.05);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 43%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.04) 44%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 120px;
    width: min(720px, calc(100% - 64px));
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber-soft);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.hero-summary {
    max-width: 680px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 11px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    font-size: 12px;
}

.tag-row.large span {
    min-height: 34px;
    padding: 6px 13px;
    font-size: 14px;
}

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

.primary-button,
.ghost-button,
.section-more,
.inline-filter button,
.search-box-large button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: white;
    font-weight: 800;
    background: linear-gradient(90deg, var(--amber), var(--red));
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-button:hover,
.section-more:hover,
.inline-filter button:hover,
.search-box-large button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 42px rgba(245, 158, 11, 0.32);
}

.primary-button.small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.ghost-button {
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.38);
    background: rgba(15, 23, 42, 0.5);
    box-shadow: none;
}

.ghost-button:hover {
    background: rgba(245, 158, 11, 0.12);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    transform: translateY(-50%);
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(127, 29, 29, 0.8);
    transform: translateY(-50%) scale(1.06);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 54px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    width: 58px;
    background: linear-gradient(90deg, var(--amber), var(--red));
}

.hero-search {
    position: absolute;
    right: max(32px, calc((100vw - 1180px) / 2));
    bottom: 44px;
    width: min(440px, calc(100% - 64px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(18px);
}

.hero-search input,
.inline-filter input,
.search-box-large input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.hero-search input::placeholder,
.inline-filter input::placeholder,
.search-box-large input::placeholder {
    color: #94a3b8;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    color: #111827;
    background: #fde68a;
    font-weight: 800;
    padding: 0 20px;
}

.category-entrance {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

.category-tile,
.category-overview-card,
.movie-card,
.rank-panel,
.detail-content,
.side-recommend,
.player-card,
.detail-info,
.page-hero,
.category-strip {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.category-tile {
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(30, 41, 59, 0.86);
}

.category-tile span {
    display: block;
    color: #fde68a;
    font-size: 20px;
    font-weight: 800;
}

.category-tile p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

section.container {
    margin-top: 72px;
}

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

.section-head h2,
.panel-head h2,
.category-overview-head h2,
.strip-title h3,
.detail-content h2,
.side-recommend h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
}

.section-head span,
.category-overview-head span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.section-more,
.strip-title a,
.panel-head a {
    white-space: nowrap;
}

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

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

.catalog-grid,
.related-grid {
    grid-template-columns: repeat(5, 1fr);
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    color: inherit;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(30, 41, 59, 0.9);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.88);
}

.movie-poster.wide {
    width: 150px;
    height: 92px;
    aspect-ratio: auto;
    flex: none;
}

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

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

.play-dot,
.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
}

.play-dot {
    left: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-badge {
    right: 10px;
    top: 10px;
    min-width: 42px;
    height: 26px;
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 36px;
    height: 28px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    font-size: 13px;
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.movie-info.compact {
    min-width: 0;
    padding: 10px 12px 10px 0;
}

.movie-info h3,
.ranking-row h2 {
    margin: 8px 0 8px;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.32;
}

.movie-info p,
.ranking-row p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.movie-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.horizontal {
    display: flex;
    gap: 14px;
}

.horizontal:hover {
    transform: translateX(4px);
}

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

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border-radius: var(--radius-xl);
}

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

.strip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.category-strip {
    padding: 22px;
    border-radius: var(--radius-xl);
}

.page-main {
    padding: 46px 0 88px;
}

.page-hero {
    padding: clamp(30px, 5vw, 58px);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.55), rgba(15, 23, 42, 0.84)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 36rem);
}

.page-hero.simple-hero h1,
.category-hero h1 {
    font-size: clamp(38px, 6vw, 68px);
}

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

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    align-items: end;
    gap: 28px;
}

.inline-filter,
.search-box-large {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
}

.inline-filter button,
.search-box-large button {
    min-height: 42px;
    padding: 0 20px;
}

.ranking-filter {
    max-width: 680px;
    margin-bottom: 24px;
}

.category-overview-grid {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 26px;
    border-radius: var(--radius-xl);
}

.overview-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.overview-preview .horizontal {
    display: block;
}

.overview-preview .movie-poster.wide {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.overview-preview .movie-info.compact {
    padding: 12px 0 0;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 104px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
}

.ranking-row img {
    width: 104px;
    height: 68px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-number {
    color: #fde68a;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.ranking-row strong {
    color: #fde68a;
    font-size: 24px;
    text-align: right;
}

.search-box-large {
    width: min(760px, 100%);
    margin-top: 28px;
}

.search-box-large input {
    min-height: 48px;
    padding-left: 10px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--amber-soft);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    align-items: stretch;
    gap: 28px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: black;
    aspect-ratio: 16 / 9;
}

.movie-player,
.player-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    z-index: 1;
    background: black;
}

.player-poster {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: black;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

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

.player-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 18rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.32));
}

.big-play {
    position: absolute;
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 22px 42px rgba(220, 38, 38, 0.32);
    font-size: 34px;
    transform: translateZ(0);
}

.detail-info {
    padding: clamp(24px, 4vw, 38px);
    border-radius: var(--radius-xl);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.detail-one-line {
    margin: 20px 0;
    color: #e2e8f0;
    font-size: 18px;
}

.detail-info .primary-button {
    margin-top: 28px;
}

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

.detail-content,
.side-recommend {
    padding: clamp(22px, 4vw, 34px);
    border-radius: var(--radius-xl);
}

.detail-content h2,
.side-recommend h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 26px;
}

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

.detail-content p {
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fde68a;
    font-size: 18px;
}

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

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

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

.footer-grid li + li {
    margin-top: 8px;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

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

@media (max-width: 1080px) {
    .movie-grid,
    .catalog-grid,
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .rank-layout,
    .detail-content-grid,
    .detail-hero,
    .category-hero {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

    .overview-preview,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .menu-toggle {
        display: inline-block;
    }

    body.menu-open .mobile-nav {
        display: block;
    }

    .hero {
        min-height: 680px;
        height: auto;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 168px;
        width: auto;
    }

    .hero-search {
        left: 20px;
        right: 20px;
        bottom: 86px;
        width: auto;
    }

    .hero-dots {
        left: 20px;
        bottom: 38px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .compact-grid,
    .catalog-grid,
    .related-grid,
    .strip-grid,
    .overview-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .ranking-row {
        grid-template-columns: 48px 82px minmax(0, 1fr);
    }

    .ranking-row strong {
        display: none;
    }

    .ranking-row img {
        width: 82px;
        height: 58px;
    }

    .category-overview-head,
    .section-head,
    .strip-title {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero-summary,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .hero-search,
    .inline-filter,
    .search-box-large {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .hero-search input,
    .inline-filter input,
    .search-box-large input {
        min-height: 42px;
        padding: 0 12px;
    }

    .category-entrance,
    .movie-grid,
    .compact-grid,
    .catalog-grid,
    .related-grid,
    .strip-grid,
    .overview-preview,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .horizontal {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .movie-poster.wide {
        width: 118px;
        height: 86px;
    }

    .ranking-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .ranking-row img {
        display: none;
    }

    .big-play {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}
