:root {
    color-scheme: dark;
    --bg-0: #020617;
    --bg-1: #0f172a;
    --bg-2: #111827;
    --panel: rgba(15, 23, 42, 0.74);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f59e0b;
    --accent-2: #ec4899;
    --accent-3: #38bdf8;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --container: min(1180px, calc(100vw - 40px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.16), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(236, 72, 153, 0.14), transparent 24%),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.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: var(--container);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.25);
}

.brand-text {
    font-size: 1.1rem;
}

.desktop-nav,
.footer-links,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: var(--container);
    margin: 0 auto 14px;
    flex-wrap: wrap;
}

main {
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease, transform 0.75s ease;
    transform: scale(1.015);
}

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

.hero-bg,
.page-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.12) contrast(1.04);
}

.hero-overlay,
.page-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.1) 50%, rgba(2, 6, 23, 0.75) 100%);
}

.hero-content {
    position: relative;
    width: var(--container);
    min-height: 760px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 420px);
    align-items: center;
    gap: 60px;
    padding: 110px 0 80px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fde68a;
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.35rem, 6vw, 5.7rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.lead-text {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.9vw, 1.25rem);
}

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

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 6px 10px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.84rem;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 11px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 14px 40px rgba(236, 72, 153, 0.28);
}

.ghost-button,
.section-action,
.text-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover,
.text-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.hero-poster {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: white;
}

.search-panel,
.content-section,
.page-hero,
.detail-hero,
.breadcrumb,
.detail-layout,
.player-section,
.pager-links,
.category-panels {
    width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

.search-panel {
    margin-top: 42px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
    gap: 24px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.detail-article h2,
.detail-aside h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

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

.search-controls {
    display: flex;
    gap: 12px;
}

.site-input,
.site-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    padding: 0 14px;
    background: rgba(2, 6, 23, 0.58);
    color: var(--text);
}

.site-select {
    max-width: 160px;
}

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

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.74);
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.38);
    background: rgba(30, 41, 59, 0.88);
}

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

.poster-link,
.category-cover,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img,
.category-cover img,
.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-panel:hover .category-cover img {
    transform: scale(1.055);
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    font-size: 0.76rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--soft);
    font-size: 0.84rem;
}

.card-meta span,
.detail-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
}

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

.movie-card.compact p {
    display: none;
}

.movie-card.compact .tag-row {
    display: none;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0f172a;
}

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

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

.category-tile span {
    position: absolute;
    inset: auto 16px 16px 16px;
    z-index: 2;
}

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    font-size: 1.15rem;
}

.category-tile em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
}

.page-hero {
    position: relative;
    min-height: 420px;
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
}

.compact-hero {
    display: grid;
    place-items: center;
    padding: 70px;
    background:
        radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.2), transparent 30%),
        radial-gradient(circle at 88% 0%, rgba(236, 72, 153, 0.2), transparent 26%),
        rgba(15, 23, 42, 0.82);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px;
}

.page-hero-content.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 36px;
}

.hero-side-list {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.48);
    backdrop-filter: blur(12px);
}

.category-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 42px 0 0;
}

.category-panel {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 16px;
    background: rgba(15, 23, 42, 0.74);
}

.category-cover {
    border-radius: 22px;
}

.category-panel-body h2 {
    margin: 0;
}

.mini-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.mini-list.vertical {
    margin: 14px 0 0;
}

.mini-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.mini-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.mini-card strong,
.mini-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card em {
    color: var(--soft);
    font-style: normal;
    font-size: 0.84rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 28px;
    color: var(--soft);
}

.breadcrumb a:hover {
    color: white;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 42px 0;
}

.detail-poster {
    border: 1px solid var(--line);
    border-radius: 34px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(2.1rem, 5vw, 4.8rem);
}

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

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

.player-section {
    padding: 8px 0 42px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.88));
    color: white;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 22px 50px rgba(236, 72, 153, 0.35);
}

.play-triangle {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid white;
}

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

.detail-article,
.detail-aside {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.72);
    padding: 28px;
}

.detail-article h2 + p {
    margin-bottom: 26px;
}

.pager-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 44px 0 0;
}

.pager-links a {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.pager-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

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

.footer-inner {
    width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 0;
    color: var(--soft);
}

.footer-brand {
    color: white;
}

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

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

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

    .hero-poster {
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 820px) {
    :root {
        --container: min(100vw - 28px, 720px);
    }

    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 92px;
    }

    .hero-poster {
        display: none;
    }

    .search-panel,
    .detail-hero,
    .category-panel {
        grid-template-columns: 1fr;
    }

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

    .category-panel {
        padding: 14px;
    }

    .category-cover {
        max-height: 260px;
    }

    .category-cover img {
        aspect-ratio: 16 / 9;
    }

    .search-controls {
        flex-direction: column;
    }

    .site-select {
        max-width: none;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .movie-grid,
    .slim-grid,
    .rank-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .page-hero-content,
    .compact-hero {
        padding: 34px;
    }

    .pager-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .slim-grid,
    .rank-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.35rem;
    }

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

    .brand-text {
        font-size: 0.98rem;
    }

    .movie-card p {
        min-height: auto;
    }
}
