:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.2);
    --line-strong: rgba(16, 185, 129, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-light: #cbd5e1;
    --accent: #10b981;
    --accent-strong: #059669;
    --accent-soft: rgba(16, 185, 129, 0.16);
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.2), transparent 28rem),
        radial-gradient(circle at 78% 0%, rgba(59, 130, 246, 0.16), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 28px;
}

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #34d399);
    box-shadow: 0 16px 35px rgba(16, 185, 129, 0.28);
}

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

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

.brand-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--muted-light);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
    color: #d1fae5;
    background: var(--accent-soft);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.75);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 8px;
    padding: 16px 0 20px;
}

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.5) 28%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: end;
    gap: 56px;
    min-height: 620px;
    padding-top: 84px;
    padding-bottom: 92px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 1.04;
}

.hero h1 {
    max-width: 820px;
    font-size: clamp(38px, 7vw, 74px);
}

.hero h2 {
    margin: 18px 0 0;
    color: #d1fae5;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;
}

.hero p,
.page-hero p,
.detail-one-line {
    color: var(--muted-light);
    line-height: 1.8;
}

.hero p {
    max-width: 680px;
    margin: 22px 0 0;
    font-size: 18px;
}

.hero-meta,
.rank-meta,
.detail-meta-grid,
.tag-row,
.category-chip-row,
.hero-actions,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

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

.hero-meta span,
.detail-meta-grid span,
.tag-row span,
.category-chip,
.rank-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--muted-light);
}

.hero-meta span,
.rank-meta span,
.tag-row span {
    padding: 6px 10px;
    font-size: 13px;
}

.hero-actions {
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover,
.search-item:hover {
    transform: translateY(-3px);
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.26);
}

.btn.ghost,
.btn.subtle {
    color: #d1fae5;
    border-color: var(--line-strong);
    background: rgba(15, 23, 42, 0.58);
}

.btn.subtle {
    color: var(--muted-light);
    border-color: var(--line);
}

.hero-poster {
    display: block;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

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

.search-panel,
.section-block,
.page-hero,
.detail-main,
.player-section {
    margin-top: 72px;
}

.search-panel,
.feature-band,
.page-hero,
.content-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel {
    padding: 42px;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading.centered {
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

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

.section-heading h2,
.content-card h2,
.category-overview-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.section-heading p,
.category-overview-head p,
.search-panel p,
.content-card p {
    color: var(--muted-light);
    line-height: 1.8;
}

.search-box,
.inline-search {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.72);
}

.search-box {
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 12px 14px;
}

.search-box.large {
    max-width: none;
}

.inline-search {
    min-width: min(360px, 100%);
    padding: 9px 12px;
}

.search-box span,
.inline-search span {
    color: var(--accent);
    font-weight: 800;
}

.search-box input,
.inline-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

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

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

.search-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.search-item:hover,
.movie-card:hover,
.rank-row:hover,
.category-tile:hover {
    border-color: var(--line-strong);
    background: rgba(15, 23, 42, 0.96);
}

.search-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.search-item span,
.rank-body,
.movie-card-body {
    min-width: 0;
}

.search-item strong,
.search-item em,
.movie-title,
.rank-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-item strong {
    font-size: 14px;
}

.search-item em {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.5;
    white-space: normal;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    background: rgba(16, 185, 129, 0.92);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-title {
    font-weight: 800;
    line-height: 1.35;
}

.movie-title:hover,
.rank-title:hover,
.view-more:hover,
.footer-links a:hover,
.breadcrumb a:hover {
    color: #6ee7b7;
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-meta {
    margin: 8px 0 0;
}

.movie-desc {
    display: -webkit-box;
    min-height: 40px;
    margin: 8px 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-more {
    color: #a7f3d0;
    font-weight: 800;
}

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

.category-tile {
    display: flex;
    min-height: 176px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.18), transparent 8rem),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile span {
    color: #d1fae5;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin: 14px 0;
    color: var(--muted-light);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
}

.category-tile em {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-style: normal;
}

.category-tile em a {
    max-width: 100%;
    padding: 5px 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feature-band {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    padding: 34px;
}

.feature-copy {
    align-self: center;
}

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

.feature-copy p {
    color: var(--muted-light);
    line-height: 1.8;
}

.page-hero {
    padding: 48px;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 68px);
}

.page-hero p {
    max-width: 780px;
    margin-bottom: 0;
    font-size: 17px;
}

.category-chip-row {
    margin-top: 24px;
}

.category-chip {
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 800;
}

.category-chip.active,
.category-chip:hover {
    color: #d1fae5;
    border-color: var(--line-strong);
    background: var(--accent-soft);
}

.category-overview-list {
    display: grid;
    gap: 24px;
    margin-top: 28px;
}

.category-overview-card {
    padding: 28px;
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 70px 72px minmax(0, 1fr) 76px;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #d1fae5;
    background: var(--accent-soft);
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-title {
    font-size: 18px;
    font-weight: 900;
}

.rank-body p {
    margin: 8px 0 10px;
    color: var(--muted-light);
    line-height: 1.6;
}

.heat-score {
    justify-self: end;
    color: #34d399;
    font-size: 24px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 42px;
    padding-bottom: 72px;
}

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

.breadcrumb strong {
    color: white;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    max-width: 820px;
    font-size: 19px;
}

.detail-meta-grid {
    margin: 24px 0;
}

.detail-meta-grid span {
    display: inline-flex;
    flex-direction: column;
    min-width: 116px;
    padding: 10px 14px;
    border-radius: 16px;
}

.detail-meta-grid em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    scroll-margin-top: 86px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    color: #ffffff;
    background: #020617;
    cursor: pointer;
}

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

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

.player-cover {
    object-fit: cover;
    opacity: 0.58;
}

.player-gradient {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.24), rgba(2, 6, 23, 0.84));
}

.play-circle {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 22px 48px rgba(16, 185, 129, 0.28);
    font-size: 36px;
}

.player-overlay strong {
    position: relative;
    z-index: 2;
    margin-top: 128px;
    font-size: 18px;
}

.detail-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.content-card {
    padding: 28px;
}

.content-card p {
    margin-bottom: 0;
    font-size: 16px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    padding: 34px 0;
}

.footer-grid p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links a {
    color: var(--muted-light);
    font-weight: 700;
}

.footer-bottom {
    padding: 18px 0 30px;
    color: var(--muted);
    font-size: 13px;
}

[data-search-card].hidden {
    display: none;
}

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

    .small-grid,
    .overview-grid,
    .related-grid,
    .category-grid,
    .quick-results,
    .search-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 300px;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100% - 22px, 1180px);
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

    .hero-content {
        gap: 26px;
        padding-top: 54px;
        padding-bottom: 84px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-poster,
    .detail-poster {
        max-width: 230px;
    }

    .search-panel,
    .feature-band,
    .page-hero,
    .content-card,
    .category-overview-card {
        padding: 22px;
        border-radius: 20px;
    }

    .section-heading.between,
    .category-overview-head,
    .footer-grid {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .category-movie-grid,
    .small-grid,
    .overview-grid,
    .related-grid,
    .category-grid,
    .quick-results,
    .search-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

    .movie-desc {
        display: none;
    }

    .rank-row {
        grid-template-columns: 48px 58px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
    }

    .rank-thumb img {
        width: 58px;
        height: 78px;
    }

    .heat-score {
        display: none;
    }

    .rank-body p {
        display: none;
    }

    .rank-meta span:nth-child(n+3) {
        display: none;
    }

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

    .detail-hero {
        min-height: auto;
    }

    .detail-hero-inner {
        padding-top: 28px;
        padding-bottom: 44px;
    }

    .play-circle {
        width: 66px;
        height: 66px;
        font-size: 28px;
    }

    .player-overlay strong {
        margin-top: 104px;
    }
}

@media (max-width: 470px) {
    .movie-grid,
    .category-movie-grid,
    .small-grid,
    .overview-grid,
    .related-grid,
    .category-grid,
    .quick-results,
    .search-list {
        grid-template-columns: 1fr;
    }

    .search-item {
        grid-template-columns: 52px 1fr;
    }

    .search-item img {
        width: 52px;
        height: 70px;
    }
}
