:root {
    --bg: #020617;
    --bg-deep: #000000;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.82);
    --line: #1e293b;
    --line-soft: rgba(30, 41, 59, 0.72);
    --text: #f8fafc;
    --muted: #94a3b8;
    --subtle: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #3b82f6;
    --orange: #fb923c;
    --red: #f87171;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 34rem),
        radial-gradient(circle at 80% 12%, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #020617 52%, #0f172a 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.7);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
}

.brand-mark::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 2px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #ffffff;
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    color: var(--subtle);
    transition: color 0.2s ease;
}

.desktop-nav a {
    position: relative;
    font-weight: 600;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--cyan);
    transition: width 0.24s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: #ffffff;
}

.desktop-nav a:hover::after {
    width: 100%;
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 24vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    overflow: hidden;
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 11px 16px;
}

.header-search button {
    border: 0;
    color: #ffffff;
    background: var(--cyan-deep);
    padding: 11px 16px;
    cursor: pointer;
}

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

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

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line-soft);
    padding: 16px 0 22px;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-weight: 600;
}

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

.hero-stage {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.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;
    opacity: 0.68;
    transform: scale(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 46%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, #020617 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 36px;
    padding: 72px 0 88px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.7);
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--subtle);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: var(--subtle);
    background: rgba(15, 23, 42, 0.66);
    padding: 6px 11px;
    font-size: 13px;
    line-height: 1;
}

.pill.hot {
    border-color: rgba(251, 146, 60, 0.36);
    color: #fed7aa;
    background: rgba(124, 45, 18, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.28);
}

.btn-ghost {
    border-color: var(--line-soft);
    color: var(--text);
    background: rgba(15, 23, 42, 0.6);
}

.hero-panel {
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(16px);
    padding: 16px;
    box-shadow: var(--shadow);
}

.hero-poster {
    overflow: hidden;
    aspect-ratio: 16 / 11;
    border-radius: 18px;
    background: #0f172a;
}

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

.hero-panel h2 {
    margin: 16px 0 8px;
    font-size: 20px;
}

.hero-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

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

.section {
    padding: 70px 0;
}

.section.tight {
    padding-top: 46px;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: "";
    width: 6px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section h2,
.page-hero h1,
.detail h1 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 42px);
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-lead,
.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 24px 48px rgba(8, 145, 178, 0.16);
}

.card-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.86));
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.card-content {
    padding: 16px;
}

.movie-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.card-meta {
    margin-top: 10px;
}

.card-desc {
    display: -webkit-box;
    margin: 12px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(59, 130, 246, 0.1)), rgba(15, 23, 42, 0.86);
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.45);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.82);
    padding: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.45);
}

.rank-no {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 800;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-copy h3 {
    margin: 0;
    font-size: 18px;
}

.rank-copy p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.14), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0));
    padding: 72px 0 44px;
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin: 26px 0 30px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    padding: 13px 15px;
}

.filter-empty {
    display: none;
    border: 1px dashed var(--line-soft);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    padding: 34px;
}

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

.detail {
    padding: 42px 0 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 360px;
    gap: 28px;
    align-items: start;
}

.player-box {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-screen video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.74));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-orb {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 18px 38px rgba(8, 145, 178, 0.38);
}

.play-orb::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 5px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 26px solid #ffffff;
}

.detail-main-card,
.detail-side-card {
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    padding: 22px;
}

.detail-main-card {
    margin-top: 22px;
}

.detail h1 {
    margin-top: 8px;
}

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

.detail-main-card h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-main-card p {
    color: var(--subtle);
    line-height: 1.9;
}

.detail-side-card {
    position: sticky;
    top: 96px;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #0f172a;
    margin-bottom: 18px;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

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

.site-footer {
    border-top: 1px solid var(--line-soft);
    background: rgba(2, 6, 23, 0.72);
    padding: 30px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

@media (max-width: 1100px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .detail-side-card {
        position: static;
        max-width: 560px;
    }

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero,
    .hero-stage {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 56px;
    }

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

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .rank-item .btn {
        grid-column: 2 / -1;
        width: 100%;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .container-custom {
        width: min(100% - 22px, 1280px);
    }

    .brand-text span {
        display: none;
    }

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

    .hero-summary {
        font-size: 16px;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

    .rank-item {
        grid-template-columns: 42px 86px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-copy p {
        display: none;
    }
}
