:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --red: #ef4444;
    --orange: #f97316;
    --gold: #facc15;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fbff 0%, #eef7ff 42%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.28);
}

.nav-wrap {
    width: min(1220px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #1d4ed8;
    background: #fff;
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.26);
}

.brand-text {
    white-space: nowrap;
    font-size: 1.24rem;
}

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

.nav-link {
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.nav-link.compact {
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-split {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.28);
}

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

.header-search input,
.mobile-search input {
    width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 10px 42px 10px 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button {
    position: absolute;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    color: #1d4ed8;
    background: #fff;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    font-weight: 700;
}

.mobile-search {
    gap: 10px;
    margin-top: 8px;
}

.mobile-search input {
    flex: 1;
    width: auto;
}

.mobile-search button,
.primary-btn,
.secondary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 900;
    cursor: pointer;
}

.mobile-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.28);
}

.secondary-btn {
    color: #0f172a;
    background: #fff;
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.main-shell,
.section-wrap,
.page-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.46), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a 48%, #0e7490);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.82));
    z-index: 1;
}

.hero-slider {
    position: relative;
    z-index: 2;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    gap: 46px;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-copy {
    padding-top: 28px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #eff6ff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(2.45rem, 5vw, 5.25rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-meta span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-poster {
    position: relative;
    isolation: isolate;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 32px -18px -18px 28px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.48), rgba(239, 68, 68, 0.42));
    filter: blur(4px);
    z-index: -1;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 34px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.hero-rating {
    position: absolute;
    left: -18px;
    bottom: 34px;
    border-radius: 20px;
    padding: 14px 18px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.hero-rating strong {
    display: block;
    color: #ef4444;
    font-size: 1.6rem;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-controls button,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.active {
    opacity: 1;
    background: #fff;
}

.section {
    padding: 72px 0;
}

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

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--blue);
    font-weight: 900;
}

.section h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.9rem, 3vw, 3rem);
    line-height: 1.16;
}

.section-head p,
.page-title p {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent);
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.36);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.1em;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--blue);
}

.movie-card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.1em;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 0.93rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.detail-tags span {
    color: #1d4ed8;
    background: #dbeafe;
}

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

.category-card {
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 10px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.category-visual img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
}

.category-copy {
    display: block;
    padding: 18px;
}

.category-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.12rem;
    font-weight: 900;
}

.category-copy em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 0.92rem;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
    gap: 26px;
}

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

.rank-row,
.compact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 18px;
    padding: 10px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover,
.compact-card:hover {
    transform: translateX(4px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.rank-row img,
.compact-card img {
    width: 76px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
    background: #0f172a;
}

.rank-copy,
.compact-card span {
    min-width: 0;
    flex: 1;
}

.rank-copy strong,
.compact-card strong {
    display: block;
    overflow: hidden;
    color: #0f172a;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy em,
.compact-card em {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-meta {
    color: var(--blue);
    font-weight: 900;
}

.page-hero {
    padding: 64px 0 40px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.page-title {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #2563eb;
    font-weight: 800;
}

.breadcrumb span {
    color: var(--muted);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(140px, 0.34fr));
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 800;
    font-size: 0.9rem;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--ink);
    background: #fff;
    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);
}

.detail-hero {
    color: #fff;
    background: linear-gradient(135deg, #020617, #172554 55%, #0e7490);
}

.player-wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
    cursor: pointer;
}

.player-start span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    padding-left: 6px;
    font-size: 2.4rem;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 20px 50px rgba(239, 68, 68, 0.4);
}

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

.detail-main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 76px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
    gap: 28px;
}

.detail-copy,
.side-panel {
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 26px;
    padding: 26px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-copy h1 {
    margin-bottom: 16px;
}

.detail-lead {
    margin: 0 0 18px;
    color: #334155;
    font-size: 1.08rem;
}

.detail-cover-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
    margin-top: 26px;
}

.detail-cover-row img {
    width: 100%;
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
}

.detail-text-block {
    margin-top: 26px;
}

.detail-text-block h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.detail-text-block p {
    margin: 0;
    color: #334155;
}

.side-panel {
    position: sticky;
    top: 96px;
    align-self: start;
}

.side-panel h2 {
    margin: 0 0 18px;
    font-size: 1.25rem;
}

.related-grid {
    display: grid;
    gap: 12px;
}

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

.footer-grid {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr) minmax(220px, 0.8fr);
    gap: 28px;
}

.footer-brand {
    color: #fff;
    font-size: 1.18rem;
}

.footer-brand .brand-mark {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.site-footer p {
    max-width: 520px;
    margin: 14px 0 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1.02rem;
}

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

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

.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.92rem;
}

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

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 34px;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

.empty-state.show {
    display: block;
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .nav-wrap {
        justify-content: space-between;
    }

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

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding: 34px 0 86px;
    }

    .hero-poster {
        max-width: 330px;
    }

    .hero-rating {
        left: 12px;
        bottom: 20px;
    }

    .section-head {
        display: block;
    }

    .movie-grid,
    .movie-grid.featured,
    .category-grid,
    .rank-layout,
    .detail-main,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-cover-row img {
        max-width: 260px;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 560px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-slider {
        min-height: 700px;
    }

    .hero h1,
    .hero h2 {
        font-size: 2.35rem;
    }

    .hero-poster {
        max-width: 250px;
    }

    .rank-meta {
        display: none;
    }

    .brand-text {
        font-size: 1.08rem;
    }
}
