:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --gold: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 8, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.15), transparent 28rem),
        radial-gradient(circle at 80% 4%, rgba(37, 99, 235, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

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

.header-inner {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 15px;
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.28);
}

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

.desktop-nav a,
.mobile-menu a {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--cyan);
}

.header-search {
    margin-left: auto;
    width: min(360px, 36vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.page-filter input,
.mobile-menu input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input::placeholder,
.page-filter input::placeholder,
.mobile-menu input::placeholder {
    color: #64748b;
}

.header-search button,
.page-filter button,
.mobile-menu button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    cursor: pointer;
    font-weight: 800;
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.mobile-menu {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 20px;
}

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

.mobile-menu form {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-menu nav {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-layout {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 660px;
    margin: 0 auto;
    padding: 82px 24px 88px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 56px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 14px;
    border: 1px solid rgba(34, 211, 238, 0.36);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.18);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-content h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero h2 + p,
.hero-copy p,
.page-hero p,
.detail-main .lead {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.78;
}

.hero-meta,
.detail-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.hero-meta span,
.detail-meta-list span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.7);
}

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
}

.secondary-btn,
.ghost-btn,
.panel-link {
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.panel-link:hover {
    transform: translateY(-2px);
}

.primary-btn.small {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 14px;
}

.hero-poster {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    background: rgba(15, 23, 42, 0.8);
}

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

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.55);
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 30px;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

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

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

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

.section-heading.wide {
    display: block;
    max-width: 800px;
}

.section-heading h2,
.category-panel h2,
.detail-content h2,
.site-footer h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p,
.category-panel p,
.site-footer p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.section-heading a {
    color: var(--cyan);
    font-weight: 900;
}

.quick-links,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.quick-links a,
.filter-chips button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.75);
    cursor: pointer;
}

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

.compact-grid,
.featured-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.46);
    box-shadow: 0 24px 62px rgba(34, 211, 238, 0.12);
}

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

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

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    background: rgba(8, 145, 178, 0.88);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.movie-meta {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 8px 0 8px;
    min-height: 2.8em;
    font-size: 17px;
    line-height: 1.4;
}

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

.movie-card p {
    min-height: 4.8em;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.13);
    font-size: 12px;
}

.tag-row.large span {
    padding: 8px 12px;
    font-size: 14px;
}

.category-section,
.ranking-strip {
    max-width: none;
    background: rgba(15, 23, 42, 0.44);
}

.category-section > *,
.ranking-strip > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.category-panel,
.category-overview-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 20rem),
        rgba(2, 6, 23, 0.72);
}

.category-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
    gap: 24px;
    align-items: center;
}

.category-panel > div > span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.75);
}

.mini-card img {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.panel-link {
    grid-column: 1 / -1;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.66);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.45);
}

.rank-number {
    color: var(--gold);
    font-size: 22px;
    font-weight: 1000;
}

.rank-item img {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    line-height: 1.4;
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 24px 36px;
}

.page-hero {
    border-bottom: 1px solid var(--line);
}

.page-hero.slim {
    padding-bottom: 46px;
}

.page-hero h1 {
    max-width: 920px;
}

.page-hero p {
    max-width: 760px;
}

.page-filter {
    width: min(760px, 100%);
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.category-overview {
    display: grid;
    gap: 30px;
}

.overview-head {
    margin-bottom: 22px;
}

.overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.detail-hero {
    padding-bottom: 20px;
}

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

.breadcrumb a {
    color: #a5f3fc;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.7));
    cursor: pointer;
}

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

.play-overlay span {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 52px rgba(34, 211, 238, 0.28);
    font-size: 28px;
}

.play-overlay strong {
    font-size: 20px;
}

.detail-info-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.74);
}

.detail-info-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info-card .detail-meta-list {
    padding: 18px;
    margin: 0;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}

.detail-main,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-main {
    padding: 32px;
}

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

.detail-side {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px 14px;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: #e2e8f0;
}

.detail-side a {
    color: var(--cyan);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

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

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    font-size: 22px;
    margin-bottom: 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 26px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 1120px) {
    .movie-grid,
    .compact-grid,
    .featured-grid,
    .overview-grid,
    .rank-list.large {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .hero-poster,
    .detail-info-card {
        max-width: 320px;
    }

    .detail-side {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        height: 66px;
        padding: 0 16px;
    }

    .desktop-nav,
    .header-search {
        display: none;
    }

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

    .hero,
    .hero-layout {
        min-height: 720px;
    }

    .hero-layout {
        padding: 62px 18px 92px;
        gap: 28px;
    }

    .hero h1,
    .hero h2,
    .page-hero h1,
    .detail-content h1 {
        font-size: clamp(34px, 11vw, 48px);
    }

    .hero-arrow {
        display: none;
    }

    .section,
    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading {
        display: block;
    }

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

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

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

    .page-filter {
        display: grid;
    }

    .detail-main,
    .detail-side {
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 20px;
    }

    .movie-grid,
    .compact-grid,
    .featured-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .rank-item {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }
}
