:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.86);
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #94a3b8;
    --subtle: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.site-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.18), transparent 28rem),
        radial-gradient(circle at 88% 4%, rgba(14, 165, 233, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

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

.nav-link {
    color: #d1d5db;
    font-size: 15px;
    font-weight: 650;
    transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-light);
}

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

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #e5e7eb;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px 18px;
}

.mobile-nav.is-open {
    display: flex;
}

.mobile-nav .nav-link {
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    display: none;
    min-height: 72vh;
    position: relative;
    align-items: center;
}

.hero-slide.is-active {
    display: flex;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: brightness(0.42) blur(2px);
    transform: scale(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 47%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, transparent 32%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.62fr);
    gap: 48px;
    align-items: center;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 74px 0 88px;
}

.hero-kicker {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--amber-light);
    font-size: 14px;
    font-weight: 750;
}

.hero-title {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(42px, 6.2vw, 78px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-movie {
    margin: 0 0 18px;
    color: #f8fafc;
    font-size: clamp(25px, 3.1vw, 40px);
    font-weight: 850;
}

.hero-desc {
    max-width: 760px;
    margin: 0 0 28px;
    color: #dbe4ef;
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.75;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 800;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.btn-line {
    border: 1px solid rgba(245, 158, 11, 0.54);
    color: var(--amber-light);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-line:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transform: scale(1.01);
}

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

.hero-dot {
    width: 30px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--amber-light);
}

.section,
.page-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.section {
    padding: 76px 0;
}

.section-muted {
    width: 100%;
    background: rgba(15, 23, 42, 0.52);
}

.section-muted > .section {
    padding-top: 76px;
    padding-bottom: 76px;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--amber-light);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.section-title,
.page-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc,
.page-desc {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.82) 100%);
    opacity: 0.7;
}

.year-badge,
.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 850;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.94);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 220ms ease, transform 220ms ease;
}

.movie-card:hover .play-badge,
.related-card:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3,
.rank-info h3,
.related-title {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-card-body h3 a:hover,
.rank-info h3 a:hover,
.related-title:hover {
    color: var(--amber-light);
}

.movie-card-body p,
.rank-info p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: #cbd5e1;
    font-size: 12px;
}

.movie-meta-line span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    padding: 4px 9px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.detail-tag {
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.82));
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.category-tile::before {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.18);
}

.category-tile h3 {
    position: relative;
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    position: relative;
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.65;
}

.category-tile span {
    position: relative;
    color: var(--amber-light);
    font-weight: 850;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin: 26px 0 28px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    padding: 16px;
}

.search-box {
    display: flex;
    flex: 1 1 320px;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.42);
    padding: 0 18px;
}

.search-box span {
    color: var(--amber-light);
    font-weight: 850;
}

.search-box input,
.filter-select {
    min-height: 48px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    font: inherit;
}

.search-box input {
    width: 100%;
}

.search-box input::placeholder {
    color: #64748b;
}

.filter-select {
    min-width: 150px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.42);
    padding: 0 16px;
}

.empty-state {
    margin: 20px 0;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
    padding: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 84px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.68);
    padding: 12px 16px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.38);
}

.rank-index {
    color: var(--amber-light);
    font-size: 28px;
    font-weight: 950;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
    background: #111827;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

.rank-action {
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber-light);
    padding: 10px 16px;
    font-weight: 850;
}

.page-hero {
    padding: 68px 0 34px;
}

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

.breadcrumb a {
    color: #e2e8f0;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    color: #ffffff;
    cursor: pointer;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.94);
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.32);
    font-size: 34px;
    transform: translateX(3px);
}

.detail-card,
.detail-content,
.related-section {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
}

.detail-card {
    overflow: hidden;
}

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

.detail-card-body,
.detail-content,
.related-section {
    padding: 24px;
}

.detail-card h2,
.detail-content h2,
.related-section h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.detail-card p,
.detail-content p {
    color: var(--subtle);
    line-height: 1.86;
}

.detail-meta {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.detail-meta div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    color: #dbeafe;
}

.detail-meta dt {
    color: var(--muted);
}

.detail-main-column {
    display: grid;
    gap: 24px;
}

.detail-content h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.14;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.related-card {
    display: block;
}

.related-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    background: #111827;
}

.related-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

.related-title {
    display: block;
    margin-top: 10px;
    font-size: 15px;
}

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

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

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

    .detail-card {
        display: grid;
        grid-template-columns: 220px 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 54px;
    }

    .hero-poster {
        max-width: 280px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 48px 64px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

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

@media (max-width: 560px) {
    .site-nav,
    .section,
    .page-main {
        width: calc(100% - 28px);
        padding-left: 0;
        padding-right: 0;
    }

    .site-logo {
        font-size: 18px;
    }

    .hero-slider,
    .hero-slide {
        min-height: 76vh;
    }

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

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

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

    .filter-panel {
        border-radius: 20px;
    }

    .filter-select {
        width: 100%;
    }

    .detail-card {
        display: block;
    }

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