:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-300: #fcd34d;
    --orange-500: #f97316;
    --white: #ffffff;
    --shadow-soft: 0 16px 45px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
    color: var(--slate-800);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.28);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-2deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--amber-300), #fed7aa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 2px;
    color: var(--slate-300);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--slate-200);
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--white);
    background: rgba(245, 158, 11, 0.96);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.22);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    outline: none;
    color: var(--slate-900);
    background: var(--white);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
    width: 190px;
    padding: 10px 14px;
    color: var(--white);
    background: rgba(51, 65, 85, 0.9);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: var(--slate-300);
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.section-link,
.filter-reset {
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.24);
}

.header-search button {
    padding: 10px 15px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
    background: var(--amber-600);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

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

.mobile-panel.is-open {
    display: block;
}

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

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

.mobile-category-row a {
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--slate-200);
    background: rgba(255, 255, 255, 0.08);
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    flex: 1;
    padding: 11px 14px;
    color: var(--white);
    background: rgba(51, 65, 85, 0.9);
}

.mobile-search button {
    padding: 11px 16px;
}

main {
    overflow: hidden;
}

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

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--slate-900);
}

.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;
    filter: saturate(1.05) contrast(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.44) 46%, rgba(2, 6, 23, 0.16));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 64px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(252, 211, 77, 0.4);
    border-radius: 999px;
    color: var(--amber-300);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(14px);
}

.hero-content h1,
.hero-content h2 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--slate-200);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
    color: var(--slate-500);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    color: var(--slate-200);
}

.hero-meta span,
.tag-list span,
.detail-tags span,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}

.hero-meta span,
.detail-tags span {
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.primary-btn,
.secondary-btn,
.section-link,
.filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
}

.secondary-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.46);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

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

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

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

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-400);
}

.page-hero,
.section-block,
.detail-layout,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero {
    padding: 72px 0 38px;
}

.page-hero h1 {
    max-width: 860px;
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-600);
    font-size: 18px;
}

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

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

.section-heading span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--amber-600);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
}

.section-heading p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--slate-600);
}

.section-link {
    color: var(--white);
    background: var(--slate-800);
    white-space: nowrap;
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.category-chip {
    padding: 10px 14px;
    color: var(--slate-700);
    background: var(--white);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
    color: var(--amber-700);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: var(--shadow-strong);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--slate-800);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.movie-card:hover .card-poster img {
    transform: scale(1.08);
    opacity: 0.92;
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.95);
}

.card-body {
    padding: 16px;
}

.card-body h3,
.rank-info h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.25;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.text-link:hover {
    color: var(--amber-700);
}

.card-meta {
    margin: 0 0 8px;
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--slate-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span {
    padding: 6px 9px;
    color: var(--amber-700);
    background: #fffbeb;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 220px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
    scroll-snap-align: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 74px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
}

.rank-row:hover {
    transform: translateY(-4px);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.rank-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: var(--slate-800);
}

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

.rank-info p,
.rank-info span {
    display: block;
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
}

.rank-info span {
    margin-top: 4px;
    color: var(--slate-600);
}

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

.category-card {
    padding: 24px;
    border-radius: 26px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--slate-200);
}

.category-card .category-preview {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.category-card .category-preview a {
    display: block;
    overflow: hidden;
    color: var(--amber-300);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px auto;
    gap: 12px;
    align-items: center;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
}

.filter-reset {
    min-height: 46px;
    color: var(--slate-700);
    background: var(--slate-200);
}

.filter-reset:hover {
    transform: translateY(-2px);
    color: var(--white);
    background: var(--slate-700);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 28px;
    padding: 42px 0 60px;
}

.player-section {
    padding: 36px 0 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-950);
    box-shadow: var(--shadow-strong);
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.34));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: var(--white);
    font-size: 34px;
    background: var(--amber-500);
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.35);
}

.player-cover strong {
    max-width: min(640px, calc(100% - 48px));
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.16;
    text-align: center;
}

.detail-main,
.detail-aside-card {
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-main {
    padding: 30px;
}

.detail-main h1 {
    margin: 0 0 12px;
    color: var(--slate-900);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-meta {
    margin: 0 0 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.detail-tags span {
    color: var(--amber-700);
    background: #fffbeb;
    border-color: #fde68a;
}

.content-section {
    margin-top: 28px;
}

.content-section h2 {
    margin: 0 0 10px;
    color: var(--slate-900);
    font-size: 24px;
}

.content-section p {
    margin: 0;
    color: var(--slate-700);
    font-size: 16px;
}

.detail-aside {
    display: grid;
    gap: 18px;
    align-content: start;
}

.detail-aside-card {
    padding: 18px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    background: var(--slate-800);
}

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

.aside-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.aside-list a,
.next-prev a {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--slate-700);
    background: var(--slate-100);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.aside-list a:hover,
.next-prev a:hover {
    color: var(--white);
    background: var(--amber-500);
    transform: translateX(4px);
}

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

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

.text-link {
    color: var(--amber-700);
    font-weight: 800;
}

[hidden] {
    display: none !important;
}

.site-footer {
    color: var(--slate-300);
    background: var(--slate-900);
}

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

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer h2 {
    color: var(--amber-400);
}

.site-footer p {
    margin: 0;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    text-align: center;
}

@media (min-width: 900px) {
    .hero-slider {
        height: 80vh;
    }
}

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

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

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

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

    .header-inner {
        min-height: 70px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-content {
        bottom: 82px;
    }

    .hero-control {
        top: auto;
        bottom: 24px;
        transform: none;
    }

    .hero-control:hover {
        transform: scale(1.06);
    }

    .hero-control.prev {
        left: 18px;
    }

    .hero-control.next {
        right: 18px;
    }

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

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

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

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

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

    .brand-text em {
        display: none;
    }

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

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-btn,
    .secondary-btn,
    .section-link {
        width: 100%;
    }

    .movie-grid.large,
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .detail-main {
        padding: 22px;
    }

    .next-prev {
        grid-template-columns: 1fr;
    }
}
