:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: #243244;
    --blue: #2563eb;
    --blue-light: #38bdf8;
    --cyan: #22d3ee;
    --green: #22c55e;
    --yellow: #facc15;
    --red: #f87171;
    --purple: #a78bfa;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.24), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.14), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family:
        Inter,
        "PingFang SC",
        "Microsoft YaHei",
        Arial,
        sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    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), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

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

.desktop-nav a {
    color: #dbeafe;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--blue-light);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.site-search input,
.mobile-search input,
.filter-input,
.filter-select {
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    outline: none;
}

.site-search input {
    width: 220px;
    padding: 10px 12px;
}

.site-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-button {
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
    border-radius: 12px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.site-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.secondary-button {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-menu a {
    padding: 10px 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--bg);
}

.hero-slider {
    position: relative;
    min-height: 70vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.hero-slide img.image-missing {
    display: none;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.25)),
        linear-gradient(0deg, var(--bg), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(37, 99, 235, 0.82);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    margin: 0 0 24px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.68);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(37, 99, 235, 0.92);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 28px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.35);
    cursor: pointer;
}

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

.section {
    padding: 72px 0;
}

.section--soft {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), rgba(2, 6, 23, 0));
}

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

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

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition:
        transform 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 24px 80px rgba(37, 99, 235, 0.2);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.26), transparent 35%),
        linear-gradient(135deg, #0f172a, #111827 52%, #1e3a8a);
}

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

.movie-card__poster img.image-missing {
    display: none;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.08);
}

.movie-card__poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.82));
}

.movie-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 9px;
    color: white;
    background: rgba(37, 99, 235, 0.9);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(250, 204, 21, 0.92);
    color: #111827;
}

.movie-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

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

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

.movie-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.tag-pill {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    color: #93c5fd;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.18);
    font-size: 12px;
    font-weight: 700;
}

.movie-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    color: var(--muted);
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.18), transparent 38%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.86));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

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

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

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-tile span {
    display: inline-flex;
    margin-top: 22px;
    color: var(--blue-light);
    font-weight: 800;
}

.rank-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

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

.rank-link {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-link:hover {
    border-color: rgba(56, 189, 248, 0.42);
    background: rgba(30, 41, 59, 0.92);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), #fb923c);
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    padding: 60px 0 34px;
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.24), transparent 32%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0));
}

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

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

.breadcrumb a {
    color: var(--blue-light);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin: 24px 0 28px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 12px 14px;
}

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

.player video {
    width: 100%;
    max-height: 78vh;
    min-height: 360px;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background:
        radial-gradient(circle at center, rgba(37, 99, 235, 0.34), transparent 34%),
        rgba(2, 6, 23, 0.48);
    cursor: pointer;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 48px rgba(37, 99, 235, 0.44);
    font-size: 36px;
    transform: translateX(3px);
}

.detail-card,
.info-card {
    padding: 24px;
    margin-top: 22px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow);
}

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

.detail-card p {
    color: #dbeafe;
    margin: 0 0 14px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    text-align: right;
    font-weight: 800;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.26), transparent 35%),
        linear-gradient(135deg, #0f172a, #1e3a8a);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.detail-cover img.image-missing {
    display: none;
}

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

.site-footer {
    margin-top: 72px;
    color: var(--muted);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.footer-brand {
    color: white;
    font-size: 22px;
    font-weight: 900;
}

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

.footer-links a {
    color: #dbeafe;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 66px;
    }

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

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .hero-copy {
        padding: 70px 0 90px;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 52px 0;
    }

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

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

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

    .rank-link {
        grid-template-columns: 46px 1fr;
    }

    .rank-meta {
        grid-column: 2;
    }

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

    .player video {
        min-height: 240px;
    }
}

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

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

    .play-circle {
        width: 74px;
        height: 74px;
        font-size: 30px;
    }
}
