:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-strong: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: #334155;
    --text: #cbd5e1;
    --muted: #94a3b8;
    --light: #ffffff;
    --soft-light: rgba(255, 255, 255, 0.9);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 18px;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.12), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(148, 163, 184, 0.1), transparent 26%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.52), rgba(2, 6, 23, 1));
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    color: var(--light);
    font-weight: 700;
    line-height: 1.18;
}

p {
    line-height: 1.75;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.85);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--light);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand::before {
    width: 10px;
    height: 30px;
    border-radius: 999px;
    content: "";
    background: linear-gradient(180deg, #ffffff, #64748b);
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.25);
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--text);
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--light);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: transparent;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: var(--panel-strong);
}

.mobile-nav.is-open {
    display: grid;
    gap: 4px;
    padding: 14px 20px 18px;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
}

main {
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.76) 32%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 32px));
    right: 24px;
    bottom: 76px;
    max-width: 780px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: clamp(42px, 7vw, 78px);
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin-bottom: 28px;
    color: #dbe4ef;
    font-size: clamp(17px, 2.1vw, 21px);
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    padding: 0 28px;
    background: var(--soft-light);
    color: #0f172a;
    font-weight: 700;
}

.primary-btn:hover {
    transform: translateY(-1px);
    background: #ffffff;
}

.ghost-btn {
    padding: 0 22px;
    border: 1px solid rgba(226, 232, 240, 0.3);
    background: rgba(15, 23, 42, 0.46);
    color: var(--light);
}

.ghost-btn:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.74);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--light);
}

.search-band,
.section-wrap,
.page-hero,
.detail-layout {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.search-band {
    padding: 56px 0 20px;
}

.section-wrap {
    padding: 34px 0 54px;
}

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

.section-head.compact {
    align-items: center;
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.035em;
}

.section-head p {
    margin-top: 6px;
    color: var(--muted);
}

.text-link {
    min-height: 36px;
    color: var(--text);
    font-weight: 700;
}

.text-link:hover {
    color: var(--light);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.search-panel input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(71, 85, 105, 0.8);
    border-radius: 14px;
    outline: none;
    padding: 0 16px;
    background: #0f172a;
    color: var(--light);
}

.search-panel input:focus {
    border-color: rgba(226, 232, 240, 0.65);
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.quick-filters button {
    min-height: 40px;
    border: 1px solid rgba(71, 85, 105, 0.76);
    border-radius: 999px;
    padding: 0 15px;
    background: rgba(30, 41, 59, 0.82);
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.quick-filters button:hover,
.quick-filters button.is-active {
    border-color: rgba(255, 255, 255, 0.82);
    background: var(--light);
    color: #0f172a;
}

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

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

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

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 18px;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-row .movie-card {
    flex: 0 0 320px;
}

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

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.74);
    border-radius: var(--radius);
    background: var(--panel-strong);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.movie-link:hover {
    transform: translateY(-4px);
    border-color: #64748b;
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #334155;
}

.all-grid .movie-cover,
.compact-grid .movie-cover {
    aspect-ratio: 4 / 3;
}

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

.movie-link:hover .movie-cover img {
    transform: scale(1.055);
}

.movie-cover-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), transparent);
    transition: opacity 0.3s ease;
}

.movie-link:hover .movie-cover-mask {
    opacity: 1;
}

.play-mark {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    font-size: 26px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.movie-link:hover .play-mark {
    transform: scale(1);
}

.movie-meta-pill,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--light);
    font-size: 12px;
    font-weight: 700;
}

.rank-badge {
    right: 12px;
    left: auto;
    background: var(--soft-light);
    color: #0f172a;
}

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

.movie-card h2,
.movie-card h3 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.4em;
    margin-bottom: 9px;
    font-size: 18px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

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

.tag-row span,
.detail-tags a {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(51, 65, 85, 0.74);
    color: #dbe4ef;
    font-size: 12px;
}

.split-feature {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.wide-card a {
    position: relative;
    display: block;
    min-height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel-strong);
}

.wide-card img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
}

.wide-card a::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.24), transparent);
}

.wide-card div {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    z-index: 2;
}

.wide-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 700;
}

.wide-card h2 {
    margin-bottom: 12px;
    font-size: clamp(30px, 4vw, 48px);
}

.wide-card p {
    max-width: 760px;
    color: #dbe4ef;
}

.side-stack {
    display: grid;
    gap: 18px;
}

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

.category-card,
.category-overview-card a {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.74);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-3px);
    border-color: #64748b;
}

.category-card {
    position: relative;
    min-height: 190px;
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.58;
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.18));
}

.category-card div {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

.category-card strong {
    display: block;
    margin-bottom: 7px;
    color: var(--light);
    font-size: 20px;
}

.category-card span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-board {
    padding: 28px;
    border: 1px solid rgba(51, 65, 85, 0.76);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

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

.rank-line {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.72);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
    transform: translateX(4px);
    background: rgba(51, 65, 85, 0.8);
}

.rank-line span {
    color: var(--light);
    font-weight: 800;
}

.rank-line strong {
    overflow: hidden;
    color: var(--light);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-line em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-main {
    padding-top: var(--header-height);
}

.page-hero {
    padding: 78px 0 30px;
}

.small-hero {
    min-height: 300px;
}

.page-hero h1 {
    max-width: 900px;
    margin-bottom: 16px;
    font-size: clamp(38px, 5.4vw, 64px);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

.page-search {
    margin-bottom: 26px;
}

.category-overview-card a {
    height: 100%;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    aspect-ratio: 16 / 10;
    background: var(--panel);
}

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

.category-overview-body {
    padding: 20px;
}

.category-overview-body h2 {
    margin-bottom: 8px;
    font-size: 22px;
}

.category-overview-body p {
    min-height: 3.5em;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.category-overview-body span {
    color: var(--light);
    font-weight: 700;
}

.detail-main {
    padding-bottom: 60px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
    padding-top: 42px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.breadcrumb strong {
    color: var(--text);
    font-weight: 600;
}

.player-section {
    margin-bottom: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.06), rgba(2, 6, 23, 0.58));
}

.player-layer span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 34px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.44);
    transition: transform 0.2s ease;
}

.player-layer:hover span {
    transform: scale(1.06);
}

.player-layer.hidden {
    display: none;
}

.movie-detail-copy {
    padding: 28px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.movie-detail-copy h1 {
    margin-bottom: 14px;
    font-size: clamp(34px, 4.2vw, 56px);
    letter-spacing: -0.045em;
}

.lead-text {
    margin-bottom: 18px;
    color: #dbe4ef;
    font-size: 19px;
}

.detail-tags {
    margin-bottom: 28px;
}

.detail-tags a:hover {
    background: rgba(71, 85, 105, 0.92);
    color: var(--light);
}

.movie-detail-copy h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.movie-detail-copy p {
    color: #dbe4ef;
}

.detail-side {
    position: sticky;
    top: 88px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.detail-poster {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--panel-strong);
}

.info-card {
    padding: 22px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
}

.info-card h2 {
    margin-bottom: 16px;
    font-size: 22px;
}

.info-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-card div {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
}

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

.info-card dd {
    margin: 0;
    color: var(--light);
}

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

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.86);
    background: rgba(15, 23, 42, 0.92);
}

.footer-inner {
    display: grid;
    gap: 12px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    text-align: center;
}

.footer-inner strong {
    color: var(--light);
    font-size: 20px;
}

.footer-inner p {
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    color: var(--text);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--light);
}

[data-card-hidden="true"] {
    display: none !important;
}

@media (max-width: 1080px) {
    .feature-grid,
    .compact-grid,
    .all-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-side {
        position: static;
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 760px) {
    :root {
        --header-height: 60px;
    }

    .desktop-nav {
        display: none;
    }

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

    .brand {
        font-size: 20px;
    }

    .hero {
        height: 74vh;
        min-height: 560px;
    }

    .hero-content {
        left: 18px;
        bottom: 74px;
    }

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

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

    .hero-arrow {
        display: none;
    }

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

    .quick-filters {
        justify-content: flex-start;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

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

    .scroll-row .movie-card {
        flex-basis: 82vw;
    }

    .wide-card img {
        min-height: 360px;
    }

    .rank-line {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .rank-line em {
        display: none;
    }

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

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

    .movie-detail-copy {
        padding: 22px;
    }
}
