:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c30;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(30, 41, 59, 0.9);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-soft: rgba(16, 185, 129, 0.16);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at 18% 8%, rgba(16, 185, 129, 0.18), transparent 30rem),
        radial-gradient(circle at 92% 18%, rgba(59, 130, 246, 0.14), transparent 28rem),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    overflow: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    color: #04111f;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.62);
    color: var(--text);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 999px;
}

.hero {
    position: relative;
    min-height: 720px;
    padding: 56px 24px 32px;
}

.hero-slider {
    position: relative;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 44px;
    padding: 74px;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.46;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.76) 45%, rgba(15, 23, 42, 0.38)),
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.32), transparent 28rem);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.detail-main h1,
.inner-hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

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

.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
    color: var(--muted);
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.primary-button,
.ghost-button,
.text-button,
.section-link,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.home-search button {
    padding: 0 22px;
    color: #04111f;
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.28);
}

.ghost-button {
    padding: 0 22px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(226, 232, 240, 0.18);
}

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

.hero-poster {
    align-self: stretch;
    min-height: 480px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(2, 6, 23, 0.54);
    border: 1px solid rgba(226, 232, 240, 0.18);
}

.hero-poster img,
.detail-cover img,
.category-cover img,
.ranking-poster img,
.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.8);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 58px;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--text);
    background: transparent;
}

.hero-arrow {
    width: 36px;
    height: 36px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
}

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

.quick-search {
    padding: 0 24px 34px;
}

.quick-search-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.56);
    box-shadow: var(--shadow);
}

.quick-search h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 36px);
}

.home-search {
    width: min(520px, 100%);
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    outline: none;
    padding: 0 16px;
}

.page-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.dark-section {
    max-width: none;
    background: rgba(15, 23, 42, 0.54);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dark-section > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-head.compact {
    align-items: center;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-head p,
.inner-hero p,
.category-card p,
.content-card p,
.ranking-info p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.section-link,
.text-button {
    padding: 0 18px;
    border: 1px solid rgba(16, 185, 129, 0.34);
    color: var(--accent);
    background: var(--accent-soft);
}

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

.category-pill {
    min-height: 128px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.72)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 18rem);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-pill:hover,
.movie-card:hover,
.category-card:hover,
.ranking-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.38);
}

.category-pill span {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 800;
}

.category-pill small {
    color: var(--subtle);
    line-height: 1.6;
}

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

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

.horizontal-wrap {
    position: relative;
}

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 310px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
    display: none;
}

.scroll-button {
    position: absolute;
    top: 42%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    font-size: 30px;
}

.scroll-button.left {
    left: -12px;
}

.scroll-button.right {
    right: -12px;
}

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.92);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(transparent, rgba(2, 6, 23, 0.82));
}

.movie-heat {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.86);
    color: #04111f;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-category {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3,
.ranking-info h2,
.category-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-meta,
.detail-meta {
    color: var(--subtle);
    font-size: 14px;
}

.movie-summary {
    min-height: 72px;
    margin: 10px 0 14px;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.content-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.56);
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.58);
}

.rank-no {
    color: var(--accent);
    font-weight: 900;
}

.rank-item a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inner-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 24px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: center;
}

.inner-hero > div {
    padding: 38px;
    border-radius: 34px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.56)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.2), transparent 22rem);
    box-shadow: var(--shadow);
}

.category-hero img,
.inner-hero > img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.category-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.9);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.12);
    font-size: 13px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.58);
}

.search-field span {
    display: block;
    margin-bottom: 8px;
    color: var(--subtle);
    font-size: 13px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 78px 110px minmax(0, 1fr) 90px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--bg-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-number {
    color: var(--accent);
    font-size: 26px;
    font-weight: 900;
}

.ranking-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-heat {
    text-align: center;
    color: var(--subtle);
}

.ranking-heat strong {
    display: block;
    color: var(--text);
    font-size: 28px;
}

.detail-hero {
    position: relative;
    padding: 80px 24px 34px;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.36;
    filter: blur(18px);
    transform: scale(1.04);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), var(--bg));
}

.detail-layout {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.2);
    box-shadow: var(--shadow);
}

.detail-main {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
}

.detail-one-line {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

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

.player-stage {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-control {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.24), rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.76));
    font-size: 18px;
    font-weight: 900;
}

.play-circle {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    color: #04111f;
    box-shadow: 0 18px 44px rgba(16, 185, 129, 0.36);
}

.player-stage.is-playing .play-control {
    display: none;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 4;
    margin: 0;
    color: #fecaca;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
}

[data-movie-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .hero-slide,
    .detail-layout,
    .inner-hero,
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding: 44px;
    }

    .hero-poster {
        min-height: 360px;
        max-width: 360px;
    }

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

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .menu-button {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        border: 1px solid var(--line);
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero {
        min-height: auto;
        padding: 26px 14px 24px;
    }

    .hero-slider {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px;
        align-content: start;
        gap: 28px;
    }

    .hero-poster {
        width: 100%;
        min-height: 300px;
        max-width: none;
    }

    .hero-controls {
        bottom: 36px;
    }

    .quick-search,
    .page-section,
    .inner-hero,
    .detail-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .quick-search-inner,
    .footer-inner,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .home-search,
    .filter-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

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

    .movie-card h3 {
        font-size: 17px;
    }

    .movie-summary {
        min-height: auto;
        -webkit-line-clamp: 2;
    }

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

    .ranking-poster,
    .category-cover {
        width: 100%;
        max-height: 380px;
    }

    .detail-layout {
        gap: 20px;
    }

    .detail-cover {
        width: min(280px, 100%);
        margin: 0 auto;
    }

    .detail-main {
        padding: 24px;
    }

    .player-stage {
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    .category-grid,
    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .detail-main h1,
    .inner-hero h1 {
        font-size: 36px;
    }

    .hero-desc,
    .detail-one-line {
        font-size: 16px;
    }
}
