:root {
    color-scheme: dark;
    --page-bg: #09090b;
    --panel-bg: #18181b;
    --panel-soft: rgba(39, 39, 42, 0.78);
    --line: rgba(63, 63, 70, 0.85);
    --line-soft: rgba(63, 63, 70, 0.45);
    --text: #fafafa;
    --muted: #a1a1aa;
    --muted-dark: #71717a;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --green: #34d399;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    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.12), transparent 34rem), var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(39, 39, 42, 0.86);
    background: rgba(9, 9, 11, 0.92);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.2);
    font-weight: 900;
}

.logo-text {
    display: grid;
    gap: 1px;
}

.logo-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--muted-dark);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: #d4d4d8;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
    background: rgba(39, 39, 42, 0.74);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    position: relative;
    width: min(280px, 30vw);
}

.search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid #3f3f46;
    background: #18181b;
    color: var(--text);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input {
    padding: 10px 14px 10px 38px;
    font-size: 14px;
}

.search-form span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-dark);
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--cyan-strong);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #3f3f46;
    border-radius: 12px;
    color: var(--text);
    background: #18181b;
    cursor: pointer;
}

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

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

.mobile-nav .nav-link {
    display: block;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #09090b;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.68) 44%, rgba(0, 0, 0, 0.18)), linear-gradient(0deg, #09090b 0%, transparent 45%, rgba(9, 9, 11, 0.35) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    padding: 86px 0;
}

.eyebrow,
.card-tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.42);
    font-size: 13px;
}

.hero h1 {
    margin: 18px 0 18px;
    max-width: 850px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
}

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

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta {
    margin-bottom: 28px;
    color: #d4d4d8;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 22px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
    color: #fff;
    background: var(--cyan-strong);
    box-shadow: 0 16px 28px rgba(6, 182, 212, 0.2);
}

.button-primary:hover {
    transform: translateY(-2px);
    background: #0891b2;
}

.button-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.button-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.hero-dots {
    display: flex;
    gap: 9px;
    pointer-events: auto;
}

.hero-dot {
    width: 38px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.hero-arrows {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.72);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.section {
    padding: 72px 0;
}

.section-dark {
    background: #111113;
}

.section-gradient {
    background: linear-gradient(180deg, #09090b, #18181b 52%, #09090b);
}

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

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

.section-kicker {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 6px;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-desc {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 720px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: rgba(24, 24, 27, 0.86);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    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.55);
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.14);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.12));
}

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

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

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card-play span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--cyan-strong);
    font-size: 24px;
    box-shadow: 0 18px 36px rgba(6, 182, 212, 0.24);
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.3;
    margin-bottom: 8px;
}

.card-title:hover {
    color: var(--cyan);
}

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

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

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(63, 63, 70, 0.7);
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.98), rgba(8, 47, 73, 0.28));
    position: relative;
    overflow: hidden;
}

.category-card:after {
    content: "";
    position: absolute;
    right: -46px;
    top: -46px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 850;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(24, 24, 27, 0.76);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 13px;
    background: #27272a;
}

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

.rank-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 820;
}

.rank-title:hover {
    color: var(--cyan);
}

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

.feature-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px;
    align-items: center;
    padding: 36px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.3), rgba(30, 41, 59, 0.22));
    box-shadow: var(--shadow);
}

.feature-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid rgba(34, 211, 238, 0.25);
}

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

.feature-copy h2 {
    margin: 14px 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.feature-copy p {
    color: #d4d4d8;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: rgba(24, 24, 27, 0.76);
    margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
    padding: 12px 14px;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(24, 24, 27, 0.72);
    text-align: center;
}

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

.page-hero {
    padding: 74px 0 48px;
    background: radial-gradient(circle at 22% 0%, rgba(34, 211, 238, 0.14), transparent 34rem), linear-gradient(180deg, #09090b, #111113);
}

.page-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #d4d4d8;
    font-size: 18px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 32px;
}

.player-card {
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 26px;
    overflow: hidden;
    background: #050505;
    box-shadow: var(--shadow);
}

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

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.45));
    cursor: pointer;
}

.play-trigger span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--cyan-strong);
    font-size: 34px;
    box-shadow: 0 24px 52px rgba(6, 182, 212, 0.25);
}

.play-trigger.is-hidden {
    display: none;
}

.detail-panel,
.side-panel {
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: rgba(24, 24, 27, 0.78);
}

.detail-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 860;
}

.detail-panel p,
.side-panel p {
    color: #d4d4d8;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.detail-tags span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #27272a;
    color: #d4d4d8;
    font-size: 13px;
}

.side-poster {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 10;
    background: #27272a;
    margin-bottom: 18px;
}

.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.site-footer {
    border-top: 1px solid rgba(39, 39, 42, 0.86);
    padding: 44px 0;
    background: #09090b;
    color: var(--muted);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: end;
}

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

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

    .mobile-toggle {
        display: block;
    }

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

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

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

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 720px) {
    .hero,
    .hero-content {
        min-height: 590px;
    }

    .hero-copy {
        padding: 62px 0 92px;
    }

    .hero-actions,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item .button {
        grid-column: 1 / -1;
    }

    .header-inner {
        min-height: 66px;
    }

    .logo-subtitle {
        display: none;
    }
}
