:root {
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    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: var(--text);
    background: #f3f4f6;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.brand-text {
    font-size: 1.18rem;
    color: transparent;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #374151;
    font-weight: 650;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: #eff6ff;
}

.nav-menu {
    position: relative;
}

.nav-menu-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    min-width: 180px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.24s ease;
}

.nav-menu:hover .nav-menu-panel,
.nav-menu:focus-within .nav-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-panel a {
    padding: 9px 10px;
    color: #475569;
    border-radius: 9px;
}

.nav-menu-panel a:hover {
    color: var(--blue);
    background: #eff6ff;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #111827;
    background: #f3f4f6;
}

.mobile-nav {
    display: none;
    padding: 8px 16px 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.hero {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.92), rgba(37, 99, 235, 0.66), rgba(6, 182, 212, 0.14));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 14px;
    color: #67e8f9;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    margin-bottom: 8px;
    font-size: clamp(3rem, 7vw, 5.7rem);
}

.hero h2 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.12rem;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.26);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

.hero-tags span,
.chip-row span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span {
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.chip-row span {
    color: #2563eb;
    background: #eff6ff;
}

.hero-controls {
    position: absolute;
    right: max(18px, calc((100vw - 1180px) / 2));
    bottom: 98px;
    z-index: 4;
    display: flex;
    gap: 9px;
}

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

.hero-dot.active {
    width: 34px;
    background: #67e8f9;
}

.hero-category-strip {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-category-strip a {
    padding: 10px 14px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(14px);
}

.info-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

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

.info-grid a {
    display: grid;
    gap: 4px;
    padding: 20px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.info-grid strong {
    font-size: 1.12rem;
}

.info-grid span {
    color: var(--muted);
    font-size: 0.92rem;
}

.section {
    padding: 72px 0;
}

.white-section {
    background: #ffffff;
}

.gradient-section {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.split-section {
    background: #f8fafc;
}

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

.section-head h2 {
    margin: 0 0 6px;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 800;
}

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

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

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

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

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.05);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 9px;
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.year-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-body {
    padding: 16px;
}

.movie-meta {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #cbd5e1;
}

.movie-body h3 {
    margin: 7px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-body h3 a:hover {
    color: var(--blue);
}

.movie-body p {
    min-height: 48px;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.78));
}

.category-tile span,
.category-tile small {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
    color: #ffffff;
}

.category-tile span {
    bottom: 48px;
    font-size: 1.18rem;
    font-weight: 850;
}

.category-tile small {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.split-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 34px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-score {
    color: #f97316;
    font-weight: 850;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.72), transparent 34%), linear-gradient(135deg, #1e3a8a, #0f172a);
}

.page-hero p {
    max-width: 760px;
}

.page-hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.small-hero {
    padding: 80px 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
    gap: 14px;
    margin-bottom: 28px;
}

.wide-filter {
    grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(150px, 220px);
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.category-large {
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.category-large img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
}

.category-large div {
    padding: 24px;
}

.category-large h2 {
    margin: 0 0 8px;
}

.category-large p {
    margin: 0 0 18px;
    color: var(--muted);
}

.category-large span {
    color: var(--blue);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 590px;
    color: #ffffff;
    background: #0f172a;
}

.detail-bg,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.05);
    transform: scale(1.06);
    opacity: 0.48;
}

.detail-mask {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.72), rgba(6, 182, 212, 0.22));
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: center;
    min-height: 590px;
    padding: 54px 0;
}

.detail-poster {
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-info h1 {
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.player-section {
    padding-top: 48px;
    background: #0f172a;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.36);
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.center-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-size: 2rem;
}

.player-frame.is-ready .center-play {
    opacity: 0;
    pointer-events: none;
}

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

.detail-main,
.detail-side {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 1.5rem;
}

.detail-main p {
    margin: 0 0 18px;
    color: #374151;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    font-weight: 700;
}

.detail-side a {
    color: var(--blue);
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 54px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 1.18rem;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

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

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    padding: 18px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.hidden-by-filter {
    display: none !important;
}

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

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

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

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        height: 600px;
    }

    .info-grid,
    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .related-grid,
    .compact-grid,
    .category-grid,
    .category-large-grid,
    .split-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .wide-filter,
    .filter-panel {
        grid-template-columns: 1fr;
    }
}

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

    .hero {
        height: 660px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 128px;
    }

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 1rem;
    }

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 92px;
    }

    .info-grid,
    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .related-grid,
    .compact-grid,
    .category-grid,
    .category-large-grid,
    .split-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-score {
        grid-column: 2;
    }

    .detail-hero-grid {
        grid-template-columns: 1fr;
        padding-top: 34px;
    }

    .detail-poster {
        width: min(210px, 70vw);
    }

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