:root {
    color-scheme: dark;
    --bg: #080b12;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --panel-strong: #111827;
    --text: #f8fafc;
    --muted: #a7b0c0;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --brand: #f43f5e;
    --brand-2: #8b5cf6;
    --brand-3: #06b6d4;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
    --glow: 0 0 48px rgba(244, 63, 94, 0.32);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 4%, rgba(244, 63, 94, 0.24), transparent 32rem),
        radial-gradient(circle at 82% 0%, rgba(6, 182, 212, 0.2), transparent 34rem),
        linear-gradient(135deg, #06070b 0%, #0b1120 45%, #111827 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(8, 11, 18, 0.78);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(20px);
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: var(--glow);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--soft);
    font-size: 14px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: currentColor;
}

main {
    overflow: hidden;
}

.hero-section,
.page-hero,
.detail-hero,
.content-section,
.quick-panel {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.hero-section {
    padding: 34px 0 24px;
}

.hero-shell {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #05070d;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.7fr);
    gap: 30px;
    align-items: center;
    padding: clamp(28px, 6vw, 74px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: blur(2px) saturate(1.12);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 7, 13, 0.96), rgba(7, 12, 26, 0.78), rgba(8, 11, 18, 0.52)),
        radial-gradient(circle at 70% 35%, rgba(244, 63, 94, 0.28), transparent 28rem);
}

.hero-copy,
.hero-art {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.category-overview-head span,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid rgba(244, 63, 94, 0.34);
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.12);
    color: #fecdd3;
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 18px 0 18px;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.tag-list,
.detail-meta,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 22px 0 28px;
}

.hero-tags span,
.tag-list span,
.detail-meta span,
.filter-chips button {
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--soft);
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.25s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #ffffff;
    box-shadow: var(--glow);
}

.ghost-button,
.section-more {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-art {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-art span {
    display: block;
    padding: 16px 18px;
    color: var(--soft);
    font-weight: 700;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: 36px;
    bottom: 30px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-dot.is-active {
    width: 56px;
    background: #ffffff;
}

.quick-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 6px 0 24px;
}

.quick-panel a {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-weight: 800;
    text-align: center;
    transition: 0.25s ease;
}

.quick-panel a:hover {
    border-color: rgba(244, 63, 94, 0.38);
    background: rgba(244, 63, 94, 0.12);
    transform: translateY(-3px);
}

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

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading h2,
.category-overview-head h2,
.page-hero h1,
.detail-info h1,
.detail-body h2 {
    margin: 12px 0 0;
    letter-spacing: -0.03em;
}

.section-heading h2,
.category-overview-head h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.category-overview-head p,
.page-hero p {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

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

.movie-card,
.category-card,
.category-overview-block {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.category-overview-block:hover {
    border-color: rgba(244, 63, 94, 0.42);
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.13), rgba(255, 255, 255, 0.045));
    transform: translateY(-4px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-play,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.card-play {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.66);
    color: #ffffff;
    backdrop-filter: blur(8px);
}

.rank-badge {
    top: 12px;
    left: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.3);
}

.card-content {
    padding: 15px;
}

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

.card-meta span + span::before {
    content: "·";
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.38);
}

.card-content h3 {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 9px 0 8px;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.52;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-content p {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card-small {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
}

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

.movie-card-small .card-content h3 {
    min-height: auto;
}

.movie-card-small .card-content p {
    min-height: auto;
    -webkit-line-clamp: 2;
}

.category-card {
    position: relative;
    display: block;
    min-height: 238px;
    padding: 20px;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(8, 11, 18, 0.88));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    display: block;
    margin-top: 118px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 0;
    color: var(--soft);
    line-height: 1.6;
}

.page-hero,
.detail-hero {
    margin-top: 30px;
}

.slim-hero {
    padding: clamp(34px, 7vw, 72px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 80% 24%, rgba(139, 92, 246, 0.26), transparent 26rem),
        linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(15, 23, 42, 0.88));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 860px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
}

.toolbar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
}

.sticky-toolbar {
    position: sticky;
    top: 96px;
    z-index: 20;
    padding-top: 16px;
    border-radius: 24px;
    background: rgba(8, 11, 18, 0.76);
    backdrop-filter: blur(18px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 560px);
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.large-search {
    width: min(100%, 760px);
}

.search-box span {
    color: #ffffff;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.search-box input::placeholder {
    color: rgba(203, 213, 225, 0.66);
}

.filter-chips button {
    cursor: pointer;
}

.filter-chips button:hover,
.filter-chips button.is-active {
    border-color: rgba(244, 63, 94, 0.45);
    background: rgba(244, 63, 94, 0.16);
    color: #ffffff;
}

.search-state {
    margin: 0;
    color: var(--muted);
}

.category-overview {
    display: grid;
    gap: 22px;
}

.category-overview-block {
    padding: 20px;
}

.detail-hero {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 8% 6%, rgba(244, 63, 94, 0.24), transparent 24rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 24px;
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.42);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: var(--glow);
}

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

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.detail-line {
    color: var(--soft);
    font-size: 17px;
    line-height: 1.8;
}

.detail-meta {
    margin: 18px 0 22px;
}

.detail-actions {
    margin-top: 24px;
}

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

.detail-body article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.055);
}

.detail-body h2 {
    font-size: 26px;
}

.detail-body p {
    color: var(--soft);
    font-size: 16px;
    line-height: 1.9;
}

.large-tags span {
    font-size: 13px;
}

.site-footer {
    margin-top: 42px;
    padding: 54px 16px 42px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    color: var(--muted);
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

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

.footer-links a:hover {
    color: #ffffff;
}

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

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

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

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

@media (max-width: 860px) {
    .site-header {
        border-radius: 24px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: rgba(8, 11, 18, 0.96);
    }

    .nav-menu.is-open {
        display: flex;
    }

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

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

    .hero-art {
        max-width: 260px;
        transform: rotate(0deg);
    }

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

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

    .toolbar-section,
    .section-heading,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero-section,
    .page-hero,
    .detail-hero,
    .content-section,
    .quick-panel {
        width: min(100% - 22px, 1180px);
    }

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

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

    .card-content {
        padding: 12px;
    }

    .card-content p,
    .tag-list {
        display: none;
    }

    .quick-panel {
        grid-template-columns: 1fr;
    }

    .hero-shell {
        min-height: 690px;
        border-radius: 24px;
    }

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

    .hero-controls {
        right: 22px;
        bottom: 18px;
    }

    .slim-hero,
    .detail-hero {
        padding: 22px;
        border-radius: 24px;
    }
}
