:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.84);
    --panel-soft: rgba(30, 41, 59, 0.64);
    --line: rgba(6, 182, 212, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --pink: #ec4899;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.32);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.48);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #02111d;
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
    padding: 10px 14px;
    border-radius: 999px;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.10);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
    color: var(--text);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 4px;
    background: var(--cyan);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
}

.mobile-nav a {
    display: block;
    padding: 12px;
    border-radius: 12px;
}

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

.hero-section {
    position: relative;
    min-height: min(720px, calc(100vh - 72px));
    overflow: hidden;
    border-bottom: 1px solid rgba(6, 182, 212, 0.18);
}

.hero-slide {
    position: relative;
    display: none;
    min-height: min(720px, calc(100vh - 72px));
}

.hero-slide.is-active {
    display: block;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.92) 100%),
        radial-gradient(circle at 80% 30%, rgba(34, 211, 238, 0.22), transparent 28rem);
}

.hero-grid {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: min(720px, calc(100vh - 72px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 68px 0 96px;
}

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

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.10);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.home-search button,
.filter-actions button,
.filter-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button,
.filter-actions button {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #02111d;
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.25);
}

.ghost-button,
.filter-actions a {
    border: 1px solid rgba(6, 182, 212, 0.32);
    background: rgba(15, 23, 42, 0.66);
    color: var(--cyan);
}

.primary-button:hover,
.ghost-button:hover,
.home-search button:hover,
.filter-actions button:hover,
.filter-actions a:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(6, 182, 212, 0.32);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

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

.hero-dot {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.58);
}

.quick-search {
    margin-top: -46px;
    position: relative;
    z-index: 10;
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.home-search input,
.search-box input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    padding: 0 18px;
}

.home-search input:focus,
.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

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

.quick-links a {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(30, 41, 59, 0.48);
}

.section-block {
    margin-top: 56px;
}

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

.section-heading h2,
.text-section h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.76);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.46));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.32);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.56);
    box-shadow: 0 24px 56px rgba(8, 47, 73, 0.42);
}

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

.card-cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.card-play,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.card-play {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    background: rgba(6, 182, 212, 0.92);
    color: #02111d;
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 12px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.rank-row span {
    grid-row: span 2;
    min-width: 28px;
    color: var(--cyan);
    font-weight: 900;
}

.rank-row img {
    grid-row: span 2;
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

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

.rank-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.category-card,
.category-overview-card a {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(59, 130, 246, 0.06)),
        rgba(15, 23, 42, 0.68);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.56);
}

.category-card span,
.category-overview-card strong {
    color: var(--cyan);
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 500;
}

.page-main {
    padding: 36px 0 72px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 7vw, 72px);
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 30px;
    background:
        radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
    box-shadow: var(--shadow);
}

.slim-hero h1,
.rank-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.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: end;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0;
    padding: 18px;
    border: 1px solid rgba(51, 65, 85, 0.74);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.70);
}

.search-box {
    flex: 1;
    display: grid;
    gap: 8px;
    color: var(--cyan);
    font-weight: 800;
}

.empty-state {
    display: none;
    margin-top: 20px;
    padding: 28px;
    border: 1px solid rgba(51, 65, 85, 0.74);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.70);
    color: var(--muted-strong);
    text-align: center;
}

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.category-samples span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.42);
}

.detail-main {
    padding: 30px 0 72px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 30px;
    align-items: start;
}

.player-panel,
.detail-copy,
.text-section {
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.player-panel {
    padding: 14px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #000;
}

.movie-video,
.video-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    object-fit: contain;
    background: #000;
}

.video-cover {
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    filter: saturate(1.08);
}

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

.play-ring {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #02111d;
    font-size: 28px;
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.36);
}

.detail-copy {
    padding: 28px;
}

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;
}

.lead-text {
    margin: 0 0 18px;
    color: var(--muted-strong);
    font-size: 18px;
}

.detail-tags {
    margin: 18px 0 22px;
}

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

.meta-list div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(51, 65, 85, 0.66);
}

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

.meta-list dd {
    margin: 0;
    color: var(--text);
}

.text-section {
    margin-top: 24px;
    padding: 28px;
}

.text-section p {
    margin: 14px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: var(--muted);
}

.footer-links a {
    padding: 8px 10px;
    border-radius: 999px;
}

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

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

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

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

    .hero-poster {
        max-width: 360px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-grid {
        padding-top: 48px;
        gap: 28px;
    }

    .hero-poster {
        max-width: 260px;
    }

    .home-search,
    .filter-panel,
    .footer-inner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

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

    .rank-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        padding: 14px;
    }
}

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

    .quick-search,
    .page-hero,
    .detail-copy,
    .text-section {
        border-radius: 22px;
        padding: 20px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 34px;
    }
}
