:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #172033;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-100: #fef3c7;
    --rose-500: #f43f5e;
    --orange-500: #f97316;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 8px 22px rgba(15, 23, 42, 0.11);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.25);
    backdrop-filter: blur(12px);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    border-radius: 10px;
    color: var(--slate-200);
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.22);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.mobile-menu {
    display: none;
    padding: 8px 16px 16px;
    background: var(--slate-950);
}

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.52) 52%, rgba(15, 23, 42, 0.16));
}

.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: flex-end;
    align-items: flex-start;
    padding: 0 0 132px;
    color: var(--white);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    max-width: 760px;
    margin: 10px 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

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

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

.hero-meta {
    margin-bottom: 24px;
}

.hero-meta span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span,
.detail-tags a {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.primary-btn,
.ghost-btn,
.site-search-form button,
.search-page-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.site-search-form button,
.search-page-form button {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
}

.primary-btn:hover,
.site-search-form button:hover,
.search-page-form button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-500));
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 42px;
    z-index: 5;
    width: min(720px, calc(100% - 32px));
    transform: translateX(-50%);
}

.site-search-form,
.search-page-form {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.site-search-form input,
.search-page-form input,
.filter-panel input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 14px;
    color: #111827;
    outline: none;
    background: var(--white);
}

.site-search-form input:focus,
.search-page-form input:focus,
.filter-panel input:focus {
    border-color: var(--amber-500);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 54px;
    z-index: 6;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.section {
    padding: 64px 0;
}

.section-dark {
    background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
}

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

.section-heading h2,
.section-heading h1 {
    margin: 6px 0 0;
    color: #1f2937;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.15;
}

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

.section-heading a {
    color: var(--amber-600);
    font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a,
.section-heading.light p {
    color: var(--white);
}

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

.category-tile {
    position: relative;
    min-height: 138px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--slate-800);
    box-shadow: var(--shadow-card);
}

.category-tile img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.12));
}

.category-tile span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 2;
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
}

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

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

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

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

.movie-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.movie-card a {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-800);
}

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

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

.duration,
.rank-badge {
    position: absolute;
    z-index: 3;
    border-radius: 8px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.duration {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    padding: 5px 9px;
    text-align: center;
    background: var(--amber-500);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.25);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    min-height: 48px;
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 17px;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-meta {
    justify-content: space-between;
    color: var(--slate-500);
    font-size: 13px;
}

.card-meta span:first-child,
.tag-row span {
    color: var(--amber-600);
    background: var(--amber-100);
}

.tag-row {
    margin-top: 12px;
}

.movie-card-large {
    grid-column: span 2;
    grid-row: span 2;
}

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 11;
}

.movie-card-large .card-body h2 {
    font-size: 24px;
}

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

.movie-card-horizontal a {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-height: 142px;
}

.movie-card-horizontal .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-horizontal .card-body h2 {
    min-height: auto;
}

.movie-card-horizontal .tag-row {
    display: none;
}

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 36%), linear-gradient(90deg, var(--slate-950), var(--slate-800));
}

.compact-hero {
    padding: 72px 0;
}

.ranking-hero {
    padding: 92px 0;
}

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

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

.page-stack {
    padding: 50px 0 70px;
}

.category-overview-block {
    padding: 34px;
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chips button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--slate-700);
    background: var(--slate-100);
    cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
    color: var(--white);
    background: var(--amber-500);
}

.detail-top {
    padding: 52px 0;
    color: var(--white);
    background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(90deg, var(--slate-950), var(--slate-800));
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 780px;
    color: var(--slate-200);
    font-size: 18px;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 680px;
    margin: 24px 0;
}

.meta-list div {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.meta-list dt {
    color: var(--slate-300);
    font-size: 13px;
}

.meta-list dd {
    margin: 3px 0 0;
    font-weight: 800;
}

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

.player-section {
    padding: 42px 0 0;
    background: var(--slate-50);
}

.player-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.player-frame.is-playing .play-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 5px;
    color: var(--slate-950);
    background: var(--amber-400);
    box-shadow: 0 16px 35px rgba(245, 158, 11, 0.34);
    font-size: 30px;
}

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

.content-card {
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.content-card h2 {
    margin: 0 0 14px;
    color: #1f2937;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: var(--slate-700);
    white-space: pre-line;
}

.search-page-form {
    max-width: 760px;
    margin-top: 26px;
}

.site-footer {
    color: var(--slate-300);
    background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
}

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

.footer-brand p {
    max-width: 470px;
    margin: 14px 0 0;
    color: var(--slate-400);
}

.footer-column h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
    color: var(--slate-500);
    text-align: center;
}

.hidden-card {
    display: none !important;
}

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

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

    .movie-card-large {
        grid-column: span 2;
        grid-row: auto;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .hero {
        min-height: 680px;
    }

    .hero-content {
        padding-bottom: 160px;
    }

    .hero-search {
        bottom: 72px;
    }

    .hero-dots {
        left: 50%;
        right: auto;
        bottom: 28px;
        transform: translateX(-50%);
    }

    .site-search-form,
    .search-page-form,
    .filter-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .filter-panel {
        display: grid;
    }

    .category-grid,
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .rank-list,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .meta-list {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero {
        min-height: 650px;
    }

    .hero-content {
        padding-bottom: 172px;
    }

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

    .hero-actions,
    .site-search-form,
    .search-page-form {
        width: 100%;
    }

    .site-search-form,
    .search-page-form {
        display: grid;
    }

    .primary-btn,
    .ghost-btn,
    .site-search-form button,
    .search-page-form button {
        width: 100%;
    }

    .section {
        padding: 42px 0;
    }

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

    .category-grid,
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .rank-list,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .movie-card-large {
        grid-column: auto;
    }

    .movie-card-horizontal a {
        grid-template-columns: 124px minmax(0, 1fr);
        min-height: 126px;
    }

    .movie-card-horizontal .card-body {
        padding: 12px;
    }

    .movie-card-horizontal .card-body p,
    .movie-card-horizontal .card-meta {
        display: none;
    }

    .detail-top {
        padding: 38px 0;
    }

    .category-overview-block,
    .content-card {
        padding: 22px;
    }
}
