:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 54px 54px;
    opacity: 0.22;
}

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

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

img[data-cover].is-broken {
    opacity: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

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

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

.brand-icon {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    color: #fff;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
    font-size: 16px;
}

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

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: rgba(51, 65, 85, 0.78);
    font-size: 22px;
}

.mobile-nav {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 18px;
    display: grid;
    gap: 8px;
}

.mobile-nav a {
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--muted);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 580px;
    margin-bottom: 40px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 44%);
}

.hero-inner {
    position: absolute;
    inset: 0;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: end;
    padding-bottom: 92px;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber-light);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

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

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-link,
.text-button,
.filter-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.filter-bar button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.22);
}

.ghost-button,
.section-link,
.text-button {
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.text-button:hover,
.filter-bar button:hover {
    transform: translateY(-2px);
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #111827, #334155);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
    transform: translateY(18px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.active {
    width: 36px;
    background: var(--amber-light);
}

.search-panel,
.page-hero,
.content-section,
.split-section,
.player-section,
.detail-content,
.breadcrumb {
    margin-top: 36px;
}

.search-panel,
.page-hero,
.ranking-box,
.category-overview-card,
.detail-content article,
.player-section,
.breadcrumb {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 30px;
    align-items: center;
    padding: 30px;
}

.search-panel h2,
.section-heading h2,
.ranking-box h2,
.detail-content h2,
.player-section h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.filter-bar {
    display: flex;
    gap: 12px;
}

.filter-bar input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    color: #fff;
    background: rgba(2, 6, 23, 0.74);
}

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

.compact-heading {
    margin-bottom: 14px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.9));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.12);
}

.card-link {
    display: block;
    height: 100%;
}

.card-cover {
    position: relative;
    overflow: hidden;
    margin: 0;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #0f172a, #334155);
}

.featured-card .card-cover {
    aspect-ratio: 16 / 9;
}

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

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

.card-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 55%);
    opacity: 0.86;
}

.score-badge,
.type-badge,
.card-play {
    position: absolute;
    z-index: 2;
}

.score-badge,
.type-badge {
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(8px);
}

.score-badge {
    left: 10px;
}

.type-badge {
    right: 10px;
    background: rgba(245, 158, 11, 0.88);
}

.card-play {
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.9);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card-body p {
    min-height: 42px;
    margin: 8px 0 12px;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    gap: 8px;
    color: #cbd5e1;
    font-size: 12px;
}

.card-meta span:not(:last-child)::after {
    margin-left: 8px;
    color: #64748b;
    content: "·";
}

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

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.ranking-box {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 22px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a,
.ranking-row a {
    display: grid;
    grid-template-columns: 44px 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.48);
}

.rank-list img,
.ranking-row img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #334155);
}

.rank-no {
    color: var(--amber-light);
    font-size: 18px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: #fde68a;
    font-weight: 900;
}

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

.category-tile,
.category-overview-card a {
    overflow: hidden;
    display: grid;
    gap: 18px;
    height: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.category-covers,
.overview-covers {
    display: flex;
    min-height: 130px;
    align-items: end;
    gap: 8px;
}

.category-covers img,
.overview-covers img {
    width: 19%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #334155);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.category-covers img:nth-child(2),
.overview-covers img:nth-child(2) {
    transform: translateY(-10px);
}

.category-covers img:nth-child(3),
.overview-covers img:nth-child(3) {
    transform: translateY(-20px);
}

.category-tile h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 26px;
}

.category-tile p,
.category-overview-card p,
.page-hero p,
.detail-content p {
    color: var(--muted);
    line-height: 1.8;
}

.page-hero {
    padding: 46px;
    overflow: hidden;
    position: relative;
}

.small-hero h1,
.category-hero h1 {
    max-width: 900px;
    font-size: clamp(36px, 5vw, 62px);
}

.page-hero p {
    max-width: 820px;
    margin: 18px 0 0;
    font-size: 18px;
}

.page-hero .filter-bar {
    max-width: 760px;
    margin-top: 28px;
}

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

.ranking-row {
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
}

.ranking-info {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.ranking-info strong {
    color: #fff;
    font-size: 18px;
}

.ranking-info small {
    color: #cbd5e1;
}

.ranking-info em {
    overflow: hidden;
    display: -webkit-box;
    color: var(--soft);
    font-style: normal;
    line-height: 1.55;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.breadcrumb {
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.breadcrumb a {
    color: #fde68a;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 48%, rgba(2, 6, 23, 0.35) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 62%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    padding: 54px;
}

.detail-poster {
    overflow: hidden;
    margin: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f172a, #334155);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}

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

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.detail-meta {
    margin-top: 22px;
}

.detail-one-line {
    max-width: 820px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.85;
}

.detail-copy .primary-button {
    margin-top: 24px;
}

.player-section {
    padding: 26px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(0, 0, 0, 0.54));
}

.player-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.34);
    font-size: 36px;
    text-indent: 5px;
}

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

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

.detail-content article {
    padding: 28px;
}

.detail-content h2 {
    margin-bottom: 14px;
}

.site-footer {
    margin-top: 70px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border-top: 1px solid var(--line);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 44px 0;
}

.site-footer p,
.site-footer li {
    color: var(--soft);
    line-height: 1.8;
}

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

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: #94a3b8;
    text-align: center;
}

[hidden] {
    display: none !important;
}

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

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

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

    .ranking-box {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-slider {
        min-height: 680px;
        height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        align-items: end;
        gap: 24px;
        padding-top: 110px;
        padding-bottom: 76px;
    }

    .hero-poster {
        width: min(280px, 72vw);
        transform: none;
    }

    .search-panel,
    .detail-inner,
    .detail-content,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar button {
        width: 100%;
    }

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

    .detail-inner {
        padding: 30px;
    }

    .detail-poster {
        width: min(260px, 70vw);
    }
}

@media (max-width: 620px) {
    main,
    .nav-shell,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

    .brand {
        font-size: 20px;
    }

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

    .hero-summary,
    .detail-one-line,
    .page-hero p {
        font-size: 16px;
    }

    .hero-control {
        display: none;
    }

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

    .page-hero,
    .search-panel,
    .player-section,
    .detail-content article {
        padding: 20px;
    }

    .ranking-row a,
    .rank-list a {
        grid-template-columns: 34px 48px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .ranking-info em {
        display: none;
    }
}
