:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #60a5fa;
    --danger: #f43f5e;
    --radius: 22px;
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.42);
}

* {
    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", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.16), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #020617 44%, #000000 100%);
}

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

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 35px rgba(34, 211, 238, 0.34);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.25s ease, transform 0.25s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

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

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

.header-search {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    position: relative;
    display: none;
}

.global-search,
.page-filter {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    padding: 0 20px;
    color: var(--text);
    outline: none;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.global-search:focus,
.page-filter:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    z-index: 60;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
}

.search-panel.open {
    display: block;
}

.search-result {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    padding: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.search-result:last-child {
    border-bottom: none;
}

.search-result img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.search-result strong {
    display: block;
    margin-bottom: 4px;
    color: white;
}

.search-result span,
.search-result p {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.hero-slider {
    position: relative;
    min-height: 82vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

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

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 210px;
}

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

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
    max-width: 860px;
    margin: 0;
    color: white;
    font-size: clamp(40px, 7vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-meta,
.tag-row,
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags,
.detail-meta {
    margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.category-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
}

.hero-actions,
.detail-copy .primary-btn {
    margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.primary-btn.small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.ghost-btn,
.section-more {
    margin-left: 12px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.66);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.22);
}

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

.hero-dot {
    width: 42px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--cyan);
}

.hero-search-box {
    position: absolute;
    right: max(24px, calc((100vw - 1240px) / 2));
    bottom: 86px;
    z-index: 6;
    width: min(390px, calc(100% - 32px));
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search-box p {
    margin: 0 0 12px;
    color: white;
    font-weight: 900;
}

.content-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

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

.section-head h2,
.detail-article h2,
.category-copy h2 {
    margin: 0;
    color: white;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head p,
.category-copy p,
.footer-inner p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
    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 26px 70px rgba(0, 0, 0, 0.38);
}

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

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.75) 100%);
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #00111a;
    background: rgba(34, 211, 238, 0.92);
    transform: translate(-50%, -50%) scale(0.78);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, #f97316, #e11d48);
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.28);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover {
    color: var(--cyan);
}

.card-meta,
.card-desc {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.card-desc {
    display: -webkit-box;
    min-height: 45px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    min-height: 28px;
    padding: 4px 9px;
    color: #a5f3fc;
    font-size: 12px;
}

.large-tags span {
    min-height: 34px;
    font-size: 14px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.mini-card img {
    width: 74px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    color: white;
    line-height: 1.35;
}

.mini-card em {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.35;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background: var(--panel-solid);
    isolation: isolate;
}

.category-tile img,
.tile-glow {
    position: absolute;
    inset: 0;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transition: transform 0.45s ease, opacity 0.45s ease;
    z-index: -2;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.62;
}

.tile-glow {
    z-index: -1;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.1));
}

.category-tile strong {
    color: white;
    font-size: 21px;
}

.category-tile em {
    margin-top: 8px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.55;
    font-style: normal;
}

.page-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.22), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.page-hero > div {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 80px 0;
}

.slim-hero {
    min-height: 360px;
}

.category-chips {
    margin-top: 26px;
}

.category-chips a:hover {
    color: #00111a;
    background: var(--cyan);
}

.category-block {
    display: grid;
    grid-template-columns: 0.85fr 1.6fr;
    gap: 28px;
    align-items: center;
    padding: 26px;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.54);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72)), linear-gradient(0deg, #020617, transparent 44%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: center;
    padding: 76px 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

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

.breadcrumb em {
    color: white;
    font-style: normal;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: white;
    cursor: pointer;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.24), rgba(0, 0, 0, 0.64));
}

.player-overlay.hidden {
    display: none;
}

.player-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #00111a;
    font-size: 30px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.36);
}

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

.detail-article {
    max-width: 920px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.54);
}

.detail-article h2 {
    margin-top: 0;
    font-size: 30px;
}

.detail-article h2 + p {
    margin-top: 14px;
}

.detail-article p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 12px;
}

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

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

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

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .mobile-nav {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

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

    .header-search {
        display: block;
    }

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

    .hero-content {
        padding: 92px 0 260px;
    }

    .hero-search-box {
        left: 16px;
        right: 16px;
        bottom: 82px;
        width: auto;
    }

    .section-head {
        display: block;
    }

    .section-more,
    .ghost-btn {
        margin: 18px 0 0;
    }

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

    .mini-card {
        grid-template-columns: 60px 1fr;
    }

    .mini-card img {
        width: 60px;
        height: 82px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 54px 0;
    }

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 20px;
    }

    .header-inner {
        height: 64px;
    }

    .hero-content h1,
    .hero-content h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 42px;
    }

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

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

    .category-tile {
        min-height: 190px;
    }

    .detail-article {
        padding: 22px;
    }
}
