* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #38bdf8;
    --cyan: #22d3ee;
    --pink: #f472b6;
    --orange: #fb923c;
    --radius: 22px;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.20), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.top-nav {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    color: #ffffff;
    font-size: 15px;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.26);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    color: var(--soft);
    font-weight: 700;
}

.nav-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--blue);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.nav-search input,
.search-panel input,
.filter-input {
    width: 100%;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    outline: none;
    padding: 12px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.search-panel input:focus,
.filter-input:focus {
    border-color: rgba(56, 189, 248, 0.82);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.search-panel button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    padding: 12px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-btn {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: none;
}

.nav-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(56, 189, 248, 0.26);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    padding: 9px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 680px;
    margin: 28px auto 56px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    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;
    filter: saturate(1.08) contrast(1.05);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 46%, rgba(2, 6, 23, 0.35) 100%),
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.28), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 390px;
    gap: 42px;
    align-items: center;
    min-height: 680px;
    padding: 72px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.14);
    padding: 8px 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    color: #dbeafe;
    font-size: 18px;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.info-pill,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.20);
    color: #dbeafe;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-poster strong {
    position: absolute;
    left: 16px;
    bottom: 16px;
    right: 16px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(14px);
    padding: 16px;
    font-size: 20px;
}

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

.hero-dot {
    width: 42px;
    height: 5px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
    background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 660px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(18px);
}

.section {
    margin: 54px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 10px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-title p {
    color: var(--muted);
    max-width: 760px;
    margin: 10px 0 0;
}

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
    transform: translateY(-7px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 26px 58px rgba(14, 165, 233, 0.18);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card a:hover .poster-frame img {
    transform: scale(1.06);
    opacity: 0.86;
}

.movie-year,
.movie-type,
.rank-num {
    position: absolute;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.movie-year {
    right: 10px;
    top: 10px;
    background: rgba(2, 6, 23, 0.76);
}

.movie-type {
    left: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rank-num {
    left: 10px;
    top: 10px;
    min-width: 34px;
    text-align: center;
    background: linear-gradient(135deg, #f97316, #f43f5e);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 800;
}

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

.tag-row span {
    padding: 5px 9px;
    font-size: 12px;
    color: #bae6fd;
}

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

.category-card {
    min-height: 154px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.24), transparent 12rem),
        linear-gradient(160deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.42);
}

.category-card h3 {
    margin: 0;
    font-size: 22px;
}

.category-card p {
    color: var(--muted);
    margin: 10px 0 18px;
}

.category-card span {
    color: #67e8f9;
    font-weight: 900;
}

.page-hero {
    margin: 36px 0 34px;
    padding: 46px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 20rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 24px 0;
}

.result-count {
    color: var(--muted);
    font-weight: 800;
}

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-row a {
    display: grid;
    grid-template-columns: 72px 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.44);
}

.rank-row img {
    width: 96px;
    height: 132px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f97316, #f43f5e);
    font-weight: 1000;
}

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-row p {
    color: var(--soft);
    margin: 0 0 8px;
}

.rank-row span {
    color: var(--muted);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) 360px;
    gap: 28px;
    align-items: start;
    margin-bottom: 48px;
}

.player-shell,
.detail-panel,
.text-panel,
.related-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.video-wrap {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(56, 189, 248, 0.18), transparent 22rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
}

.play-overlay.is-hidden {
    display: none;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    box-shadow: 0 20px 54px rgba(34, 211, 238, 0.35);
    font-size: 32px;
}

.play-overlay strong {
    display: block;
    font-size: 24px;
}

.detail-player-title {
    padding: 22px 24px 24px;
}

.detail-player-title h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.detail-player-title p {
    margin: 0;
    color: var(--muted);
}

.detail-panel {
    padding: 18px;
}

.detail-panel img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
}

.detail-title h1 {
    margin-top: 16px;
}

.detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0;
}

.text-panel {
    padding: 28px;
    margin-top: 24px;
}

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

.text-panel p {
    color: #dbeafe;
    margin: 0 0 22px;
}

.related-panel {
    padding: 24px;
    margin-bottom: 56px;
}

.related-panel h2 {
    margin: 0 0 20px;
    font-size: 30px;
}

.no-results {
    display: none;
    margin: 24px 0;
    padding: 24px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--muted);
}

.no-results.active {
    display: block;
}

.site-footer {
    width: min(1240px, calc(100% - 32px));
    margin: 64px auto 0;
    padding: 34px 0 42px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.site-footer strong {
    color: var(--text);
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #bae6fd;
    font-weight: 800;
}

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

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

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

    .hero-content {
        padding: 54px;
    }

    .hero-poster {
        max-width: 340px;
    }
}

@media (max-width: 820px) {
    .top-nav {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 0 6px;
    }

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

    .nav-links a {
        padding: 10px 12px;
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.78);
    }

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

    .hero-content {
        min-height: 760px;
        padding: 34px 24px 72px;
    }

    .hero-dots {
        left: 24px;
    }

    .search-panel,
    .filter-bar,
    .site-footer {
        display: block;
    }

    .search-panel input,
    .search-panel button,
    .filter-bar input {
        width: 100%;
        margin-bottom: 10px;
    }

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

    .section-head {
        display: block;
    }

    .rank-row a {
        grid-template-columns: 48px 76px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-row img {
        width: 76px;
        height: 106px;
    }

    .rank-row p {
        display: none;
    }
}

@media (max-width: 520px) {
    main,
    .top-nav,
    .site-footer {
        width: min(100% - 22px, 1240px);
    }

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

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

    .page-hero,
    .text-panel,
    .related-panel {
        padding: 22px;
        border-radius: 22px;
    }
}
