:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --blue: #38bdf8;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 1.25rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.15), transparent 30rem),
        radial-gradient(circle at 82% 20%, rgba(56, 189, 248, 0.13), transparent 28rem),
        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;
    -webkit-font-smoothing: antialiased;
}

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

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

img.is-hidden {
    opacity: 0;
}

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

.header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.brand-text {
    font-size: clamp(1.08rem, 2vw, 1.55rem);
}

.brand-icon,
.section-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
    font-size: 0.9rem;
}

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

.nav-link,
.mobile-nav-link {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fff;
}

.menu-toggle {
    display: none;
    color: #fff;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    padding: 0.55rem 0.75rem;
    font-size: 1.1rem;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.open {
    display: grid;
    gap: 0.4rem;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.8rem;
    color: var(--muted);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(51, 65, 85, 0.78);
}

main {
    min-height: 60vh;
}

.container {
    width: min(80rem, calc(100% - 2rem));
    margin: 0 auto;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 33%, transparent 70%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 5rem 0 5.5rem;
}

.hero-copy {
    max-width: 48rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fbbf24;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero h1,
.hero h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.3rem, 7vw, 5.2rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 1.5rem;
    color: #d1d5db;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.85;
}

.hero-meta,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    color: var(--muted);
}

.hero-meta span,
.detail-meta span {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.btn,
.search-box button,
.filter-chips button,
.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    padding: 0.82rem 1.25rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary,
.search-box button,
.player-start {
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

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

.btn:hover,
.search-box button:hover,
.filter-chips button:hover,
.player-start:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    backdrop-filter: blur(10px);
    font-size: 1.4rem;
}

.hero-arrow.prev {
    left: 1rem;
}

.hero-arrow.next {
    right: 1rem;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.hero-dots button {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 2rem;
    background: var(--accent);
}

.hero-search-wrap {
    position: relative;
    z-index: 8;
    margin-top: -2rem;
}

.search-box {
    width: min(54rem, 100%);
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-box input {
    flex: 1;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font-size: 1rem;
    padding: 0 0.6rem;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.page-hero,
.detail-hero {
    padding: 4.5rem 0 2rem;
}

.page-kicker {
    color: #fbbf24;
    font-weight: 800;
    margin-bottom: 0.7rem;
}

.page-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.page-desc {
    max-width: 52rem;
    margin: 1rem 0 0;
    color: var(--muted);
    line-height: 1.85;
    font-size: 1.05rem;
}

.content-space {
    padding: 3rem 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 0.25rem 0 0;
    color: var(--soft);
}

.section-block {
    margin-top: 4rem;
}

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

.movie-grid.large {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.1rem;
}

.movie-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(30, 41, 59, 0.78);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #020617);
}

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

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

.score-badge,
.play-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.78rem;
}

.score-badge {
    top: 0.55rem;
    left: 0.55rem;
    padding: 0.28rem 0.52rem;
    background: rgba(245, 158, 11, 0.94);
    color: #fff;
}

.play-badge {
    right: 0.55rem;
    bottom: 0.55rem;
    padding: 0.35rem 0.58rem;
    background: rgba(2, 6, 23, 0.74);
    color: #fff;
    backdrop-filter: blur(8px);
}

.movie-card-body {
    padding: 0.85rem;
}

.movie-meta {
    gap: 0.42rem;
    font-size: 0.78rem;
    color: var(--soft);
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 0.42rem;
    color: #64748b;
}

.movie-card h3 {
    margin: 0.45rem 0 0.45rem;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0 0 0.7rem;
    color: var(--soft);
    font-size: 0.86rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

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

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

.category-card {
    min-height: 12rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1.25rem;
    padding: 1.35rem;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.24), transparent 12rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.52);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
    font-weight: 900;
}

.category-card p {
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
}

.category-card span {
    margin-top: 1.2rem;
    color: #fbbf24;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    gap: 1rem;
    margin: 2rem 0 2.4rem;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.filter-chips button {
    background: rgba(30, 41, 59, 0.74);
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 0.55rem 0.9rem;
}

.filter-chips button:hover {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.55);
}

.empty-state {
    display: none;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.66);
}

.empty-state.show {
    display: block;
}

.ranking-list {
    display: grid;
    gap: 1rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 5rem 8rem 1fr auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.5);
}

.rank-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(249, 115, 22, 0.92));
    font-weight: 950;
    font-size: 1.2rem;
}

.rank-cover {
    aspect-ratio: 2 / 3;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #0f172a;
}

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

.rank-info h2,
.rank-info h3 {
    margin: 0 0 0.4rem;
    font-size: 1.22rem;
    font-weight: 900;
}

.rank-info p {
    margin: 0.45rem 0 0;
    color: var(--soft);
    line-height: 1.7;
}

.rank-score {
    color: #fbbf24;
    font-size: 1.4rem;
    font-weight: 950;
    white-space: nowrap;
}

.detail-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
    align-items: start;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--soft);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-title {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-lead {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
    margin: 1.2rem 0 0;
}

.detail-poster {
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.player-card,
.text-card {
    border: 1px solid var(--line);
    border-radius: 1.3rem;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.22), transparent 18rem),
        rgba(0, 0, 0, 0.46);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    font-size: 1rem;
}

.text-card {
    padding: 1.4rem;
}

.text-card h2 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
    font-weight: 900;
}

.text-card p {
    color: var(--muted);
    line-height: 1.95;
    margin: 0 0 1rem;
}

.info-list {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.38);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
}

.info-list strong {
    color: #fff;
}

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

.footer-grid {
    width: min(80rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-main p,
.footer-grid a {
    color: var(--soft);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1rem;
}

.footer-grid a {
    display: block;
    margin: 0.35rem 0;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    color: var(--soft);
    text-align: center;
    padding: 1.2rem;
    font-size: 0.92rem;
}

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

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

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

    .detail-poster {
        max-width: 24rem;
    }
}

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

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

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding: 4rem 0 5rem;
    }

    .hero-arrow {
        display: none;
    }

    .search-box {
        flex-direction: column;
        border-radius: 1.1rem;
    }

    .search-box input {
        min-height: 2.8rem;
    }

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

    .rank-item {
        grid-template-columns: 3.5rem 5.5rem 1fr;
    }

    .rank-score {
        grid-column: 3;
        font-size: 1rem;
    }

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

@media (max-width: 520px) {
    .container,
    .footer-grid {
        width: min(100% - 1rem, 80rem);
    }

    .header-inner {
        padding-inline: 0.75rem;
    }

    .brand-text {
        font-size: 1rem;
    }

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

    .movie-grid,
    .movie-grid.large {
        gap: 0.7rem;
    }

    .movie-card-body {
        padding: 0.7rem;
    }

    .tag-row span:nth-child(n+3) {
        display: none;
    }
}
