:root {
    --bg: #07111f;
    --bg-deep: #030712;
    --panel: rgba(15, 23, 42, 0.84);
    --panel-strong: #0f172a;
    --line: rgba(56, 189, 248, 0.18);
    --text: #e5f0ff;
    --muted: #93a4b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #f472b6;
    --amber: #f59e0b;
    --green: #10b981;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.18), transparent 32rem),
        linear-gradient(180deg, #081224 0%, #030712 48%, #07111f 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand {
    font-size: 22px;
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--soft);
}

.main-nav a,
.nav-dropdown button {
    color: var(--soft);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.nav-dropdown button:hover {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 184px;
    padding: 10px;
    display: grid;
    gap: 2px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    background: rgba(37, 99, 235, 0.22);
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-search {
    width: 300px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.74);
}

.nav-search input {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
}

.nav-search button,
.primary-btn,
.secondary-btn,
.filter-bar button,
.play-button {
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    align-self: stretch;
    padding: 0 14px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.25);
}

.secondary-btn {
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover,
.play-button:hover,
.filter-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(34, 211, 238, 0.32);
}

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

.mobile-panel {
    display: none;
    padding: 12px 22px 22px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid var(--line);
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    color: var(--soft);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.mobile-panel.is-open {
    display: block;
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 22px 68px;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    display: grid;
    align-items: center;
    border-bottom: 1px solid rgba(56, 189, 248, 0.14);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.85s ease;
}

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 96px 22px 90px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.58fr);
    gap: 52px;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-head span,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0;
    font-size: clamp(42px, 6vw, 82px);
    line-height: 1.02;
    font-weight: 950;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hero p {
    max-width: 680px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 22px;
}

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

.hero-tags span,
.tag-list span,
.meta-chip,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(15, 23, 42, 0.55);
}

.hero-panel {
    position: relative;
    min-height: 440px;
    padding: 18px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.34));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-poster {
    width: 100%;
    height: 405px;
    object-fit: cover;
    border-radius: 26px;
}

.hero-panel-caption {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 30px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.hero-panel-caption strong {
    display: block;
    margin-bottom: 6px;
    font-size: 20px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

.section,
.panel-section {
    margin-bottom: 58px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 26px;
}

.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
}

.section-head p,
.page-title p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    min-height: 154px;
    padding: 22px;
    overflow: hidden;
    position: relative;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(6, 182, 212, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(56, 189, 248, 0.45);
}

.category-card .icon {
    font-size: 34px;
}

.category-card h3 {
    margin: 14px 0 8px;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.65;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 25px 58px rgba(8, 145, 178, 0.16);
}

.movie-cover-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
}

.movie-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

.movie-card:hover .movie-cover {
    transform: scale(1.07);
}

.movie-score,
.movie-year {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.movie-score {
    left: 12px;
    color: #fde68a;
}

.movie-year {
    right: 12px;
    color: #bfdbfe;
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.movie-title {
    min-height: 48px;
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-desc {
    min-height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

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

.tag-list span {
    font-size: 12px;
    color: #a5f3fc;
}

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

.rank-panel,
.info-panel,
.filter-panel,
.detail-panel {
    padding: 24px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 11px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-index {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.72);
    font-weight: 900;
}

.rank-item.top .rank-index {
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-item img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-text {
    min-width: 0;
}

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

.rank-text strong {
    color: #fff;
}

.rank-text em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-title {
    margin-bottom: 28px;
    padding: 34px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.12), transparent 28rem),
        rgba(15, 23, 42, 0.72);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 14px;
    outline: none;
}

.filter-bar option {
    color: #0f172a;
}

.filter-bar button {
    min-width: 96px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
}

.empty-message {
    display: none;
    padding: 22px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 18px;
}

.empty-message.is-visible {
    display: block;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    margin-bottom: 34px;
    padding: 28px;
    border-radius: 30px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    background:
        linear-gradient(110deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.56)),
        rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 62px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

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

.player-wrap {
    margin-bottom: 34px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(56, 189, 248, 0.18);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.18);
    transition: opacity 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.play-button {
    position: relative;
    z-index: 3;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 0 24px 50px rgba(37, 99, 235, 0.42);
}

.video-player.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

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

.detail-panel h2,
.rank-panel h2,
.info-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

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

.detail-panel + .detail-panel {
    margin-top: 20px;
}

.meta-list {
    display: grid;
    gap: 12px;
    color: var(--soft);
}

.meta-list span {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid rgba(56, 189, 248, 0.14);
    background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
}

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

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

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer a {
    display: block;
}

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

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

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

    .nav-search {
        margin-left: auto;
    }

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

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

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

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

@media (max-width: 760px) {
    .nav-shell {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .brand {
        font-size: 18px;
    }

    .nav-search {
        order: 3;
        width: 100%;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        padding: 78px 18px 88px;
        gap: 28px;
    }

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

    .hero-poster {
        height: 300px;
    }

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

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

    .page-main {
        padding: 26px 16px 52px;
    }

    .page-title,
    .detail-hero,
    .rank-panel,
    .info-panel,
    .filter-panel,
    .detail-panel {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        gap: 16px;
    }

    .movie-title {
        min-height: auto;
    }

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

    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
}
