:root {
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --red-500: #ef4444;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --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;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.18);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--red-900), var(--red-700));
    box-shadow: var(--shadow-md);
}

.header-inner {
    width: min(100% - 32px, var(--container));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--red-800);
    background: var(--white);
    border-radius: 12px;
    font-size: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.brand:hover .brand-mark {
    background: #fee2e2;
    transform: translateY(-1px);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: #fee2e2;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #fef2f2;
    font-weight: 600;
}

.desktop-nav > a,
.nav-dropdown > a {
    padding: 22px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--white);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    left: 0;
    top: 100%;
    width: 190px;
    padding: 8px;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    color: var(--slate-700);
    border-radius: 10px;
    font-size: 14px;
}

.dropdown-panel a:hover {
    color: var(--red-800);
    background: #fef2f2;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-button {
    display: none;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid rgba(254, 226, 226, 0.24);
}

.mobile-nav a {
    display: block;
    padding: 9px 4px;
    color: #fef2f2;
    font-weight: 600;
}

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

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--slate-950);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.15)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 48%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - var(--container)) / 2 + 16px));
    top: 50%;
    width: min(680px, calc(100% - 48px));
    transform: translateY(-50%);
    color: var(--white);
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-bottom: 16px;
    padding: 6px 12px;
    color: var(--white);
    background: var(--red-600);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    color: #fef2f2;
    background: rgba(220, 38, 38, 0.78);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

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

.primary-button,
.ghost-button {
    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, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--red-600);
    box-shadow: var(--shadow-md);
}

.primary-button:hover {
    background: var(--red-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 0;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 28px;
    background: var(--white);
}

.search-panel {
    position: relative;
    z-index: 2;
    margin-top: -34px;
}

.search-panel .container {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.search-panel.slim-search {
    margin-top: 0;
    padding: 24px 0 0;
}

.search-panel.slim-search .container {
    box-shadow: var(--shadow-md);
}

.search-box {
    display: grid;
    gap: 8px;
}

.search-box label {
    color: var(--slate-700);
    font-weight: 800;
}

.search-box input,
.filter-row select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    color: var(--slate-900);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-row select:focus {
    border-color: var(--red-500);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.search-count {
    margin: 0;
    color: var(--slate-600);
    font-weight: 700;
    white-space: nowrap;
}

.page-section {
    padding: 54px 0 0;
}

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

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

.section-heading p {
    margin: 0;
    color: var(--slate-600);
}

.section-heading > a {
    color: var(--red-700);
    font-weight: 800;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: grid;
    align-items: end;
    color: var(--white);
    background: var(--slate-900);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-tile img,
.category-overview-card > .poster-collage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    z-index: -2;
}

.category-tile::after,
.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.1));
    z-index: -1;
}

.category-tile span,
.category-copy {
    display: grid;
    gap: 5px;
    padding: 18px;
}

.category-tile strong,
.category-copy strong {
    font-size: 20px;
}

.category-tile em,
.category-copy em {
    color: #fecaca;
    font-style: normal;
    font-weight: 800;
}

.category-tile small,
.category-copy small {
    color: #e5e7eb;
}

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

.category-overview-card {
    min-height: 240px;
}

.poster-collage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

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

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

.movie-card {
    overflow: hidden;
    display: grid;
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.12));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.poster-mask span,
.play-circle {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--amber-600);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--red-600);
    border-radius: 999px;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.movie-info {
    display: grid;
    gap: 8px;
    padding: 13px;
}

.movie-info strong {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    color: var(--slate-900);
    font-size: 15px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-info strong {
    color: var(--red-700);
}

.movie-info em {
    display: -webkit-box;
    overflow: hidden;
    min-height: 38px;
    color: var(--slate-600);
    font-size: 13px;
    font-style: normal;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--slate-500);
    font-size: 12px;
}

.movie-meta span:first-child {
    padding: 1px 7px;
    color: var(--red-800);
    background: #fee2e2;
    border-radius: 999px;
    font-weight: 700;
}

.compact-card .movie-info {
    padding: 11px;
}

.page-hero {
    padding: 74px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.24), transparent 26%),
        linear-gradient(90deg, var(--red-900), var(--red-600));
}

.page-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #fee2e2;
    font-size: 18px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 84px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ranking-number {
    color: var(--red-700);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.ranking-row img {
    width: 84px;
    height: 112px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-200);
}

.ranking-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.ranking-copy strong {
    color: var(--slate-900);
    font-size: 18px;
}

.ranking-copy em {
    overflow: hidden;
    color: var(--slate-600);
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy small {
    color: var(--slate-500);
}

.score-pill {
    justify-self: end;
    width: 56px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--amber-600);
    border-radius: 999px;
    font-weight: 900;
}

.player-stage {
    background: #000000;
}

.player-shell {
    width: min(100%, var(--container));
    margin: 0 auto;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #000000;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.44;
}

.player-cover .play-circle {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    font-size: 28px;
    transition: transform 0.2s ease;
}

.player-cover:hover .play-circle {
    transform: scale(1.08);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
    gap: 32px;
    padding: 34px 0 0;
}

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

.breadcrumb a {
    color: var(--red-700);
    font-weight: 700;
}

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

.detail-layout .detail-meta span {
    color: var(--red-800);
    background: #fee2e2;
}

.detail-card,
.sticky-card {
    margin-bottom: 18px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.detail-card h2,
.sticky-card h2 {
    margin: 0 0 12px;
    color: var(--slate-900);
    font-size: 21px;
}

.detail-card p {
    margin: 0;
    color: var(--slate-700);
    line-height: 1.85;
}

.intro-card p {
    color: var(--slate-800);
    font-size: 19px;
    font-style: italic;
}

.review-card {
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

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

.tag-list span {
    padding: 6px 12px;
    color: var(--slate-700);
    background: var(--slate-100);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.detail-side {
    min-width: 0;
}

.sticky-card {
    position: sticky;
    top: 92px;
}

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

.related-list .movie-card {
    grid-template-columns: 96px minmax(0, 1fr);
}

.related-list .poster-wrap {
    height: 128px;
    aspect-ratio: auto;
}

.related-list .movie-info strong {
    min-height: auto;
}

.no-results {
    display: none;
    padding: 42px 0;
    color: var(--slate-500);
    text-align: center;
    font-weight: 800;
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    margin-top: 72px;
    color: #d1d5db;
    background: linear-gradient(180deg, var(--slate-800), var(--slate-950));
}

.footer-inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    display: grid;
    gap: 18px;
    padding: 42px 0;
}

.footer-inner h2 {
    margin: 0 0 8px;
    color: var(--white);
}

.footer-inner p {
    margin: 0;
    color: #9ca3af;
}

.footer-links,
.footer-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a,
.footer-categories a {
    color: #fca5a5;
    font-weight: 700;
}

[data-filter-card].is-hidden {
    display: none;
}

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

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

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

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

    .hero-carousel {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel .container {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .sticky-card {
        position: static;
    }
}

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

    .brand-text small {
        display: none;
    }

    .hero-carousel {
        height: 500px;
    }

    .hero-content {
        top: auto;
        bottom: 62px;
        transform: none;
    }

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

    .hero-meta span {
        font-size: 12px;
    }

    .page-hero {
        padding: 52px 0;
    }

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

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

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

    .ranking-row {
        grid-template-columns: 40px 70px minmax(0, 1fr);
    }

    .ranking-row img {
        width: 70px;
        height: 94px;
    }

    .score-pill {
        display: none;
    }

    .ranking-copy em,
    .ranking-copy small {
        white-space: normal;
    }

    .detail-card,
    .sticky-card {
        padding: 18px;
    }

    .related-list .movie-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .related-list .poster-wrap {
        height: 112px;
    }
}
