:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-100: #fef3c7;
    --rose-500: #f43f5e;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.10);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #111827, #334155);
}

button,
input,
select {
    font: inherit;
}

.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 12px 35px rgba(2, 6, 23, 0.25);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    height: 66px;
    margin: 0 auto;
    padding: 0 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--amber-400);
}

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

.desktop-nav {
    display: flex;
    gap: 6px;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.28);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

.mobile-nav {
    display: none;
    padding: 8px 18px 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
    background: var(--slate-950);
}

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

.mobile-nav .nav-link {
    display: block;
}

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

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

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

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

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

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

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

.hero-content p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #dbe5f5;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span:first-child {
    color: var(--white);
    background: var(--amber-500);
}

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

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

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

.btn-primary {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
    background: var(--amber-600);
}

.btn-soft {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.88);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--amber-400);
}

.quick-search {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: -38px auto 0;
    padding: 0 22px;
}

.search-panel,
.search-large {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-large input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d8e0eb;
    border-radius: 12px;
    padding: 0 16px;
    outline: none;
    background: var(--white);
}

.search-panel input:focus,
.search-large input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.search-panel button,
.search-large button {
    min-width: 118px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: var(--amber-500);
    font-weight: 800;
    cursor: pointer;
}

.quick-cats,
.hot-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quick-cats a,
.hot-searches button,
.pill-cloud a,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 13px;
    border: 1px solid #d8e0eb;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--white);
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.quick-cats a:hover,
.hot-searches button:hover,
.pill-cloud a:hover,
.detail-tags a:hover {
    color: var(--amber-600);
    border-color: var(--amber-500);
    transform: translateY(-1px);
}

.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 22px;
}

.page-shell {
    min-height: 70vh;
}

.page-title-block {
    margin-bottom: 30px;
    padding: 34px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.page-title-block h1 {
    margin: 0 0 12px;
    color: var(--slate-900);
    font-size: clamp(30px, 4vw, 46px);
}

.page-title-block p {
    max-width: 820px;
    margin: 0;
    color: var(--slate-600);
    line-height: 1.8;
}

.section-block {
    margin-bottom: 58px;
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2,
.category-panel h2,
.detail-content h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: 28px;
}

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

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.card-poster,
.large-media,
.horizontal-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #334155);
}

.card-poster {
    aspect-ratio: 16 / 10;
}

.card-poster img,
.large-media img,
.horizontal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient,
.media-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.58));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-gradient,
.movie-card:hover .media-shade {
    opacity: 1;
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 46px;
    overflow: hidden;
    color: var(--slate-900);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--amber-600);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--amber-600);
    background: var(--amber-100);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-400), var(--rose-500));
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.3);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.horizontal-media {
    min-height: 134px;
}

.horizontal-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}

.list-stack,
.rank-list {
    display: grid;
    gap: 16px;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.movie-card-large .large-media {
    min-height: 340px;
    border-radius: var(--radius-lg);
}

.large-caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    color: var(--white);
}

.large-caption strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.large-caption em {
    display: block;
    color: #e2e8f0;
    font-style: normal;
    line-height: 1.6;
}

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

.category-tile {
    position: relative;
    min-height: 148px;
    overflow: hidden;
    border-radius: var(--radius-md);
    color: var(--white);
    box-shadow: var(--shadow-card);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 148px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

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

.category-tile span,
.category-tile em {
    position: absolute;
    left: 18px;
    z-index: 1;
}

.category-tile span {
    bottom: 42px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile em {
    bottom: 18px;
    color: var(--amber-100);
    font-style: normal;
    font-weight: 700;
}

.category-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.category-panel {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.category-panel.wide {
    grid-column: 1 / -1;
}

.pill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px 220px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.search-hero {
    padding: 42px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
    box-shadow: var(--shadow-soft);
    color: var(--white);
}

.search-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(34px, 5vw, 58px);
}

.search-results {
    margin-top: 34px;
}

.result-heading {
    margin: 0 0 20px;
    color: var(--slate-700);
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--slate-600);
    font-size: 14px;
}

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

.player-shell {
    background: #000000;
}

.player-wrap {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 1;
}

.player-cover-button {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-cover-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    color: var(--slate-900);
    background: var(--amber-400);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
}

.player-cover-button.hidden {
    display: none;
}

.player-loading {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.76);
    font-size: 13px;
    pointer-events: none;
}

.player-loading.ready {
    display: none;
}

.detail-container {
    padding-top: 34px;
}

.detail-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 48px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-card);
}

.detail-content h1 {
    margin: 0 0 16px;
    color: var(--slate-900);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.18;
}

.detail-content section {
    margin-top: 26px;
}

.detail-content section p,
.lead-text {
    color: var(--slate-700);
    line-height: 1.9;
}

.lead-text {
    margin-top: 22px;
    color: var(--amber-600);
    font-size: 18px;
    font-weight: 800;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 22px;
}

.footer-logo {
    margin-bottom: 12px;
    color: var(--amber-400);
    font-size: 22px;
    font-weight: 900;
}

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

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

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

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

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 22px 26px;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
    color: #94a3b8;
    text-align: center;
}

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

.empty-state {
    padding: 60px 20px;
    border-radius: var(--radius-lg);
    color: var(--slate-600);
    background: var(--white);
    box-shadow: var(--shadow-card);
    text-align: center;
}

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        bottom: 72px;
    }

    .search-panel,
    .search-large,
    .filter-bar {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .filter-bar {
        display: grid;
    }

    .cards-4,
    .cards-3,
    .cards-2,
    .category-grid,
    .two-column,
    .category-columns,
    .detail-card {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-cover {
        max-width: 360px;
    }
}

@media (max-width: 620px) {
    .nav-wrap {
        padding: 0 16px;
    }

    .logo {
        font-size: 19px;
    }

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

    .page-container {
        padding: 36px 16px;
    }

    .quick-search {
        padding: 0 16px;
    }

    .search-panel {
        display: grid;
    }

    .cards-4,
    .cards-3,
    .cards-2,
    .category-grid,
    .two-column,
    .category-columns,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 126px 1fr;
    }

    .horizontal-media {
        min-height: 130px;
    }

    .card-title {
        font-size: 16px;
    }

    .page-title-block,
    .search-hero,
    .detail-card,
    .category-panel {
        padding: 22px;
    }

    .player-cover-button span {
        width: 62px;
        height: 62px;
        font-size: 28px;
    }
}
