:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.2);
    --brand: #34d399;
    --brand-strong: #10b981;
    --accent: #38bdf8;
    --radius-lg: 28px;
    --radius-md: 20px;
    --shadow: 0 26px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.14), transparent 30%),
        radial-gradient(circle at 90% 12%, rgba(56, 189, 248, 0.12), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #00110c;
    font-size: 15px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    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,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--brand);
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: min(340px, 32vw);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

.nav-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input {
    flex: 1;
    padding: 8px 12px;
}

.nav-search button,
.hero-search button,
.primary-button,
.ghost-button,
.section-more {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.nav-search button,
.hero-search button,
.primary-button {
    color: #02130d;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.25);
}

.nav-search button {
    padding: 8px 15px;
}

.mobile-nav-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
}

.mobile-nav-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel-strong);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

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

.hero-stage {
    position: relative;
    min-height: 650px;
}

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

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

.hero-slide > img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.22)),
        linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.1) 36%, transparent);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 0 150px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.07em;
}

.hero h2 {
    margin: 0 0 10px;
    color: #d1fae5;
    font-size: clamp(24px, 3.6vw, 42px);
    letter-spacing: -0.04em;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: #bbf7d0;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.category-tile:hover,
.movie-card:hover,
.category-card-large:hover {
    transform: translateY(-3px);
}

.ghost-button,
.section-more {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 126px;
    display: flex;
    gap: 10px;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    z-index: 5;
}

.hero-dots button {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--brand);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 38px;
    z-index: 10;
    display: flex;
    gap: 10px;
    width: min(860px, calc(100% - 32px));
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.hero-search input {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
}

.hero-search button {
    padding: 0 24px;
}

main {
    position: relative;
    z-index: 1;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2 {
    margin: 0;
    letter-spacing: -0.05em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading p,
.page-hero p,
.site-footer p,
.movie-card p,
.detail-one-line,
.detail-article p {
    color: var(--muted);
}

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

.category-tile,
.category-card-large,
.movie-card,
.filter-panel,
.player-shell,
.detail-article {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.56));
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.26);
    backdrop-filter: blur(18px);
}

.category-tile {
    min-height: 150px;
    padding: 24px;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover {
    border-color: rgba(52, 211, 153, 0.42);
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    color: var(--brand);
    font-weight: 900;
}

.category-tile strong {
    display: block;
    color: #e2e8f0;
    font-size: 16px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

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

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    color: #02130d;
    background: var(--brand);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    color: #02130d;
    background: linear-gradient(135deg, #fde68a, var(--brand));
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: #a7f3d0;
    font-size: 12px;
    font-weight: 800;
}

.movie-meta span,
.detail-meta span,
.tag-row span {
    padding: 4px 8px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.08);
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card p {
    min-height: 66px;
    margin: 0 0 12px;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
}

.compact-card .poster-link {
    aspect-ratio: 2 / 3;
}

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

.subpage-main {
    padding-top: 32px;
}

.page-hero {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 68px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.62));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
    color: #cbd5e1;
    font-size: 14px;
}

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

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

.category-card-large {
    min-height: 260px;
    padding: 28px;
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card-large h2 {
    margin: 0 0 12px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.category-preview-links a {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.04);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 24px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.52);
}

.filter-panel select option {
    color: #0f172a;
}

.empty-state {
    display: none;
    margin: 24px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
}

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

.movie-detail-main {
    margin-top: -72px;
}

.detail-hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    padding-top: 126px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    filter: blur(3px) saturate(1.2);
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.4)),
        linear-gradient(0deg, var(--bg), transparent 54%);
}

.detail-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-copy h1 {
    max-width: 820px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.03;
}

.detail-one-line {
    max-width: 780px;
    margin: 18px 0 20px;
    font-size: 19px;
}

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

.player-section {
    margin-top: -90px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.movie-player {
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 2;
    cursor: pointer;
}

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

.player-cover img {
    object-fit: cover;
    opacity: 0.52;
}

.big-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #00110c;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 22px 58px rgba(16, 185, 129, 0.42);
    cursor: pointer;
    font-size: 30px;
    transform: translate(-50%, -50%);
}

.detail-article {
    padding: 32px;
    border-radius: var(--radius-lg);
}

.detail-article h2 {
    margin-bottom: 12px;
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 26px;
    font-size: 17px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #cbd5e1;
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

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

    .nav-search {
        width: min(420px, 48vw);
    }

    .mobile-nav-button {
        display: inline-block;
    }

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

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

@media (max-width: 860px) {
    .nav-shell {
        height: auto;
        min-height: 68px;
        padding: 12px 0;
    }

    .site-logo {
        font-size: 20px;
    }

    .nav-search {
        display: none;
    }

    .hero,
    .hero-stage {
        min-height: 620px;
    }

    .hero-content {
        padding: 88px 0 156px;
    }

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

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

    .hero-search {
        flex-direction: column;
        border-radius: 22px;
    }

    .hero-search button {
        min-height: 48px;
    }

    .section-heading,
    .detail-grid {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

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

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

    .page-hero {
        padding: 36px 22px;
        border-radius: 24px;
    }

    .detail-poster {
        width: min(300px, 80vw);
        margin-bottom: 28px;
    }

    .detail-copy h1 {
        font-size: 42px;
    }

    .player-section {
        margin-top: -40px;
    }

    .compact-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .movie-grid,
    .full-grid,
    .ranking-grid,
    .category-grid,
    .category-large-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 38px 0;
    }

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

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

    .compact-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .big-play-button {
        width: 72px;
        height: 72px;
    }
}
