:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --cyan: #22d3ee;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.18), transparent 32rem),
        radial-gradient(circle at 80% 8%, rgba(34, 211, 238, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.site-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.32);
}

.brand-name {
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: white;
    background: rgba(59, 130, 246, 0.16);
}

.header-search,
.mobile-search,
.home-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.home-search input,
.filter-controls input,
.filter-controls select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: white;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.home-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: var(--blue);
    color: white;
}

.header-search input:focus,
.mobile-search input:focus,
.home-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

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

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

.mobile-search input {
    width: 100%;
    padding: 11px 14px;
}

.hero {
    position: relative;
    padding: 28px 0 42px;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    min-height: 590px;
    border: 1px solid var(--line);
    border-radius: 30px;
    overflow: hidden;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 36px;
    padding: 74px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.05);
    opacity: 0.42;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.45)),
        radial-gradient(circle at 72% 24%, rgba(59, 130, 246, 0.34), transparent 24rem);
}

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

.hero-content h2 {
    margin: 8px 0 18px;
    font-size: clamp(2.4rem, 7vw, 5.6rem);
    line-height: 0.95;
    max-width: 760px;
}

.hero-content p {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue-light);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

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

.primary-button {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 16px 36px rgba(59, 130, 246, 0.34);
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: white;
}

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

.hero-poster {
    display: block;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    transform: rotate(2deg);
}

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

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 74px;
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
}

.hero-dot.is-active {
    background: var(--blue-light);
}

.home-search-section {
    padding: 10px 0 36px;
}

.home-search-card,
.filter-panel,
.page-hero,
.detail-sidebar,
.detail-article,
.video-shell {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 24px;
}

.home-search-card h1,
.page-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.home-search-card p,
.page-hero p,
.detail-article p {
    color: var(--muted);
    line-height: 1.9;
}

.home-search input {
    flex: 1;
    min-width: 0;
    padding: 15px 18px;
}

.home-search button {
    min-height: 50px;
    padding: 0 22px;
    font-weight: 800;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-heading a {
    color: var(--blue-light);
    font-weight: 800;
}

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

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

.category-tile {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(34, 211, 238, 0.06)),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.52);
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(34, 211, 238, 0.1)),
        rgba(15, 23, 42, 0.9);
}

.category-tile span {
    font-size: 1.18rem;
    font-weight: 900;
}

.category-tile strong {
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    color: var(--blue-light);
}

.category-tile p {
    margin: 0;
    color: var(--subtle);
    line-height: 1.7;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.48);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

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

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

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.92);
    color: white;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--blue));
    color: white;
    font-weight: 900;
}

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

.movie-card h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
}

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

.movie-meta {
    margin: 8px 0;
    color: var(--subtle);
    font-size: 0.86rem;
}

.movie-desc {
    min-height: 3.3em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    padding: 5px 9px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    font-size: 0.78rem;
}

.rank-strip {
    margin: 40px 0;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.44);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-item strong {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.18);
    color: var(--blue-light);
}

.rank-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-item em {
    color: var(--subtle);
    font-style: normal;
}

.page-main {
    padding: 42px 0 70px;
}

.page-hero {
    padding: 46px;
    border-radius: 28px;
}

.page-hero p:last-child {
    max-width: 820px;
    margin-bottom: 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: 24px;
    align-items: center;
    margin: 30px 0;
    padding: 24px;
    border-radius: 24px;
}

.filter-panel h2 {
    margin: 0;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 10px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
}

.filter-result {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--subtle);
}

.detail-main {
    padding-bottom: 70px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.14);
    transform: scale(1.05);
    opacity: 0.34;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.58)),
        linear-gradient(0deg, var(--bg), transparent 42%);
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 56px 0;
}

.detail-poster {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.detail-poster span {
    position: absolute;
    inset: auto 18px 18px auto;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue);
    color: white;
}

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

.breadcrumb a {
    color: #bfdbfe;
}

.breadcrumb em {
    color: var(--muted);
    font-style: normal;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 6vw, 5.4rem);
    line-height: 1;
}

.lead-text {
    max-width: 880px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.9;
}

.player-section {
    margin-top: -58px;
    position: relative;
    z-index: 5;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: black;
}

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

.video-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: black;
    color: white;
    z-index: 3;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

.video-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    transform: translate(-50%, -50%);
    font-size: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.48);
}

.video-shell.is-playing .video-cover {
    display: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin-top: 34px;
}

.detail-article,
.detail-sidebar {
    border-radius: 24px;
    padding: 26px;
}

.detail-article h2,
.detail-sidebar h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

.detail-article h2:not(:first-child) {
    margin-top: 28px;
}

.detail-sidebar dl {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-sidebar dt {
    color: var(--subtle);
}

.detail-sidebar dd {
    margin: 0;
    color: var(--text);
}

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

.movie-card-compact .movie-desc {
    min-height: auto;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 42px 0;
    background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 32px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
}

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

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

.footer-links a {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.footer-links a:hover {
    color: white;
    border-color: rgba(96, 165, 250, 0.45);
}

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
        padding: 48px;
    }
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        min-height: 64px;
    }

    .hero-inner {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 34px;
    }

    .hero-poster {
        max-width: 220px;
        order: -1;
        transform: none;
    }

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

    .home-search-card,
    .filter-panel,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .category-grid,
    .category-grid-large,
    .rank-list {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-hero-grid {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 24px;
    }
}

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

    .brand-name {
        font-size: 1.08rem;
    }

    .hero {
        padding-top: 18px;
    }

    .hero-inner {
        min-height: 760px;
        border-radius: 22px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-content h2,
    .detail-info h1 {
        font-size: 2.4rem;
    }

    .hero-content p,
    .lead-text {
        font-size: 0.98rem;
    }

    .home-search-card,
    .page-hero,
    .filter-panel,
    .detail-article,
    .detail-sidebar {
        padding: 20px;
        border-radius: 20px;
    }

    .home-search,
    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .home-search button,
    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .category-grid,
    .category-grid-large,
    .rank-list,
    .filter-controls {
        grid-template-columns: 1fr;
    }

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

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

    .detail-hero {
        min-height: auto;
    }

    .detail-hero-grid {
        grid-template-columns: 1fr;
        padding: 32px 0 96px;
    }

    .detail-poster {
        width: 210px;
    }

    .player-section {
        margin-top: -72px;
    }

    .video-cover span {
        width: 68px;
        height: 68px;
        font-size: 1.5rem;
    }
}
