* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate: #020617;
    --slate-soft: #0f172a;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --violet: #7c3aed;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #eef6ff 100%);
}

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;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #22d3ee, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.55);
    font-size: 14px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    padding: 10px 13px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.86);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 8px;
}

.mobile-menu-button span {
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

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

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

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 35%, rgba(34, 211, 238, 0.25), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.67) 45%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, rgba(2, 6, 23, 0.08) 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    padding: 28px 0 94px;
    color: #ffffff;
}

.hero-badges,
.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-badges span,
.hero-tags span,
.tag-row span,
.detail-meta span,
.poster-type {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    line-height: 1;
}

.hero-badges span:first-child,
.poster-type {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero-badges span:not(:first-child),
.hero-tags span,
.tag-row span,
.detail-meta span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

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

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

.primary-button,
.ghost-button,
.text-link,
.inline-filter button,
.hero-search button,
.advanced-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-search button,
.inline-filter button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.hero-search button:hover,
.inline-filter button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.32);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(14px);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 30px;
    background: #22d3ee;
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 86px;
    transform: translateX(-50%);
    width: min(640px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
}

.hero-search input,
.inline-filter input,
.filter-bar input,
.advanced-filter input,
.advanced-filter select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: var(--ink);
    background: #ffffff;
}

.hero-search input {
    border: 0;
    color: #ffffff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.64);
}

main,
.page-main {
    min-height: 60vh;
}

.content-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.section-overlap {
    position: relative;
    z-index: 6;
    margin-top: -26px;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-heading h2,
.panel-heading h2,
.page-hero h1,
.detail-info h1,
.text-panel h2 {
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.04em;
}

.section-heading h2,
.panel-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading a,
.text-link {
    color: var(--blue);
    font-weight: 800;
}

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

.movie-card {
    position: relative;
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.38);
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), transparent 52%);
}

.poster-type {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
}

.poster-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.movie-desc {
    margin-top: 8px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.4s ease;
}

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

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

.category-tile span,
.category-tile small {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    color: #ffffff;
}

.category-tile span {
    bottom: 54px;
    font-size: 22px;
    font-weight: 800;
}

.category-tile small {
    bottom: 20px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.5;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: var(--radius);
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.24), transparent 35%),
        linear-gradient(180deg, #0f172a, #020617);
    box-shadow: var(--shadow);
}

.ranking-panel h2,
.ranking-panel .eyebrow {
    color: #ffffff;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 36px 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(3px);
}

.ranking-item span {
    color: #22d3ee;
    font-size: 18px;
    font-weight: 900;
}

.ranking-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-item strong,
.ranking-item small {
    display: block;
}

.ranking-item small {
    margin-top: 4px;
    color: #94a3b8;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 98px 0 72px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.25), transparent 28%),
        radial-gradient(circle at 80% 30%, rgba(124, 58, 237, 0.24), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a 64%, #172554);
}

.page-hero > div {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(42px, 6vw, 70px);
}

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

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

.category-card-large {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
}

.category-cover img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.category-card-large h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-card-large p {
    color: var(--muted);
    line-height: 1.8;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.mini-links a {
    color: var(--blue);
    background: #eff6ff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.inline-filter,
.filter-bar,
.advanced-filter {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.inline-filter {
    max-width: 620px;
    grid-template-columns: 1fr auto;
}

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

.advanced-filter {
    grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
    margin: 0 0 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.rank-card .rank-number {
    position: absolute;
    z-index: 4;
    right: 14px;
    top: 14px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.3);
}

.breadcrumb {
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.28), transparent 32%),
        linear-gradient(135deg, #020617, #0f172a 58%, #1e3a8a);
    box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
}

.detail-line {
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags span,
.detail-meta span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.detail-info .primary-button {
    margin-top: 28px;
}

.player-section {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.32);
    aspect-ratio: 16 / 9;
}

.player-card video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.28));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 46px rgba(37, 99, 235, 0.36);
    font-size: 32px;
}

.detail-content {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.text-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.text-panel h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.text-panel p {
    margin: 0;
    color: #334155;
    line-height: 2;
}

.detail-nav-links {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.detail-nav-links a {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--blue);
    background: #ffffff;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.related-section {
    padding-top: 34px;
}

.site-footer {
    margin-top: 60px;
    color: #cbd5e1;
    background: #020617;
}

.footer-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.footer-shell p {
    max-width: 620px;
    margin: 14px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: #64748b;
    font-size: 14px;
}

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

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: flex;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-copy {
        padding-bottom: 140px;
    }

    .hero-search,
    .inline-filter,
    .advanced-filter,
    .detail-nav-links {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .hero-search button,
    .inline-filter button {
        width: 100%;
    }

    .hero-arrow {
        display: none;
    }

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

    .category-card-large,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .nav-shell,
    .content-section,
    .page-hero > div,
    .breadcrumb,
    .detail-hero,
    .player-section,
    .detail-content,
    .detail-nav-links,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 24px, 1200px);
    }

    .hero-content {
        width: min(100% - 24px, 1200px);
    }

    .hero-copy h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: 38px;
    }

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

    .detail-hero {
        padding: 22px;
    }

    .footer-shell {
        flex-direction: column;
    }
}
