* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.78);
    --card-solid: #111827;
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.18);
    --rose: #f43f5e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.12), transparent 30rem),
        linear-gradient(135deg, #020617, #0f172a 48%, #020617);
    color: var(--text);
    min-height: 100vh;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--rose));
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.28);
    font-size: 15px;
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 20px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-text em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 3px;
}

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

.nav-link {
    color: var(--muted-strong);
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
    background: var(--accent-soft);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(30, 41, 59, 0.78);
    cursor: pointer;
}

.hero {
    height: 620px;
    position: relative;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    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;
    filter: saturate(1.08) contrast(1.02);
}

.hero-shade,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.25)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 58%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: end;
    gap: 48px;
    padding-bottom: 76px;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(34px, 5.6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.75;
    margin: 0;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.meta-row span {
    border: 1px solid var(--line);
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.66);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

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

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

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f43f5e);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.hero-poster {
    align-self: end;
    justify-self: end;
    width: 320px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    z-index: 8;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    padding: 0;
}

.hero-dot.is-active {
    width: 26px;
    background: #fbbf24;
}

.search-band {
    margin-top: -28px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-band h2,
.section-head h2,
.rank-panel h2,
.detail-article h2 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.search-band p,
.section-head p,
.rank-panel p,
.detail-article p,
.site-footer p,
.category-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.hero-search,
.filter-panel {
    display: flex;
    gap: 12px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.62);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.hero-search button {
    border: 0;
    min-width: 96px;
    border-radius: 14px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
    cursor: pointer;
}

.category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 34px 0 4px;
}

.category-strip a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.58);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
}

.category-strip a:hover {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
}

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

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

.section-link {
    color: #fbbf24;
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(15, 23, 42, 0.92);
}

.poster-link {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4.18;
    overflow: hidden;
    background: #0f172a;
}

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

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

.rating,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.rating {
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    color: #111827;
    background: #fbbf24;
    font-size: 12px;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    color: #fff;
    background: rgba(244, 63, 94, 0.86);
    padding: 6px 10px;
    font-size: 12px;
}

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

.movie-card h3,
.rank-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
    color: #fbbf24;
}

.movie-card p,
.rank-item p {
    min-height: 42px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.meta-row {
    margin-bottom: 10px;
}

.tag-row {
    min-height: 28px;
}

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

.rank-panel,
.detail-article,
.player-box,
.filter-panel,
.category-tile,
.category-info {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

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

.rank-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.32);
    padding: 10px;
}

.rank-num {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 76px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

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

.full-rank {
    margin-top: 24px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
}

.slim-hero .container {
    padding: 78px 0 60px;
}

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

.category-tile {
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.36);
}

.category-tile a {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 220px;
}

.category-covers {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.category-covers img {
    width: 100%;
    height: 100%;
    min-height: 170px;
    object-fit: cover;
    border-radius: 14px;
}

.category-info {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-info h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.category-info span {
    color: #fbbf24;
    margin-top: 20px;
    font-weight: 900;
}

.filter-panel {
    padding: 18px;
    align-items: end;
    margin-bottom: 24px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-weight: 800;
    min-width: 180px;
}

.filter-panel .search-box {
    flex: 1 1 360px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 28px;
}

.empty-state.is-visible {
    display: block;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(1.05);
    transform: scale(1.03);
}

.detail-head {
    position: relative;
    z-index: 2;
    padding: 38px 0 70px;
}

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

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: end;
}

.detail-poster {
    width: 310px;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
}

.detail-copy {
    max-width: 860px;
}

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

.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--muted-strong);
    background: rgba(2, 6, 23, 0.5);
    padding: 10px 12px;
}

.player-section {
    padding-top: 46px;
}

.player-box {
    position: relative;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.player-overlay span {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fbbf24, #f43f5e);
    color: #111827;
    font-size: 32px;
    font-weight: 900;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.32);
}

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

.detail-article {
    padding: 30px;
}

.detail-article h2:not(:first-child) {
    margin-top: 28px;
}

.detail-article p {
    font-size: 17px;
    color: var(--muted-strong);
}

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

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 220px 240px;
    gap: 36px;
    padding: 46px 0;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer a {
    display: block;
    color: var(--muted);
    margin: 8px 0;
}

.site-footer a:hover {
    color: #fbbf24;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .menu-button {
        display: grid;
        place-items: center;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
    }

    .nav-link {
        display: block;
    }

    .hero {
        height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: end;
        padding-bottom: 86px;
    }

    .hero-poster {
        width: 180px;
        justify-self: start;
        transform: rotate(0deg);
    }

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

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

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

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

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

    .detail-poster {
        width: min(280px, 78vw);
    }

    .filter-panel {
        display: grid;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

    .brand-text em {
        display: none;
    }

    .brand-text strong {
        font-size: 17px;
    }

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

    .hero p,
    .page-hero p,
    .detail-copy p {
        font-size: 15px;
    }

    .hero-search {
        display: grid;
    }

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

    .rank-item {
        grid-template-columns: 32px 68px minmax(0, 1fr);
    }

    .rank-thumb {
        width: 68px;
    }
}
