:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

* {
    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;
    background: var(--soft);
    color: var(--ink);
    line-height: 1.6;
}

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

img,
video {
    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: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    font-size: 15px;
}

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

.nav-link {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #374151;
    border-radius: 999px;
}

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

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

.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.08));
}

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta {
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--blue);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.active {
    width: 36px;
    background: #ffffff;
}

.quick-search {
    background: #ffffff;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.quick-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 24px;
    align-items: center;
}

.quick-search h2 {
    margin: 0 0 4px;
    font-size: 25px;
    font-weight: 900;
}

.quick-search p {
    margin: 0;
    color: var(--muted);
}

.search-inline,
.filter-bar {
    display: flex;
    gap: 10px;
}

.search-inline input,
.filter-bar input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-inline button {
    min-width: 90px;
    border: 0;
    border-radius: 14px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 800;
}

.category-strip {
    padding: 34px 0;
    background: #f3f4f6;
}

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

.category-tile {
    min-height: 118px;
    padding: 20px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
}

.category-tile small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.content-section {
    padding: 54px 0;
    background: #ffffff;
}

.content-section.alt-bg {
    background: #f9fafb;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 900;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.scroll-controls {
    display: flex;
    gap: 8px;
}

.scroll-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 28px;
    line-height: 1;
}

.scroll-controls button:hover {
    background: #e5e7eb;
}

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

.scroll-strip {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

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

.scroll-item {
    width: 288px;
    flex: 0 0 288px;
}

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    height: 218px;
    overflow: hidden;
    background: #e5e7eb;
}

.movie-card-large .poster-wrap {
    height: 302px;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 58%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.type-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue);
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-play {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-card p {
    display: -webkit-box;
    height: 44px;
    margin: 9px 0 14px;
    overflow: hidden;
    color: #5b6472;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
    font-size: 12px;
}

.card-meta span:first-child {
    color: #374151;
    font-weight: 700;
}

.page-hero,
.detail-head {
    position: relative;
    overflow: hidden;
    padding: 72px 0;
    background: linear-gradient(135deg, #111827, #1e3a8a 52%, #0891b2);
    color: #ffffff;
}

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

.ranking-hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.52), transparent 35%), linear-gradient(135deg, #020617, #172554 54%, #083344);
}

.breadcrumb-wrap {
    display: grid;
    gap: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.filter-bar {
    margin-bottom: 24px;
}

.large-filter input {
    height: 56px;
    font-size: 16px;
}

.no-result {
    display: none;
    margin: 26px 0 0;
    padding: 22px;
    border-radius: 16px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
}

.no-result.show {
    display: block;
}

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

.category-overview-card {
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 0 0 6px;
    font-size: 25px;
    font-weight: 900;
}

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

.text-link {
    flex: 0 0 auto;
    color: var(--blue);
    font-weight: 900;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.compact-list .rank-row {
    grid-template-columns: 86px minmax(0, 1fr) auto;
}

.compact-list .rank-num {
    display: none;
}

.rank-num {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--blue);
    font-weight: 900;
}

.rank-poster {
    display: block;
    width: 92px;
    height: 122px;
    overflow: hidden;
    border-radius: 12px;
    background: #e5e7eb;
}

.compact-list .rank-poster {
    width: 86px;
    height: 110px;
}

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

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 900;
}

.rank-info h3 a:hover {
    color: var(--blue);
}

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

.rank-action {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

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

.side-panel,
.detail-side {
    position: sticky;
    top: 88px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.side-panel h2,
.detail-side h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.side-panel p {
    color: var(--muted);
}

.side-link {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    font-weight: 800;
}

.side-link:hover {
    background: #e5e7eb;
}

.detail-head {
    padding: 46px 0 58px;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

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

.detail-info h1 {
    max-width: 820px;
}

.lead-text {
    max-width: 820px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.detail-meta span,
.detail-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 800;
}

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

.rank-info .detail-tags {
    margin-bottom: 0;
}

.rank-info .detail-tags span {
    background: #eef2ff;
    color: #3730a3;
}

.player-section {
    padding: 46px 0;
    background: #020617;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
    color: #ffffff;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.4);
    font-size: 32px;
    text-indent: 5px;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-article {
    padding: 30px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.detail-article h2 {
    margin: 0 0 14px;
    font-size: 25px;
    font-weight: 900;
}

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

.detail-article p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 18px 0 0;
}

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

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

.site-footer {
    padding: 44px 0 22px;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    max-width: 560px;
    margin: 12px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 20px;
    font-weight: 800;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 14px;
}

@media (min-width: 768px) {
    .hero {
        height: 600px;
    }
}

@media (max-width: 980px) {
    .movie-grid,
    .mini-grid,
    .category-strip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-search-box,
    .two-column,
    .detail-layout,
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

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

    .side-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 560px;
    }

    .hero-inner {
        align-items: flex-end;
        padding-bottom: 74px;
    }

    .hero-arrow {
        display: none;
    }

    .hero p,
    .page-hero p,
    .lead-text {
        font-size: 16px;
    }

    .quick-search-box,
    .search-inline {
        display: grid;
        grid-template-columns: 1fr;
    }

    .category-strip-grid,
    .movie-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

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

    .scroll-controls {
        display: none;
    }

    .rank-row,
    .compact-list .rank-row {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .rank-num,
    .rank-action {
        display: none;
    }

    .rank-poster,
    .compact-list .rank-poster {
        width: 74px;
        height: 100px;
    }

    .footer-grid,
    .footer-links,
    .category-overview-head {
        display: grid;
    }

    .detail-head,
    .page-hero {
        padding: 42px 0;
    }

    .detail-article,
    .detail-side,
    .side-panel {
        padding: 20px;
    }
}
