:root {
    color-scheme: light;
    --fog-50: #f8f9fa;
    --fog-100: #f1f3f5;
    --fog-200: #e9ecef;
    --fog-300: #dee2e6;
    --fog-500: #adb5bd;
    --fog-600: #868e96;
    --fog-700: #495057;
    --fog-900: #212529;
    --steel-50: #f0f4f8;
    --steel-100: #d9e2ec;
    --steel-400: #829ab1;
    --steel-500: #627d98;
    --steel-600: #486581;
    --steel-700: #334e68;
    --steel-800: #243b53;
    --accent: #f7c948;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--fog-50);
    color: var(--fog-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--fog-200);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fog-900);
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.site-logo__mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
    color: var(--white);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--fog-700);
    font-weight: 600;
}

.desktop-nav a,
.nav-dropdown > button {
    padding: 8px 0;
    color: var(--fog-700);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
    color: var(--steel-600);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown > button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-dropdown__menu {
    position: absolute;
    top: 100%;
    left: -16px;
    display: grid;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--fog-200);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown__menu a {
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-dropdown__menu a:hover {
    background: var(--fog-100);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select,
.filter-bar input,
.filter-bar select {
    border: 1px solid var(--fog-300);
    border-radius: 12px;
    background: var(--white);
    color: var(--fog-900);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 240px;
    padding: 10px 12px;
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--steel-600);
    color: var(--white);
    cursor: pointer;
}

input:focus,
select:focus {
    border-color: var(--steel-500);
    box-shadow: 0 0 0 4px rgba(72, 101, 129, 0.12);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--fog-200);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: var(--fog-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--fog-200);
    background: var(--white);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav,
.mobile-search {
    display: grid;
    gap: 10px;
    width: min(100% - 32px, 1408px);
    margin: 0 auto;
    padding: 16px 0;
}

.mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--fog-700);
    font-weight: 600;
}

.mobile-panel nav a:hover {
    background: var(--fog-100);
}

.mobile-search {
    grid-template-columns: 1fr auto;
    padding-bottom: 0;
}

.mobile-search input {
    min-width: 0;
    padding: 10px 12px;
}

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

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

.btn-primary {
    background: var(--steel-600);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--steel-700);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.hero-carousel {
    position: relative;
    height: min(780px, 76vh);
    min-height: 560px;
    overflow: hidden;
    background: var(--fog-900);
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s 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-slide__shade {
    background:
        radial-gradient(circle at 70% 35%, rgba(130, 154, 177, 0.35), transparent 32%),
        linear-gradient(90deg, rgba(33, 37, 41, 0.94), rgba(33, 37, 41, 0.62) 48%, rgba(33, 37, 41, 0.2)),
        linear-gradient(0deg, rgba(33, 37, 41, 0.95), rgba(33, 37, 41, 0.1));
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: clamp(80px, 11vw, 150px);
    color: var(--white);
}

.hero-kicker {
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--accent);
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero-slide h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(44px, 7vw, 96px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-slide p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--fog-200);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.rank-row__meta,
.movie-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.rank-row__meta span,
.movie-card__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--fog-100);
    color: var(--fog-700);
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    background: rgba(255, 255, 255, 0.15);
    color: var(--fog-100);
}

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

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1408px) / 2));
    bottom: 36px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-control,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-control {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-size: 30px;
    backdrop-filter: blur(10px);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

.page-section {
    padding: clamp(56px, 8vw, 96px) 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--fog-50), var(--white));
}

.section-dark {
    background: var(--fog-900);
    color: var(--white);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--fog-600);
}

.section-dark .section-heading p {
    color: var(--fog-300);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--steel-600);
    font-weight: 700;
}

.section-dark .section-link {
    color: var(--steel-100);
}

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

.movie-grid--one {
    grid-template-columns: 1fr;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--fog-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--steel-700), var(--fog-900));
}

.movie-card__poster img,
.detail-hero__poster img,
.rank-row__poster img,
.player-cover img,
.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card__poster img {
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.05);
}

.movie-card__badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(33, 37, 41, 0.82);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.movie-card__body {
    padding: 18px;
}

.movie-card__body h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card__body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    margin: 0;
    color: var(--fog-600);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card__tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-card__tags {
    margin-top: 14px;
}

.movie-card__tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--steel-50);
    color: var(--steel-700);
    font-size: 12px;
    font-weight: 700;
}

.movie-card--horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.movie-card--horizontal .movie-card__poster {
    aspect-ratio: auto;
    min-height: 210px;
}

.movie-card--horizontal .movie-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.horizontal-list {
    display: grid;
    gap: 18px;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-tile::after,
.category-overview-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -35px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.category-tile span,
.category-overview-card h2 {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
}

.category-tile small,
.category-overview-card p {
    position: relative;
    z-index: 2;
    color: var(--fog-200);
    line-height: 1.7;
}

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

.category-overview-card {
    min-height: 260px;
    display: grid;
    align-content: space-between;
}

.category-overview-card__links {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-overview-card__links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 100px 0 86px;
    background: linear-gradient(135deg, var(--fog-900), var(--steel-800));
    color: var(--white);
}

.sub-hero--image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(33, 37, 41, 0.94), rgba(33, 37, 41, 0.55)), var(--sub-hero-image);
    background-position: center;
    background-size: cover;
    filter: saturate(1.05);
}

.sub-hero .container-custom {
    position: relative;
    z-index: 2;
}

.sub-hero p {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 800;
}

.sub-hero h1 {
    max-width: 900px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.sub-hero span {
    display: block;
    max-width: 780px;
    color: var(--fog-200);
    font-size: 18px;
    line-height: 1.8;
}

.sub-hero-actions {
    margin-top: 28px;
}

.filter-bar,
.search-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
}

.filter-bar {
    grid-template-columns: 1fr 220px;
}

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

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 68px 96px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--fog-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.section-dark .rank-row {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.rank-row__num {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #f0b429);
    color: var(--fog-900);
    font-weight: 900;
}

.rank-row__poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background: var(--steel-800);
}

.rank-row__body h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-row__body p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    color: var(--fog-600);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.section-dark .rank-row__body p {
    color: var(--fog-300);
}

.rank-sidebar {
    position: sticky;
    top: 96px;
}

.rank-sidebar h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.detail-hero {
    padding: 70px 0;
    background:
        radial-gradient(circle at 75% 0%, rgba(130, 154, 177, 0.28), transparent 34%),
        linear-gradient(135deg, var(--fog-900), var(--steel-800));
    color: var(--white);
}

.detail-hero__inner {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    gap: clamp(28px, 6vw, 72px);
    align-items: center;
}

.detail-hero__poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    background: var(--steel-800);
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.38);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--fog-300);
    font-size: 14px;
}

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

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

.detail-hero p {
    max-width: 820px;
    margin: 0 0 24px;
    color: var(--fog-200);
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span {
    background: rgba(255, 255, 255, 0.13);
    color: var(--white);
}

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

.detail-tags span {
    background: rgba(255, 255, 255, 0.14);
    color: var(--steel-100);
}

.player-section {
    margin-top: 56px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow-lg);
}

.video-player {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000000;
    pointer-events: auto;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    background: #000000;
    color: var(--white);
    cursor: pointer;
    pointer-events: auto;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.24));
}

.player-cover img {
    position: absolute;
    inset: 0;
    opacity: 0.75;
}

.player-cover strong,
.play-orb {
    position: relative;
    z-index: 3;
}

.play-orb {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--steel-600);
    color: var(--white);
    font-size: 32px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.video-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    padding-top: 54px;
}

.detail-article {
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--fog-200);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-article h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 28px;
    color: var(--fog-700);
    font-size: 17px;
    line-height: 1.95;
}

.detail-article dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.detail-article dl div {
    padding: 14px;
    border-radius: 14px;
    background: var(--fog-50);
}

.detail-article dt {
    margin-bottom: 6px;
    color: var(--fog-600);
    font-size: 13px;
    font-weight: 800;
}

.detail-article dd {
    margin: 0;
    color: var(--fog-900);
    font-weight: 700;
}

.site-footer {
    margin-top: 70px;
    padding: 54px 0;
    background: var(--fog-900);
    color: var(--fog-300);
}

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

.site-logo--footer {
    color: var(--white);
}

.site-footer p {
    max-width: 560px;
    margin: 18px 0 0;
    color: var(--fog-400);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 18px;
}

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

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

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

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

    .header-search {
        margin-left: auto;
    }

    .mobile-toggle {
        display: block;
    }

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

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

@media (max-width: 900px) {
    .header-search {
        display: none;
    }

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

    .hero-slide__content {
        padding-bottom: 120px;
    }

    .hero-controls {
        left: 16px;
        right: auto;
    }

    .movie-grid--three,
    .movie-grid--four,
    .category-overview-grid,
    .rank-layout,
    .footer-grid,
    .detail-hero__inner {
        grid-template-columns: 1fr;
    }

    .rank-sidebar {
        position: static;
    }

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

    .detail-hero__poster {
        max-width: 340px;
    }
}

@media (max-width: 640px) {
    .site-logo {
        font-size: 18px;
    }

    .hero-slide h1,
    .sub-hero h1,
    .detail-hero h1 {
        letter-spacing: -0.04em;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .movie-card--horizontal .movie-card__poster {
        aspect-ratio: 2 / 3;
    }

    .rank-row {
        grid-template-columns: 52px 78px 1fr;
        gap: 12px;
        padding: 10px;
    }

    .rank-row__body p,
    .rank-row__meta span:nth-child(3) {
        display: none;
    }

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

    .video-shell {
        border-radius: 16px;
    }
}
