:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.62);
    --bg-card-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --emerald: #10b981;
    --emerald-bright: #34d399;
    --cyan: #06b6d4;
    --purple: #a855f7;
    --orange: #fb923c;
    --radius: 1.25rem;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.35);
}

.brand-text {
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--emerald-bright), #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--muted-strong);
    font-size: 0.95rem;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover,
.section-link:hover {
    color: var(--emerald-bright);
}

.header-search,
.mobile-search,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search {
    width: 260px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.search-icon {
    color: var(--muted);
}

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

.filter-bar select {
    appearance: none;
}

.mobile-menu-button {
    display: none;
    color: #ffffff;
    background: transparent;
    border: 0;
    font-size: 1.55rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    color: var(--muted-strong);
}

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

.mobile-search {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.75);
}

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

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

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

.hero-backdrop,
.hero-side-shade {
    position: absolute;
    inset: 0;
}

.hero-backdrop {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-side-shade {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.88));
}

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

.hero-content h1 {
    max-width: 760px;
    margin: 12px 0 18px;
    color: #ffffff;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-weight: 900;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    line-height: 1.75;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--emerald-bright);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow::before,
.section-kicker::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 9px;
    border-radius: 999px;
    background: var(--emerald-bright);
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.82);
}

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

.hero-meta span,
.detail-meta span,
.rank-meta span {
    padding: 7px 13px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.primary-button,
.section-link,
.filter-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.primary-button {
    margin-top: 26px;
    padding: 15px 30px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 24px 60px rgba(16, 185, 129, 0.42);
}

.primary-button.small {
    margin-top: 0;
    padding: 12px 20px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 22px;
    transform: translateY(-50%);
}

.hero-next {
    right: 22px;
    transform: translateY(-50%);
}

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

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

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

.home-container,
.page-pad {
    padding: 48px 0 72px;
}

.content-section {
    margin-bottom: 58px;
}

.hero-search-panel,
.feature-band,
.page-hero,
.movie-detail-card,
.aside-card,
.player-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.78));
    box-shadow: var(--shadow);
}

.hero-search-panel,
.feature-band,
.page-hero,
.movie-detail-card,
.aside-card {
    padding: 28px;
}

.hero-search-panel p,
.page-hero p,
.category-overview-card p,
.movie-detail-card p,
.aside-card p,
.ranking-row p {
    color: var(--muted-strong);
    line-height: 1.8;
}

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

.section-heading h2,
.page-hero h1,
.movie-detail-card h1 {
    margin: 6px 0 0;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.page-hero h1,
.movie-detail-card h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
}

.section-link {
    color: var(--emerald-bright);
    white-space: nowrap;
}

.movie-grid {
    display: grid;
    gap: 18px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
    transform: translateY(-4px) scale(1.025);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.14), rgba(15, 23, 42, 0.95));
}

.poster-frame.small,
.poster-frame.medium {
    aspect-ratio: 2 / 3;
}

.poster-frame.large {
    aspect-ratio: 16 / 9;
}

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

.movie-card a:hover .poster-frame img {
    transform: scale(1.09);
}

.poster-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
    transition: opacity 0.25s ease;
}

.movie-card a:hover .poster-hover {
    opacity: 1;
}

.play-bubble,
.big-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(16, 185, 129, 0.94);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.42);
}

.play-bubble {
    width: 56px;
    height: 56px;
    font-size: 1.35rem;
}

.rating-badge,
.category-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.rating-badge {
    right: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.category-badge {
    left: 10px;
    background: rgba(16, 185, 129, 0.84);
}

.card-content {
    padding: 12px;
}

.card-content h3 {
    margin: 0 0 7px;
    overflow: hidden;
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.card-content p {
    display: -webkit-box;
    min-height: 40px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.78rem;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-pills a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
    border-color: rgba(52, 211, 153, 0.52);
    background: rgba(16, 185, 129, 0.13);
    transform: translateY(-2px);
}

.category-pills span {
    color: var(--emerald-bright);
    font-size: 0.84rem;
}

.filter-bar {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.result-count {
    color: var(--muted);
}

.page-hero {
    margin-bottom: 34px;
}

.compact-hero {
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.2), transparent 36%), linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.86));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumbs a:hover {
    color: var(--emerald-bright);
}

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

.category-overview-card a {
    display: block;
    height: 100%;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.55);
    transition: transform 0.2s ease, border 0.2s ease;
}

.category-overview-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.42);
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.category-overview-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.4rem;
}

.category-overview-head span {
    color: var(--emerald-bright);
    font-weight: 800;
}

.mini-poster-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-top: 16px;
}

.mini-poster-row img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-soft);
}

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

.detail-main {
    min-width: 0;
}

.player-card {
    overflow: hidden;
    padding: 0;
    margin-bottom: 24px;
    background: #000000;
}

.video-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000000;
}

.video-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.26), rgba(0, 0, 0, 0.78));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    font-size: 2rem;
}

.player-cover strong {
    max-width: 80%;
    font-size: clamp(1.25rem, 3vw, 2.2rem);
    text-align: center;
}

.movie-detail-card {
    margin-bottom: 28px;
}

.movie-detail-card h2,
.aside-card h2 {
    margin: 26px 0 10px;
    color: #ffffff;
    font-size: 1.35rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.13);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.detail-aside {
    position: relative;
}

.aside-card {
    margin-bottom: 20px;
}

.poster-summary img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    background: var(--bg-soft);
}

.sticky-related {
    position: sticky;
    top: 86px;
}

.compact-list {
    display: grid;
    gap: 14px;
}

.compact-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.compact-card:hover {
    background: rgba(51, 65, 85, 0.48);
}

.compact-poster {
    width: 72px;
    flex: 0 0 72px;
}

.compact-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bg-soft);
}

.compact-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.compact-info strong {
    overflow: hidden;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-info em {
    color: var(--muted);
    font-size: 0.86rem;
    font-style: normal;
}

.top-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 34px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 54px 92px minmax(0, 1fr) 70px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.58);
}

.rank-number {
    color: var(--emerald-bright);
    font-size: 1.45rem;
    font-weight: 900;
    text-align: center;
}

.rank-poster img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: var(--bg-soft);
}

.rank-info h2 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 1.25rem;
}

.rank-score {
    color: #facc15;
    font-size: 1.35rem;
    text-align: right;
}

.search-large {
    margin-top: 0;
    margin-bottom: 26px;
}

.search-result-heading {
    margin-top: 20px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), #020617);
    color: var(--muted-strong);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 30px;
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 30px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.02rem;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .small-grid,
    .library-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .sticky-related {
        position: static;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        padding: 42px 0;
        justify-content: flex-end;
    }

    .hero-arrow {
        display: none;
    }

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

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

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

    .ranking-row {
        grid-template-columns: 42px 74px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }

    .top-three,
    .category-overview-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .footer-bottom,
    .hero-content {
        width: min(100% - 22px, 1200px);
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .hero-content h1 {
        font-size: 2.35rem;
    }

    .hero-meta span,
    .detail-meta span,
    .rank-meta span {
        font-size: 0.78rem;
    }

    .hero-search-panel,
    .feature-band,
    .page-hero,
    .movie-detail-card,
    .aside-card {
        padding: 20px;
    }

    .small-grid,
    .medium-grid,
    .library-grid {
        gap: 12px;
    }

    .card-content p {
        display: none;
    }

    .mini-poster-row {
        grid-template-columns: repeat(4, 1fr);
    }
}
