:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --cyan: #22d3ee;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.55);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.22), transparent 26rem),
        radial-gradient(circle at 90% 12%, rgba(34, 211, 238, 0.14), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.brand-text {
    font-size: 21px;
    color: #ffffff;
    white-space: nowrap;
}

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

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: #dbeafe;
    font-size: 14px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.24);
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.hero-search,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.filter-bar input {
    width: 210px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    outline: none;
    padding: 11px 16px;
    transition: border 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-search input,
.filter-bar input {
    width: min(100%, 420px);
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-bar input:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
    background: rgba(15, 23, 42, 0.96);
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-bar button,
.primary-button,
.ghost-button,
.section-more,
.play-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-bar button,
.primary-button,
.play-button {
    background: linear-gradient(135deg, var(--blue), #0891b2);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.3);
}

.header-search button,
.mobile-search button,
.hero-search button,
.filter-bar button {
    padding: 11px 18px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

.ghost-button,
.section-more {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.filter-bar button:hover,
.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.play-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.4);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    margin-left: auto;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 10px;
}

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

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

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58) 45%, rgba(2, 6, 23, 0.14)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 26px;
}

.hero-kicker,
.card-meta,
.rank-meta,
.detail-meta,
.hero-tags,
.tag-row,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-kicker span,
.detail-meta span,
.card-meta span,
.rank-meta span,
.hero-tags span,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.24);
    padding: 6px 10px;
    font-size: 12px;
}

.hero-copy h1 {
    margin: 22px 0 20px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 12px 38px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: clamp(18px, 2.3vw, 25px);
    line-height: 1.65;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
    background: rgba(37, 99, 235, 0.55);
    transform: translateY(-50%) scale(1.06);
}

.hero-control.prev {
    left: 20px;
}

.hero-control.next {
    right: 20px;
}

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

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

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

.hero-panel {
    margin-top: -58px;
    position: relative;
    z-index: 4;
}

.hero-panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 20px;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel h2,
.content-section h2,
.footer-block h2,
.detail-section h2,
.page-title h1,
.player-info h1 {
    margin: 0;
    color: #ffffff;
}

.hero-panel p,
.section-kicker,
.page-title p,
.footer-block p,
.detail-section p,
.player-info p,
.card-body p,
.rank-content p,
.category-card p {
    color: var(--muted);
    line-height: 1.75;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: center;
}

.quick-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.content-section.alt-section {
    background: rgba(15, 23, 42, 0.34);
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--blue-light);
    font-weight: 700;
}

.section-heading h2,
.page-title h1,
.player-info h1 {
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-more {
    padding: 11px 18px;
    color: #ffffff;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.88));
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.3);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.04);
}

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 17px;
}

.card-meta,
.rank-meta,
.detail-meta {
    margin-bottom: 10px;
}

.card-body h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.card-body h2 a:hover,
.rank-content h2 a:hover,
.category-card h2 a:hover,
.breadcrumb a:hover {
    color: var(--blue-light);
}

.card-body p {
    min-height: 76px;
    margin: 0 0 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.compact-card .card-body p {
    min-height: 52px;
    -webkit-line-clamp: 2;
}

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

.category-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(8, 145, 178, 0.12)),
        rgba(15, 23, 42, 0.84);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
}

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

.category-card ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.page-hero {
    padding: 66px 0 40px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.2), transparent 38%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0));
}

.page-title {
    width: min(820px, 100%);
}

.page-title p {
    margin: 16px 0 0;
    font-size: 18px;
}

.filter-panel {
    padding: 24px 0 0;
}

.filter-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--line);
}

.filter-empty {
    display: none;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.82);
}

.filter-empty.show {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 86px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
    transition: transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(96, 165, 250, 0.62);
    background: rgba(30, 41, 59, 0.92);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), #06b6d4);
}

.rank-thumb {
    display: block;
    width: 86px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 0 0 10px;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: end;
    overflow: hidden;
    background: #020617;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
}

.detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(1.08);
    transform: scale(1.03);
}

.detail-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.32)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.7) 34%, transparent 72%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    padding: 64px 0 46px;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.player-info {
    align-self: center;
}

.player-info p {
    font-size: 18px;
}

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

.player-section {
    padding: 56px 0 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: #000000;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.18);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.78));
}

.play-button {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    font-size: 32px;
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    transform: translateX(-50%);
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #ffffff;
}

.player-message[hidden] {
    display: none;
}

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

.detail-section {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.24);
    margin-bottom: 22px;
}

.detail-section h2 {
    font-size: 24px;
    margin-bottom: 14px;
}

.detail-section p {
    margin: 0;
    font-size: 16px;
}

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

.side-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.side-item img {
    width: 72px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.side-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

.side-item p {
    margin: 0;
    color: var(--subtle);
    font-size: 12px;
    line-height: 1.45;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    padding: 54px 0 38px;
}

.footer-block h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-block ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

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

.footer-block a:hover {
    color: var(--blue-light);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px;
    text-align: center;
    color: var(--subtle);
}

@media (max-width: 1080px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

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

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

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        height: 64px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

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

    .hero-control {
        display: none;
    }

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

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

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

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .rank-thumb {
        width: 68px;
    }

    .detail-poster {
        width: min(240px, 72vw);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero-search input,
    .filter-bar input,
    .hero-search button,
    .filter-bar button {
        width: 100%;
    }

    .detail-section {
        padding: 20px;
    }
}
