:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --panel-border: rgba(148, 163, 184, 0.16);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #3b82f6;
    --slate: #0f172a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
        radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.16), transparent 30rem),
        var(--page-bg);
    color: var(--text-main);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.page-main {
    min-height: 80vh;
    padding-top: 76px;
}

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

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111f;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border-radius: 999px;
    padding: 0 14px;
    color: var(--text-soft);
    font-size: 14px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(34, 211, 238, 0.12);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #fff;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(10px) saturate(1.08);
    opacity: 0.34;
    transform: scale(1.05);
}

.hero-backdrop,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.9)),
        radial-gradient(circle at 62% 42%, rgba(34, 211, 238, 0.28), transparent 22rem);
}

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

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
    padding: 7px 13px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 24px 0 14px;
    max-width: 900px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    background: linear-gradient(100deg, #f8fafc, #67e8f9 48%, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.12;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    padding: 5px 10px;
    color: var(--text-soft);
    font-size: 12px;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
    color: #fff;
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.3);
}

.btn-secondary {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.78);
    color: var(--text-main);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.18);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.65);
    box-shadow: var(--shadow);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 24px -28px 24px;
    height: 56px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.45);
    filter: blur(32px);
}

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

.hero-controls {
    position: absolute;
    z-index: 8;
    right: 0;
    bottom: 34px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 28px;
    height: 8px;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.active {
    width: 46px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    opacity: 1;
}

.glass-effect {
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.home-search-wrap {
    margin-top: -46px;
    position: relative;
    z-index: 12;
}

.search-panel {
    border-radius: var(--radius);
    padding: 20px;
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: var(--cyan);
    font-weight: 800;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-row input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    background: rgba(2, 6, 23, 0.66);
    padding: 13px 15px;
    color: #fff;
}

.search-row input:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.search-row button {
    border: 0;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.13);
    color: var(--cyan);
    cursor: pointer;
    padding: 0 16px;
    font-weight: 800;
}

.empty-result {
    margin: 12px 0 0;
    color: var(--text-muted);
}

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

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

.section-heading h2 {
    margin: 12px 0 6px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.section-heading p {
    max-width: 740px;
    margin: 0;
    color: var(--text-muted);
}

.section-link {
    flex: 0 0 auto;
    color: var(--cyan);
    font-weight: 800;
}

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

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

.category-page-grid {
    margin-top: 24px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
    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.38);
    box-shadow: 0 24px 54px rgba(8, 145, 178, 0.16);
}

.movie-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.8);
}

.video-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.movie-card:hover .video-card-thumb,
.category-tile:hover img,
.category-card:hover img,
.ranking-item:hover img {
    transform: scale(1.08);
}

.thumb-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.78));
}

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.92);
    padding: 4px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #020617;
    font-size: 13px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

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

.movie-card h3,
.ranking-item h3,
.category-card h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover,
.category-card h2 a:hover {
    color: var(--cyan);
}

.movie-card p,
.ranking-item p,
.category-card p {
    margin: 0 0 14px;
    color: var(--text-muted);
}

.movie-meta {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: #0f172a;
    padding: 20px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-tile span {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.93));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-tile strong {
    margin-top: 58px;
    font-size: 24px;
}

.category-tile em {
    margin-top: 8px;
    color: var(--text-soft);
    font-style: normal;
    font-size: 14px;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 54px 92px 1fr;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    padding: 12px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.35);
}

.ranking-number {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.16));
    color: var(--cyan);
    font-weight: 900;
}

.ranking-poster {
    overflow: hidden;
    border-radius: 14px;
}

.ranking-poster img {
    width: 92px;
    height: 74px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 26rem),
        linear-gradient(180deg, #0f172a, #020617);
}

.compact-hero {
    padding: 84px 0 58px;
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.06;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--text-soft);
    font-size: 18px;
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius);
}

.category-card-cover {
    display: block;
    overflow: hidden;
}

.category-card-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card-body {
    padding: 20px;
}

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

.category-mini-links a {
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.09);
    padding: 5px 10px;
    color: var(--text-soft);
    font-size: 13px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    opacity: 0.26;
    transform: scale(1.06);
}

.detail-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
    padding: 66px 0;
}

.detail-cover-wrap {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

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

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

.detail-info h1 {
    margin: 18px 0 12px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 860px;
    color: var(--text-soft);
    font-size: 18px;
}

.detail-tags {
    margin-top: 20px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-start span {
    display: inline-grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    font-size: 30px;
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.35);
}

.player-box.is-playing .player-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 24px;
}

.content-panel {
    border-radius: var(--radius);
    padding: 24px;
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(2, 6, 23, 0.74);
    padding: 38px 0 22px;
}

.footer-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

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

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

.footer-bottom {
    margin-top: 24px;
    color: #64748b;
    font-size: 13px;
}

[hidden],
.is-hidden {
    display: none !important;
}

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

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

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

    .hero-poster,
    .detail-cover-wrap {
        max-width: 380px;
    }
}

@media (max-width: 760px) {
    .page-main {
        padding-top: 66px;
    }

    .header-inner {
        min-height: 66px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

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

    .hero-content {
        gap: 26px;
        padding-top: 52px;
    }

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

    .hero-copy p,
    .detail-one-line,
    .page-hero p {
        font-size: 16px;
    }

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

    .section-heading,
    .footer-grid {
        display: grid;
        align-items: start;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 44px 76px 1fr;
        gap: 12px;
    }

    .ranking-poster img {
        width: 76px;
        height: 62px;
    }

    .detail-grid {
        padding: 42px 0;
    }
}

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

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

    .hero-carousel {
        min-height: 820px;
    }

    .hero-actions,
    .page-actions {
        display: grid;
    }

    .hero-poster,
    .detail-cover-wrap {
        max-width: 100%;
    }

    .compact-hero {
        padding: 56px 0 42px;
    }
}
