:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.82);
    --panel-strong: #1e293b;
    --line: #334155;
    --text: #ffffff;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --accent: #06b6d4;
    --accent-bright: #22d3ee;
    --blue: #3b82f6;
    --yellow: #facc15;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --container: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    background: var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    border-bottom: 1px solid rgba(51, 65, 85, 0.92);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

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

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

.brand span {
    font-size: 24px;
    background: linear-gradient(90deg, var(--accent-bright), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    color: var(--accent-bright);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    color: var(--muted-strong);
    font-weight: 600;
}

.nav-links a,
.mobile-menu a {
    transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--accent-bright);
}

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

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

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    background: #1e293b;
    padding: 12px 16px 18px;
}

.mobile-menu a {
    display: block;
    padding: 10px 0;
    color: var(--muted-strong);
    font-weight: 600;
}

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1000ms ease;
}

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

.hero-slide img,
.image-hero > img,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-copy {
    position: absolute;
    inset: auto 0 0;
    padding: 0 0 76px;
}

.hero-inner {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    max-width: 760px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-bright);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.65;
}

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

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

.btn-primary {
    padding: 0 28px;
    color: #ffffff;
    background: var(--accent);
}

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

.btn-ghost {
    padding: 0 24px;
    color: var(--muted-strong);
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.54);
}

.btn-ghost:hover {
    color: var(--accent-bright);
    border-color: rgba(34, 211, 238, 0.45);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
    font-size: 34px;
    line-height: 1;
    transition: background 180ms ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.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: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 240ms ease, background 240ms ease;
}

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

.section-block {
    padding: 64px 0;
}

.muted-section {
    background: linear-gradient(to bottom, #0f172a, #020617);
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-heading.small h2 {
    font-size: 28px;
}

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

.text-link {
    min-height: 38px;
    color: var(--accent-bright);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 24px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.movie-card {
    display: block;
    min-width: 0;
    color: var(--text);
}

.poster,
.poster-wide,
.rank-cover,
.category-card,
.category-overview-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.poster {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    margin-bottom: 12px;
}

.poster-wide {
    aspect-ratio: 16 / 9;
    border-radius: 18px;
}

.poster img,
.poster-wide img,
.rank-cover img,
.category-card img,
.category-overview-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.movie-card:hover img,
.category-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.055);
}

.poster-shade,
.category-shade,
.player-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
    opacity: 0;
    transition: opacity 220ms ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-float {
    opacity: 1;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.9);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 220ms ease;
}

.score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--yellow);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    transition: color 180ms ease;
}

.movie-card:hover .card-title,
.movie-card:hover .large-copy strong,
.movie-card-horizontal:hover strong {
    color: var(--accent-bright);
}

.card-meta {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.card-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--accent-bright);
    background: rgba(6, 182, 212, 0.14);
    font-size: 12px;
}

.movie-card-large .large-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px;
}

.large-copy strong,
.large-copy em,
.large-copy span {
    display: block;
}

.large-copy strong {
    font-size: 25px;
    font-style: normal;
    transition: color 180ms ease;
}

.large-copy em {
    display: -webkit-box;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted-strong);
    font-style: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.large-copy span {
    color: var(--muted-strong);
    font-size: 14px;
}

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

.category-card {
    height: 180px;
    border-radius: 18px;
}

.category-card .category-shade {
    opacity: 1;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.16));
}

.category-card strong,
.category-card em {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-card strong {
    bottom: 46px;
    font-size: 24px;
}

.category-card em {
    bottom: 20px;
    color: var(--muted-strong);
    font-style: normal;
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 36px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 88px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
    padding: 24px;
    box-shadow: var(--shadow);
}

.rank-list,
.ranking-list-page {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-list li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

.rank-list li:last-child {
    border-bottom: 0;
}

.rank-number,
.ranking-index {
    color: var(--accent-bright);
    font-weight: 900;
}

.movie-card-horizontal {
    display: flex;
    gap: 14px;
    min-width: 0;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.52);
    transition: background 180ms ease;
}

.movie-card-horizontal:hover {
    background: rgba(30, 41, 59, 0.95);
}

.rank-cover {
    width: 132px;
    min-width: 132px;
    height: 82px;
    border-radius: 12px 0 0 12px;
    box-shadow: none;
}

.rank-cover .play-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.34);
    opacity: 0;
    transition: opacity 180ms ease;
}

.movie-card-horizontal:hover .play-icon {
    opacity: 1;
}

.horizontal-body {
    display: block;
    min-width: 0;
    padding: 9px 12px 8px 0;
}

.horizontal-body strong,
.horizontal-meta,
.horizontal-line {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horizontal-body strong {
    font-size: 15px;
    transition: color 180ms ease;
}

.horizontal-meta,
.horizontal-line {
    color: var(--muted);
    font-size: 12px;
}

.horizontal-line {
    margin-top: 4px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    outline: none;
    padding: 0 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.home-search {
    margin-bottom: 24px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 2fr;
    gap: 16px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.82);
}

.filter-bar label span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 13px;
}

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

.filter-count {
    min-height: 24px;
    margin: 0 0 22px;
    color: var(--muted);
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
    display: none;
}

.page-hero {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}

.simple-hero {
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.22), transparent 34%), linear-gradient(135deg, #0f172a, #020617);
}

.simple-hero .container {
    padding: 76px 0;
}

.image-hero {
    height: 430px;
}

.image-hero .page-hero-copy {
    position: absolute;
    left: 50%;
    bottom: 50px;
    transform: translateX(-50%);
}

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

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

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

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    min-height: 170px;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
}

.category-overview-cover {
    border-radius: 15px;
    box-shadow: none;
}

.category-overview-cover span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--accent-bright);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted-strong);
}

.category-overview-card em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 150px;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.68);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
}

.ranking-index {
    font-size: 22px;
    text-align: center;
}

.ranking-score {
    display: grid;
    gap: 4px;
    color: var(--yellow);
    font-weight: 900;
    text-align: right;
}

.ranking-score em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    font-weight: 500;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    padding: 52px 0 70px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    filter: blur(8px) saturate(1.05);
    transform: scale(1.04);
    opacity: 0.42;
}

.detail-container {
    position: relative;
    z-index: 2;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 32px;
    align-items: center;
}

.player-card {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow);
}

.player-card video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-card video {
    object-fit: contain;
    background: #000000;
}

.player-cover {
    border: 0;
    color: #ffffff;
    background: transparent;
    padding: 0;
    transition: opacity 220ms ease, visibility 220ms ease;
}

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

.player-shade {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.12), transparent 42%), linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.94);
    box-shadow: 0 0 0 12px rgba(6, 182, 212, 0.18);
    transform: translate(-50%, -50%);
    font-size: 34px;
}

.player-card.is-playing .player-cover {
    visibility: hidden;
    opacity: 0;
}

.detail-copy {
    padding: 28px;
    border: 1px solid rgba(51, 65, 85, 0.74);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    font-size: clamp(34px, 4vw, 56px);
}

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

.detail-meta span {
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--muted-strong);
    background: rgba(30, 41, 59, 0.75);
    font-size: 14px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
    gap: 20px;
}

.content-panel,
.info-panel {
    padding: 24px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
}

.content-panel h2,
.info-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-panel p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.8;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0;
}

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

.info-panel dd {
    margin: 0;
    color: var(--muted-strong);
}

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    background: linear-gradient(to bottom, #0f172a, #020617);
}

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

.footer-logo span {
    font-size: 20px;
}

.site-footer h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.site-footer p,
.site-footer a,
.footer-small {
    color: var(--muted);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--accent-bright);
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(51, 65, 85, 0.64);
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .two-columns,
    .detail-layout,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

    .filter-bar,
    .filter-selects {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

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

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

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

    .hero-arrow {
        display: none;
    }

    .section-heading.split,
    .filter-bar,
    .filter-selects,
    .category-overview-grid,
    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .section-heading.split {
        display: grid;
    }

    .category-overview-cover {
        height: 190px;
    }

    .ranking-score {
        text-align: left;
    }

    .rank-cover {
        width: 112px;
        min-width: 112px;
    }

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

    .detail-hero {
        min-height: auto;
        padding-top: 30px;
    }

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

@media (max-width: 460px) {
    .container,
    .nav-container,
    .hero-inner,
    .footer-bottom {
        width: min(100% - 24px, var(--container));
    }

    .movie-grid {
        gap: 14px;
    }

    .rank-cover {
        width: 96px;
        min-width: 96px;
        height: 72px;
    }

    .horizontal-line {
        display: none;
    }
}
