:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-2: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #10b981;
    --accent-2: #22d3ee;
    --warning: #facc15;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34%), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

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

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.32);
}

.brand-name,
.footer-brand {
    font-size: 24px;
    background: linear-gradient(90deg, #34d399, #22d3ee);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 650;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover {
    color: var(--accent);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.7);
    color: var(--text);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.hero-stage {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-soft);
}

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

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

.hero-overlay,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-copy {
    width: min(720px, 100%);
    padding-top: 36px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-line {
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    max-width: 760px;
}

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

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

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(16, 185, 129, 0.32);
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

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

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

.primary-btn {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
    border: 1px solid rgba(226, 232, 240, 0.24);
    background: rgba(15, 23, 42, 0.44);
    color: #e2e8f0;
}

.primary-btn:hover,
.ghost-btn:hover,
.category-card:hover,
.movie-card:hover,
.rank-card:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.42);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.hero-thumbs {
    position: absolute;
    z-index: 4;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 86px;
    width: min(390px, 38vw);
    display: grid;
    gap: 10px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(12px);
}

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

.hero-thumb span {
    font-weight: 800;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-band,
.page-main,
.detail-main {
    background: linear-gradient(180deg, var(--bg), #07111f 42%, var(--bg));
}

.search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 26px;
    align-items: center;
    padding: 34px 0;
}

.search-inner h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
}

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

.search-box,
.filter-bar label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 750;
}

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: rgba(15, 23, 42, 0.84);
    color: var(--text);
    padding: 13px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.panel-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-head.centered {
    justify-content: center;
    text-align: center;
}

.section-head h2,
.ranking-copy h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-head p,
.ranking-copy p,
.detail-article p,
.detail-side,
.category-overview-card p {
    color: var(--muted);
}

.text-link {
    color: #67e8f9;
    font-weight: 800;
}

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

.category-card,
.category-overview-card a {
    display: grid;
    gap: 12px;
    min-height: 160px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover a {
    border-color: rgba(16, 185, 129, 0.45);
}

.category-card span,
.category-overview-card h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 22px;
    font-weight: 900;
}

.category-card strong,
.category-overview-card p {
    font-size: 14px;
    font-weight: 600;
}

.category-card em,
.mini-title-row span {
    color: var(--muted-2);
    font-style: normal;
    font-size: 13px;
}

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 290px);
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 0 14px;
    scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
    display: none;
}

.rail-controls {
    display: flex;
    gap: 8px;
}

.rail-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.8);
    color: var(--text);
    font-size: 24px;
}

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

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

.movie-card {
    min-width: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.86);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    scroll-snap-align: start;
}

.movie-card:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.year-badge,
.score-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(2, 6, 23, 0.74);
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 12px;
}

.score-badge {
    right: 12px;
    color: #fde68a;
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.card-body h2,
.card-body h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row {
    min-height: 28px;
}

.ranking-panel {
    padding: 74px 0;
    background: radial-gradient(circle at 18% 20%, rgba(16, 185, 129, 0.2), transparent 34%), linear-gradient(120deg, #0f172a, #111827);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ranking-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    gap: 36px;
    align-items: center;
}

.ranking-copy p {
    max-width: 460px;
}

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

.ranking-list a {
    display: grid;
    grid-template-columns: 48px 1fr 54px;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
}

.ranking-list span,
.rank-num {
    color: #67e8f9;
    font-weight: 900;
}

.ranking-list em,
.rank-card strong {
    color: #facc15;
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    position: relative;
    padding: 92px 0 54px;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.17), transparent 32%), linear-gradient(135deg, #0f172a, #020617);
    border-bottom: 1px solid var(--line);
}

.compact-hero {
    text-align: left;
}

.filter-bar {
    margin-top: 28px;
    display: grid;
    grid-template-columns: minmax(260px, 480px) minmax(160px, 220px);
    gap: 16px;
    align-items: end;
}

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

.mini-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-title-row span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

.rank-section {
    display: grid;
    gap: 14px;
}

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

.rank-card a {
    display: grid;
    grid-template-columns: 72px 120px 1fr 70px;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-card img {
    width: 120px;
    height: 76px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.4s ease;
}

.rank-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-card p,
.rank-card em {
    margin: 0;
    color: var(--muted);
    font-style: normal;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(200px, 320px) 1fr;
    gap: 42px;
    align-items: center;
    padding: 84px 0 46px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: 0 32px 80px rgba(2, 6, 23, 0.58);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: #93c5fd;
    font-weight: 750;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.66);
    color: #e2e8f0;
    font-weight: 800;
}

.player-section {
    padding: 58px 0 34px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: 0 26px 80px rgba(2, 6, 23, 0.48);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.28), rgba(2, 6, 23, 0.72));
    color: #fff;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-ring {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 36px;
    box-shadow: 0 18px 44px rgba(16, 185, 129, 0.36);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 32px 0 46px;
}

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    padding: 28px;
}

.detail-article h2,
.detail-side h2 {
    font-size: 24px;
    margin-top: 0;
}

.detail-article h2:not(:first-child) {
    margin-top: 30px;
}

.detail-article p {
    margin: 12px 0 0;
    font-size: 17px;
    color: #cbd5e1;
}

.detail-side dl {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.detail-side dl div {
    display: grid;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-side dt {
    color: var(--muted-2);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #e2e8f0;
}

.next-prev {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.next-prev a {
    padding: 12px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.78);
    color: #cbd5e1;
}

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

.hidden-by-filter {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
    padding: 26px;
    border-radius: 20px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
    text-align: center;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-grid p {
    max-width: 410px;
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px;
    color: var(--muted-2);
    text-align: center;
    font-size: 14px;
}

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

    .hero-thumbs {
        display: none;
    }
}

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

    .menu-button {
        display: inline-flex;
    }

    .hero-stage {
        height: 72vh;
        min-height: 520px;
    }

    .search-inner,
    .ranking-inner,
    .detail-hero-inner,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-card a {
        grid-template-columns: 52px 92px 1fr;
    }

    .rank-card strong {
        grid-column: 3;
    }

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

@media (max-width: 560px) {
    .container,
    .content-section {
        width: min(100% - 24px, 1180px);
    }

    .brand-name {
        font-size: 20px;
    }

    .hero-stage {
        min-height: 560px;
    }

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

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

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

    .rank-card a {
        grid-template-columns: 44px 1fr;
    }

    .rank-card img {
        display: none;
    }

    .rank-card strong {
        grid-column: 2;
    }

    .detail-poster {
        display: none;
    }
}
