:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.96);
    --border: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --muted-strong: #64748b;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
    --radius-sm: 14px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 8%, rgba(14, 165, 233, 0.12), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #00131a;
    font-weight: 900;
    background: linear-gradient(135deg, #67e8f9, #22d3ee 42%, #0ea5e9);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.24s ease, background 0.24s ease;
}

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

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

.header-search input,
.filter-controls input,
.filter-controls select,
.search-main-input {
    width: 100%;
    min-width: 0;
    color: var(--text);
    border: 1px solid var(--border);
    outline: none;
    background: rgba(2, 6, 23, 0.62);
    border-radius: 999px;
}

.header-search input {
    border: 0;
    background: transparent;
    padding: 8px 10px;
}

.header-search button,
.primary-button,
.ghost-button,
.card-link,
.rank-link,
.play-button,
.search-button {
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 999px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.header-search button,
.primary-button,
.play-button,
.search-button {
    color: #00131a;
    font-weight: 800;
    background: linear-gradient(135deg, #67e8f9, #22d3ee 44%, #0ea5e9);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.header-search button {
    padding: 8px 15px;
}

.header-search button:hover,
.primary-button:hover,
.play-button:hover,
.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(34, 211, 238, 0.34);
}

.menu-toggle {
    display: none;
    padding: 9px 14px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
}

.mobile-nav {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-category-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.search-suggest {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
}

.search-suggest a,
.search-page-results a {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
}

.search-suggest a:hover,
.search-page-results a:hover {
    background: rgba(34, 211, 238, 0.1);
}

.search-suggest span,
.search-page-results span {
    color: var(--muted);
    font-size: 13px;
}

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

.hero-carousel {
    position: relative;
    min-height: clamp(580px, 82vh, 880px);
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.7);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.7) 38%, rgba(2, 6, 23, 0.25) 78%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%),
        radial-gradient(circle at 26% 38%, rgba(34, 211, 238, 0.24), transparent 22rem);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1220px) / 2));
    bottom: 16%;
    width: min(680px, calc(100% - 64px));
    z-index: 2;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before,
.detail-kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 99px;
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.8);
}

.hero-content h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    text-shadow: 0 22px 80px rgba(0, 0, 0, 0.6);
}

.hero-one-line {
    max-width: 680px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: clamp(16px, 2.2vw, 21px);
}

.hero-tags,
.detail-tags,
.tag-row,
.meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin: 26px 0 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.meta-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #cffafe;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.16);
}

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

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

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.66);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.12);
}

.hero-controls {
    position: absolute;
    right: max(32px, calc((100vw - 1220px) / 2));
    bottom: 74px;
    display: flex;
    gap: 12px;
    z-index: 5;
}

.hero-controls button {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 34px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.hero-controls button:hover {
    background: rgba(255, 255, 255, 0.22);
}

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

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

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

.hero-thumbs {
    position: absolute;
    right: max(32px, calc((100vw - 1220px) / 2));
    top: 50%;
    z-index: 4;
    width: min(300px, 27vw);
    display: grid;
    gap: 12px;
    transform: translateY(-50%);
}

.hero-thumb {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(14px);
    opacity: 0.72;
    transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero-thumb.active,
.hero-thumb:hover {
    opacity: 1;
    border-color: rgba(34, 211, 238, 0.52);
    transform: translateX(-4px);
}

.hero-thumb img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.section-block {
    padding: 62px 0;
}

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

.section-heading h2,
.filter-panel h2,
.detail-content h2,
.search-hero h1,
.category-hero h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.section-heading p,
.category-hero p,
.search-hero p,
.filter-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}

.more-link {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.44);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.12;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 16%, rgba(34, 211, 238, 0.14), transparent 16rem),
        #0f172a;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.movie-card:hover .movie-poster {
    transform: scale(1.06);
    opacity: 0.88;
}

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #cffafe;
    font-size: 12px;
    font-weight: 800;
    background: rgba(8, 145, 178, 0.72);
    backdrop-filter: blur(12px);
}

.poster-badge {
    left: 12px;
}

.poster-year {
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

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

.movie-card p {
    min-height: 48px;
    margin: 0;
    color: #a8b4c5;
    font-size: 14px;
    line-height: 1.55;
}

.tag-row {
    gap: 6px;
    margin-top: 14px;
}

.tag-row span {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 12px;
}

.card-link,
.rank-link {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    color: var(--cyan);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 188px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.22), transparent 11rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -32px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    background: rgba(34, 211, 238, 0.08);
}

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

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 78px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 78px;
    height: 104px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-item h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

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

.rank-heat {
    color: #fef3c7;
    font-weight: 800;
}

.category-hero,
.search-hero,
.detail-hero {
    margin: 34px auto 0;
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid var(--border);
    border-radius: 32px;
    background:
        radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.2), transparent 16rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
    box-shadow: var(--shadow);
}

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

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

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 34px 0 24px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.filter-controls {
    display: flex;
    gap: 12px;
    width: min(520px, 100%);
}

.filter-controls input,
.filter-controls select,
.search-main-input {
    min-height: 46px;
    padding: 0 16px;
}

.search-page-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-main-input {
    border-radius: 16px;
}

.search-page-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0 72px;
}

.search-page-results a {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.72);
}

.empty-state {
    padding: 24px;
    color: var(--muted);
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.72fr);
    gap: 28px;
    margin: 34px 0 72px;
}

.player-section,
.detail-content,
.detail-side-card {
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.player-section {
    overflow: hidden;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.site-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 36%, rgba(34, 211, 238, 0.18), transparent 18rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
}

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

.play-copy {
    display: grid;
    gap: 14px;
    justify-items: center;
}

.play-copy p {
    margin: 0;
    color: #cbd5e1;
}

.play-button {
    min-width: 168px;
    min-height: 54px;
    font-size: 17px;
}

.player-note {
    margin: 0;
    padding: 14px 18px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.46);
}

.detail-content {
    padding: 28px;
}

.detail-content h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-content h2 {
    margin: 34px 0 10px;
    font-size: 28px;
}

.detail-content p {
    color: #cbd5e1;
}

.detail-tags {
    margin-top: 20px;
}

.detail-side-card {
    overflow: hidden;
}

.detail-side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #0f172a;
}

.detail-side-body {
    padding: 20px;
}

.detail-side-body dl {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 10px 14px;
    margin: 0;
}

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

.detail-side-body dd {
    margin: 0;
    color: var(--text);
}

.related-section {
    margin: 0 0 72px;
}

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

.footer-grid {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.2fr 0.55fr 1fr;
    gap: 34px;
}

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

.footer-grid a {
    display: block;
    margin: 6px 0;
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 17px;
}

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

.footer-links {
    columns: 2;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1120px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-thumbs {
        display: none;
    }
}

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

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

    .hero-content {
        bottom: 18%;
    }

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

    .filter-panel,
    .filter-controls,
    .search-page-form,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-controls {
        width: 100%;
    }

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

@media (max-width: 620px) {
    .nav-shell,
    .page-main,
    .footer-grid,
    .mobile-nav {
        width: min(100% - 22px, 1220px);
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-copy strong {
        font-size: 16px;
    }

    .brand-copy small {
        display: none;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        left: 18px;
        width: calc(100% - 36px);
    }

    .hero-controls {
        right: 18px;
        bottom: 26px;
    }

    .hero-dots {
        left: 18px;
        bottom: 44px;
        transform: none;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .search-page-results {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 54px 72px 1fr;
    }

    .category-hero,
    .search-hero,
    .detail-hero {
        border-radius: 22px;
    }

    .detail-content,
    .detail-side-body {
        padding: 20px;
    }
}
