:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --card: rgba(15, 23, 42, 0.82);
    --line: rgba(34, 211, 238, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --cyan-deep: #0891b2;
    --amber: #fbbf24;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.18), transparent 36rem),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 38rem),
        linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #06202a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
    font-size: 18px;
    font-weight: 900;
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--soft);
    font-size: 15px;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 8px;
    background: var(--cyan);
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--line);
    color: var(--soft);
}

.mobile-link.active,
.mobile-link:hover {
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.18);
}

main {
    min-height: 70vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 26px;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.82));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(34, 211, 238, 0.30), transparent 24rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.72));
    z-index: 0;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    font-size: 14px;
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.gradient-text {
    background: linear-gradient(90deg, var(--text), var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 700px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.9;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.hero-meta span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(148, 163, 184, 0.20);
    font-size: 13px;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #04111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.20);
}

.btn-secondary {
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(34, 211, 238, 0.26);
}

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

.hero-poster-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-poster {
    position: relative;
    width: min(420px, 100%);
    aspect-ratio: 2 / 2.85;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

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

.hero-rating {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    padding: 10px 13px;
    border-radius: 16px;
    color: var(--amber);
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(251, 191, 36, 0.32);
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 58px;
    bottom: 36px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-title,
.page-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
    margin: 12px 0 0;
    max-width: 850px;
    color: var(--muted);
    line-height: 1.9;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.70));
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
}

.category-card::before {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.14);
    filter: blur(8px);
}

.category-card h2 {
    position: relative;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.category-card span {
    position: relative;
    color: var(--cyan);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid rgba(34, 211, 238, 0.16);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.20);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.08);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.88));
    opacity: 0.92;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 999px;
    color: #04111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 13px;
    font-weight: 800;
}

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

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h2 a:hover {
    color: var(--cyan);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.10);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 12px;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.card-foot strong {
    color: var(--amber);
    font-size: 18px;
}

.card-foot a {
    color: var(--cyan);
    font-weight: 800;
    font-size: 13px;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 78px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(34, 211, 238, 0.15);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #04111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.rank-cover {
    width: 78px;
    aspect-ratio: 2 / 2.85;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 17px;
}

.rank-info h2 a:hover {
    color: var(--cyan);
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.rank-score {
    color: var(--amber);
    font-weight: 900;
    font-size: 20px;
}

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

.page-hero-inner {
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.62));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
    margin-top: 22px;
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--soft);
    font-weight: 700;
}

.search-box input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.50);
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
}

.search-box input:focus,
.filter-controls select:focus {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 10px;
}

.no-results {
    display: none;
    padding: 32px;
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
}

.no-results.show {
    display: block;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.player-card,
.detail-panel,
.info-card {
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(34, 211, 238, 0.16);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.player-card {
    overflow: hidden;
}

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

.player-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-button {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    color: var(--text);
    border: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.78)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

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

.player-button strong {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #04111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.26);
    font-size: 28px;
}

.player-button span {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
    border: 1px solid rgba(34, 211, 238, 0.30);
    font-weight: 800;
}

.detail-panel {
    padding: 28px;
    margin-top: 24px;
}

.detail-panel h2,
.info-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.detail-panel p {
    color: var(--soft);
    line-height: 2;
    text-align: justify;
}

.info-card {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.info-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.info-list div {
    display: grid;
    gap: 5px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

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

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h2 {
    font-size: 18px;
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

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

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 26px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.hidden-card {
    display: none !important;
}

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

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

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

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

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

    .info-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px;
    }

    .hero-shell {
        min-height: 780px;
    }

    .hero-poster {
        width: min(280px, 74vw);
    }

    .hero-dots {
        left: 34px;
        bottom: 26px;
    }

    .section-head,
    .filter-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

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

    .rank-layout {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 66px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .container,
    .section,
    .hero,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-text small {
        display: none;
    }

    .hero-shell {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-slide {
        padding: 26px;
    }

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

    .movie-grid,
    .related-grid {
        gap: 14px;
    }

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

    .movie-card p {
        display: none;
    }

    .page-hero-inner,
    .detail-panel,
    .info-card {
        padding: 22px;
        border-radius: 24px;
    }
}
