:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.68);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-light: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --rose: #fb7185;
    --amber: #f59e0b;
    --green: #22c55e;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 30rem),
        radial-gradient(circle at 80% 0%, rgba(244, 63, 94, 0.14), transparent 28rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.7;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #00111a;
    background: linear-gradient(135deg, #22d3ee, #a78bfa 55%, #fb7185);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

.brand-name {
    font-size: 18px;
}

.desktop-nav,
.mobile-nav,
.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-link:hover,
.nav-link.is-active,
.footer-links a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.main-wrap,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.9s ease;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 35%, transparent 75%);
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 110px 0 78px;
}

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

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

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-copy p {
    max-width: 620px;
    margin: 18px 0 0;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.ranking-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.56);
    font-size: 13px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn {
    color: #00111a;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.25);
}

.btn-soft {
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.btn:hover,
.btn-soft:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
    cursor: pointer;
    font-size: 22px;
}

.hero-dots {
    position: absolute;
    left: max(16px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    z-index: 6;
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--cyan);
}

.section {
    padding: 64px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p,
.category-tile p,
.detail-section p {
    margin: 8px 0 0;
    color: var(--muted-light);
}

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.46);
    background: rgba(15, 23, 42, 0.88);
}

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

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.ranking-card:hover img,
.mini-card:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
    opacity: 0.9;
}

.poster-play {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    color: #00111a;
    background: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta span {
    padding: 3px 8px;
    font-size: 12px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.category-tile:hover h3,
.ranking-card:hover h3,
.mini-card:hover strong {
    color: var(--cyan);
}

.card-body p {
    min-height: 54px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.card-tags span,
.detail-tags span {
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    padding: 4px 9px;
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.08);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(244, 63, 94, 0.12)),
        rgba(15, 23, 42, 0.78);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -60px;
    top: -70px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.16);
}

.category-tile h3 {
    position: relative;
    margin: 0;
    font-size: 26px;
}

.category-tile p,
.category-tile span {
    position: relative;
}

.category-tile span {
    display: inline-flex;
    margin-top: 20px;
    color: var(--cyan);
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 42px;
    padding: 72px 0 56px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.22), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(251, 113, 133, 0.14), transparent 26rem);
}

.page-hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 800px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-search input,
.filter-selects select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.68);
    outline: none;
    padding: 0 14px;
}

.filter-search input:focus,
.filter-selects select:focus {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.filter-selects {
    display: flex;
    gap: 10px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 72px 112px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.ranking-no {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    font-size: 20px;
    font-weight: 900;
}

.ranking-card img {
    width: 112px;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.ranking-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.ranking-card p {
    margin: 8px 0 0;
    color: var(--muted-light);
}

.ranking-score {
    color: #fef08a;
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
}

.detail-hero {
    padding: 48px 0 0;
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(220px, 330px) 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

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

.detail-title {
    padding-bottom: 18px;
}

.detail-title h1 {
    margin-top: 14px;
}

.detail-title .summary {
    max-width: 760px;
    margin: 20px 0 0;
    color: #e2e8f0;
    font-size: 18px;
}

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

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.14)),
        var(--player-poster);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.38);
    cursor: pointer;
    font-size: 34px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    padding-top: 44px;
}

.detail-section,
.side-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    padding: 24px;
}

.detail-section + .detail-section {
    margin-top: 18px;
}

.detail-section p {
    color: #dbeafe;
    font-size: 16px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-card {
    display: grid;
    grid-template-columns: 62px 1fr auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
}

.mini-card img {
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.25s ease;
}

.mini-info {
    display: grid;
    min-width: 0;
}

.mini-info strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.mini-rank {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

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

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

.hidden-by-filter {
    display: none !important;
}

.empty-state {
    display: none;
    padding: 36px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    color: var(--muted-light);
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 34px 0;
    color: var(--muted-light);
}

.footer-inner p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
}

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

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

    .detail-poster {
        max-width: 360px;
    }

    .ranking-card {
        grid-template-columns: 58px 90px 1fr;
    }

    .ranking-score {
        grid-column: 3;
    }
}

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

    .menu-toggle {
        display: block;
    }

    body.is-menu-open .mobile-nav {
        display: grid;
    }

    .mobile-nav .nav-link {
        width: 100%;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-inner {
        padding: 96px 0 92px;
    }

    .hero-controls {
        right: 16px;
        bottom: 24px;
    }

    .hero-dots {
        left: 16px;
        bottom: 24px;
    }

    .section-heading,
    .filter-panel,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: grid;
    }

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

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

    .card-body {
        padding: 13px;
    }

    .card-body p {
        min-height: auto;
    }

    .ranking-card {
        grid-template-columns: 48px 78px 1fr;
        gap: 12px;
    }

    .ranking-card img {
        width: 78px;
        height: 106px;
        border-radius: 12px;
    }

    .ranking-no {
        width: 42px;
        height: 42px;
    }

    .ranking-card h3 {
        font-size: 18px;
    }
}

@media (max-width: 460px) {
    .main-wrap,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .hero-inner,
    .page-hero-content {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy p,
    .detail-title .summary {
        font-size: 16px;
    }

    .detail-section,
    .side-panel {
        padding: 18px;
    }
}
