:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --red: #dc2626;
    --orange: #f97316;
    --gold: #f59e0b;
    --radius: 20px;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
}

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: 100;
    color: #fff;
    background: linear-gradient(90deg, #0f172a, #1e293b 45%, #0f172a);
    box-shadow: 0 15px 30px rgba(2, 6, 23, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.35);
}

.brand-name {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #f87171, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fb7185;
}

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

.header-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input,
.mobile-search input {
    width: 240px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fff;
    background: rgba(51, 65, 85, 0.92);
    outline: none;
    padding: 10px 44px 10px 18px;
}

.header-search input:focus,
.mobile-search input:focus {
    border-color: rgba(248, 113, 113, 0.8);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.header-search button {
    position: absolute;
    right: 12px;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1e293b;
}

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

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.mobile-search {
    gap: 10px;
}

.mobile-search input {
    width: 100%;
}

.mobile-search button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    padding: 10px 16px;
}

.hero {
    position: relative;
    min-height: 70vh;
    color: #fff;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(248, 113, 113, 0.35), transparent 34%), linear-gradient(100deg, #020617, #7f1d1d 58%, #7c2d12);
}

.hero-track {
    position: absolute;
    inset: 0;
}

.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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: saturate(1.12) contrast(1.05);
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.78)), linear-gradient(90deg, rgba(2, 6, 23, 0.82), transparent 68%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 70vh;
    align-items: center;
    padding: 76px 0;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    padding: 8px 16px;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.5vw, 22px);
    line-height: 1.75;
}

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

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    padding: 13px 24px;
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.32);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    background: rgba(15, 23, 42, 0.3);
    padding: 12px 22px;
    backdrop-filter: blur(10px);
}

.btn-light {
    color: var(--slate-900);
    background: #fff;
    padding: 12px 20px;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
    transform: translateY(-2px);
}

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

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

.hero-dots button.is-active {
    width: 30px;
    background: #fff;
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, 0.38);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow.prev {
    left: 28px;
}

.hero-arrow.next {
    right: 28px;
}

.main {
    padding: 44px 0 64px;
}

.content-section {
    margin-bottom: 56px;
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.section-head p:not(.eyebrow) {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.35);
}

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--red));
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta span {
    border-radius: 999px;
    background: var(--slate-100);
    padding: 4px 8px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    border-radius: 999px;
    color: #b91c1c;
    background: #fee2e2;
    font-size: 12px;
    padding: 4px 9px;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #991b1b 65%, #ea580c);
    padding: 24px;
    box-shadow: var(--shadow);
}

.category-card::after {
    position: absolute;
    right: -34px;
    bottom: -36px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    content: "";
    background: rgba(255, 255, 255, 0.12);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.category-card span {
    position: relative;
    z-index: 2;
    font-weight: 800;
}

.page-hero {
    color: #fff;
    background: linear-gradient(100deg, #020617, #7f1d1d, #9a3412);
    padding: 66px 0;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.035em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-search {
    flex: 1;
}

.filter-search input,
.filter-selects select,
.search-main input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: var(--slate-50);
    padding: 13px 18px;
}

.filter-search input:focus,
.filter-selects select:focus,
.search-main input:focus {
    border-color: rgba(220, 38, 38, 0.6);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.filter-selects {
    display: flex;
    gap: 12px;
}

.empty-state {
    display: none;
    border: 1px dashed #fecaca;
    border-radius: 22px;
    color: #b91c1c;
    background: #fff7f7;
    padding: 22px;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 74px 92px 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    padding: 12px 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.ranking-number {
    color: var(--red);
    font-size: 30px;
    font-weight: 900;
}

.ranking-thumb {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.detail-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-panel {
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.player-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-size: 18px;
    font-weight: 900;
    padding: 16px 26px;
    box-shadow: 0 20px 44px rgba(220, 38, 38, 0.38);
}

.detail-body {
    padding: 28px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--red);
}

.detail-body h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

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

.detail-meta span {
    border-radius: 999px;
    color: #475569;
    background: var(--slate-100);
    padding: 7px 12px;
}

.detail-lead {
    margin: 0 0 24px;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

.detail-text h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-text p {
    margin: 0 0 22px;
    color: #334155;
    line-height: 1.95;
}

.side-panel {
    padding: 20px;
}

.side-poster {
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 20px;
}

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

.info-list {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    color: #334155;
    padding-bottom: 12px;
}

.info-list strong {
    color: #111827;
}

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

.search-main {
    display: grid;
    gap: 24px;
}

.search-main input {
    border-radius: 24px;
    font-size: 18px;
    padding: 18px 22px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

.footer-grid a {
    display: block;
    margin: 9px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #fb7185;
}

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

@media (max-width: 1120px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

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

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .main {
        padding-top: 30px;
    }

    .section-head,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-selects {
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .related-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ranking-item {
        grid-template-columns: 48px 74px 1fr;
    }

    .ranking-item .btn-light {
        grid-column: 2 / -1;
    }
}

@media (max-width: 520px) {
    .brand-name {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .related-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-body,
    .side-panel {
        padding: 18px;
    }

    .ranking-item {
        grid-template-columns: 44px 68px 1fr;
        gap: 12px;
        padding: 12px;
    }
}
