:root {
    color-scheme: dark;
    --dark-950: #0b0d10;
    --dark-900: #141618;
    --dark-850: #1a1d23;
    --dark-800: #24272c;
    --dark-700: #30343b;
    --dark-600: #464c56;
    --primary-500: #1890ff;
    --primary-400: #40a9ff;
    --secondary-500: #13c2c2;
    --secondary-400: #36d8d8;
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--dark-900);
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(20, 22, 24, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    box-shadow: 0 14px 28px rgba(24, 144, 255, 0.25);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link,
.footer-links a {
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.footer-links a:hover {
    color: #fff;
    background: rgba(24, 144, 255, 0.14);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--dark-800);
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 16px;
    background: var(--dark-800);
}

.spotlight {
    position: relative;
    height: 80vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--dark-950);
}

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

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

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

.spotlight-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 42%, rgba(24, 144, 255, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(11, 13, 16, 0.92) 0%, rgba(20, 22, 24, 0.68) 42%, rgba(20, 22, 24, 0.22) 100%),
        linear-gradient(0deg, var(--dark-900) 0%, rgba(20, 22, 24, 0) 42%);
}

.spotlight-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100% - 1180px) / 2));
    transform: translateY(-42%);
    width: min(680px, calc(100% - 48px));
    animation: slideUp 0.7s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--primary-400);
    background: rgba(24, 144, 255, 0.13);
    border: 1px solid rgba(64, 169, 255, 0.4);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.spotlight h1,
.spotlight h2,
.page-hero h1,
.detail-article h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.spotlight h2 {
    font-size: clamp(28px, 4.8vw, 56px);
}

.spotlight p,
.page-hero p,
.intro-card p,
.category-overview-body p,
.ranking-body p,
.detail-article p {
    color: var(--text-soft);
}

.spotlight p {
    max-width: 620px;
    font-size: 18px;
}

.spotlight-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--text-muted);
}

.spotlight-meta {
    margin: 18px 0 26px;
}

.spotlight-actions,
.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
    background: var(--primary-500);
    color: #fff;
    box-shadow: 0 16px 34px rgba(24, 144, 255, 0.25);
}

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

.carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(20, 22, 24, 0.58);
    font-size: 38px;
    line-height: 1;
    transition: background 0.25s ease, transform 0.25s ease;
}

.carousel-arrow:hover {
    background: rgba(24, 144, 255, 0.75);
    transform: translateY(-50%) scale(1.06);
}

.carousel-prev {
    left: 22px;
    transform: translateY(-50%);
}

.carousel-next {
    right: 22px;
    transform: translateY(-50%);
}

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

.carousel-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.carousel-dot.is-active {
    width: 34px;
    background: var(--primary-500);
}

.section-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.page-main {
    padding-top: 72px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 32px;
}

.category-page-hero {
    padding-bottom: 12px;
}

.section-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 48px;
    padding-bottom: 24px;
}

.intro-card {
    max-width: 720px;
}

.intro-card h2,
.section-heading h2,
.rank-panel h2,
.category-overview-body h2,
.detail-article h2,
.side-card h2 {
    margin: 10px 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.16;
}

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

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

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

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

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

.movie-card {
    min-width: 0;
    border-radius: 18px;
    overflow: hidden;
    background: var(--dark-800);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
    animation: fadeIn 0.45s ease both;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    background: #2b2f36;
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--dark-700);
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.ranking-item:hover img {
    transform: scale(1.08);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1));
    transition: opacity 0.3s ease;
}

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

.poster-pill,
.ranking-number {
    position: absolute;
    z-index: 2;
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    backdrop-filter: blur(12px);
}

.poster-pill-left {
    top: 10px;
    left: 10px;
    background: rgba(24, 144, 255, 0.9);
}

.poster-pill-right {
    top: 10px;
    right: 10px;
    background: rgba(20, 22, 24, 0.86);
}

.poster-play {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    opacity: 0;
    font-size: 28px;
    color: #fff;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: scale(1.08);
}

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

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

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

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

.movie-meta {
    justify-content: space-between;
    font-size: 13px;
}

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

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

.category-card,
.rank-panel,
.category-overview-card,
.side-card,
.detail-article,
.search-panel,
.ranking-item,
.intro-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(36, 39, 44, 0.78);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.category-card {
    display: grid;
    grid-template-columns: 124px 1fr;
    gap: 16px;
    padding: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover,
.ranking-item:hover {
    transform: translateY(-4px);
    border-color: rgba(64, 169, 255, 0.35);
}

.category-thumbs,
.category-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    overflow: hidden;
    border-radius: 16px;
}

.category-thumbs img,
.category-cover img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.category-card h3,
.category-overview-body h2,
.ranking-body h2 {
    margin: 0 0 8px;
}

.category-card p,
.category-overview-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.rank-panel {
    padding: 22px;
    align-self: start;
    position: sticky;
    top: 92px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.25s ease;
}

.rank-row:hover {
    background: rgba(24, 144, 255, 0.12);
}

.rank-no,
.rank-score {
    color: var(--primary-400);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.category-overview-grid {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-overview-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.mini-links a,
.side-links a,
.detail-tags span,
.detail-tags a,
.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.05);
}

.mini-links a:hover,
.side-links a:hover,
.detail-tags a:hover {
    color: #fff;
    border-color: rgba(64, 169, 255, 0.48);
}

.search-panel {
    padding: 18px;
    margin-bottom: 26px;
}

.search-row {
    display: flex;
    gap: 12px;
}

.search-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    padding: 0 16px;
    color: #fff;
    background: var(--dark-900);
}

.search-input:focus {
    border-color: rgba(64, 169, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.12);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    border: 0;
    transition: background 0.25s ease, color 0.25s ease;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    background: var(--primary-500);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    padding: 16px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.ranking-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
}

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

.ranking-number {
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
}

.ranking-body {
    align-self: center;
}

.ranking-body p {
    margin: 8px 0 14px;
}

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

.breadcrumb a:hover {
    color: var(--primary-400);
}

.detail-main {
    padding-top: 72px;
}

.detail-top {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(24, 144, 255, 0.28), rgba(0, 0, 0, 0.68));
    font-size: 18px;
    font-weight: 900;
}

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

.player-play-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-500);
    box-shadow: 0 18px 46px rgba(24, 144, 255, 0.36);
    padding-left: 5px;
    font-size: 28px;
}

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

.detail-article {
    padding: 28px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.detail-article h1 {
    margin-top: 12px;
    font-size: clamp(32px, 5vw, 54px);
}

.lead-text {
    font-size: 18px;
}

.detail-meta {
    margin: 24px 0;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.detail-article h2,
.side-card h2 {
    margin-top: 28px;
    font-size: 24px;
}

.detail-article p {
    font-size: 16px;
    line-height: 1.9;
}

.detail-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 92px;
}

.side-card {
    padding: 18px;
}

.poster-card {
    padding: 0;
    overflow: hidden;
}

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

.info-list {
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
    border-bottom: 0;
}

.info-list dt {
    color: var(--text-muted);
}

.info-list dd {
    margin: 0;
    color: #fff;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: var(--dark-950);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    max-width: 560px;
    margin: 12px 0 0;
    color: var(--text-muted);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--text-muted);
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(-36%);
    }
    to {
        opacity: 1;
        transform: translateY(-42%);
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-850);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-600);
    border-radius: 999px;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .spotlight {
        min-height: 640px;
        height: 86vh;
    }

    .spotlight-content {
        left: 18px;
        width: calc(100% - 36px);
    }

    .carousel-arrow {
        display: none;
    }

    .section-intro,
    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .category-card {
        grid-template-columns: 110px 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .brand-text {
        font-size: 18px;
    }

    .page-main,
    .detail-main {
        padding-top: 64px;
    }

    .spotlight h1,
    .spotlight h2,
    .page-hero h1,
    .detail-article h1 {
        font-size: 32px;
    }

    .spotlight p,
    .lead-text {
        font-size: 16px;
    }

    .movie-grid,
    .movie-grid-featured,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 38px 1fr;
    }

    .rank-score {
        display: none;
    }

    .detail-article {
        padding: 20px;
    }
}