:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.74);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --brand: #22d3ee;
    --brand-2: #60a5fa;
    --gold: #facc15;
    --danger: #fb7185;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 28rem),
        linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
}

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

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

button,
input {
    font: inherit;
}

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

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #001018;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand);
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.22);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
}

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

main,
.page-shell,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 620px;
    padding: 42px 0 24px;
}

.hero-slider {
    position: relative;
    min-height: 520px;
    border-radius: 34px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 42px;
    align-items: center;
    padding: 62px;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.12)),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.05);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.detail-one-line {
    color: var(--muted-strong);
    font-size: 17px;
    max-width: 760px;
}

.hero-meta,
.detail-meta,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.hero-meta span,
.detail-meta span,
.meta-line span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.54);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.hero-actions,
.hero-control-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #001018;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 35px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
}

.hero-poster {
    justify-self: end;
    width: min(340px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-control-row {
    justify-content: space-between;
    margin-top: 18px;
}

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

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

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

.hero-search,
.inline-search {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: min(100%, 430px);
}

.hero-search input,
.inline-search input {
    width: 100%;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    padding: 0 18px;
}

.hero-search input:focus,
.inline-search input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.hero-search button {
    height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 800;
    color: #001018;
    background: var(--brand);
}

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

.hero-category-strip a,
.section-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.54);
}

.hero-category-strip a:hover,
.section-link:hover {
    color: var(--brand);
    border-color: var(--line-strong);
}

.content-section {
    padding: 34px 0;
}

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

.section-heading h2,
.article-card h2,
.site-footer h2,
.category-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-heading p,
.category-panel p,
.article-card p,
.site-footer p {
    color: var(--muted);
    margin: 8px 0 0;
}

.movie-grid,
.ranking-grid,
.category-grid,
.category-panels {
    display: grid;
    gap: 18px;
}

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

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

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

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

.category-tile,
.category-panel,
.article-card,
.movie-card,
.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.8));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.category-tile {
    min-height: 150px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-panel:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    color: var(--muted);
    margin: 10px 0 0;
    font-size: 14px;
}

.movie-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

.poster-link img {
    transition: transform 0.45s ease;
}

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

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

.movie-card h3 {
    margin: 8px 0 6px;
    font-size: 16px;
    line-height: 1.28;
}

.movie-card h3 a:hover {
    color: var(--brand);
}

.movie-card p {
    margin: 0;
    min-height: 44px;
    color: var(--muted);
    font-size: 13px;
}

.meta-line {
    gap: 6px;
    margin: 0;
}

.meta-line span {
    padding: 3px 7px;
    font-size: 11px;
}

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

.tag-row span {
    color: var(--brand);
    font-size: 12px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.16);
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 150px;
}

.movie-card-compact .poster-link {
    aspect-ratio: auto;
    height: 100%;
}

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

.movie-card-compact p {
    min-height: 0;
}

.rank-num {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #001018;
    font-weight: 900;
    background: var(--gold);
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.24);
}

.page-shell {
    padding: 42px 0 72px;
}

.page-hero {
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 28rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.88));
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.small-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.inline-search {
    margin-top: 24px;
}

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

.category-panel {
    padding: 24px;
}

.category-panel-main {
    display: block;
}

.mini-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.mini-list a {
    color: var(--muted-strong);
    font-size: 14px;
}

.mini-list a:hover {
    color: var(--brand);
}

.detail-shell {
    padding: 34px 0 74px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 34px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 28rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.86));
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section {
    margin-top: 28px;
}

.player-card {
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 14rem),
        rgba(2, 6, 23, 0.48);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 46px rgba(34, 211, 238, 0.3);
}

.play-icon::before {
    content: "";
    margin-left: 6px;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #001018;
}

.player-overlay strong {
    font-size: 18px;
}

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

.article-card {
    padding: 26px;
}

.related-section {
    margin-top: 8px;
}

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

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.8fr;
    gap: 32px;
}

.footer-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--brand);
}

.searchable-card.is-hidden {
    display: none;
}

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

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

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

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px;
    }

    .hero-poster {
        display: none;
    }

    .hero-slider {
        min-height: 540px;
    }

    .section-heading,
    .hero-control-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    main,
    .page-shell,
    .detail-shell,
    .nav-shell {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        min-height: auto;
        padding-top: 20px;
    }

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

    .hero-slide,
    .page-hero,
    .detail-hero {
        padding: 24px;
    }

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

    .movie-card-compact {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .hero-search {
        min-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search button {
        width: 100%;
    }
}
