:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-925: #07111f;
    --bg-900: #0f172a;
    --bg-850: #111827;
    --bg-800: #1e293b;
    --bg-700: #334155;
    --text-main: #ffffff;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --emerald: #34d399;
    --emerald-deep: #059669;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.18), transparent 32rem),
        radial-gradient(circle at 88% 8%, rgba(34, 211, 238, 0.14), transparent 30rem),
        linear-gradient(180deg, var(--bg-950), var(--bg-900) 44%, var(--bg-950));
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: 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.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.34);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    min-height: 68px;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
}

.brand-text,
.footer-logo {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text-soft);
}

.desktop-nav a,
.nav-dropdown button {
    padding: 8px 0;
    color: var(--text-soft);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
    color: var(--emerald);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    left: 0;
    top: 100%;
    width: 210px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.22s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: rgba(51, 65, 85, 0.82);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.header-search input,
.large-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    color: var(--text-main);
    background: rgba(30, 41, 59, 0.86);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.large-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(52, 211, 153, 0.72);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
    background: rgba(15, 23, 42, 0.96);
}

.header-search button,
.large-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #04111d;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.large-search button:hover,
.search-page-form button:hover,
.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    color: var(--text-main);
    background: rgba(30, 41, 59, 0.88);
}

.mobile-panel {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 8px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-soft);
}

.mobile-panel a:hover {
    background: rgba(51, 65, 85, 0.82);
    color: var(--emerald);
}

.hero {
    background: var(--bg-950);
}

.hero-stage {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56) 48%, rgba(2, 6, 23, 0.15)),
        linear-gradient(0deg, var(--bg-950), rgba(2, 6, 23, 0.55) 38%, transparent 72%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    z-index: 2;
    max-width: var(--container);
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ecfeff;
    background: rgba(16, 185, 129, 0.82);
    box-shadow: 0 14px 36px rgba(16, 185, 129, 0.24);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.eyebrow {
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.13);
    box-shadow: none;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    max-width: 820px;
    font-size: clamp(2.7rem, 6vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-info .lead-text {
    max-width: 720px;
    color: var(--text-soft);
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.inline-meta {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--text-soft);
    background: rgba(148, 163, 184, 0.13);
    border: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.86rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 900;
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #04111d;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.24);
}

.btn-ghost {
    color: var(--text-main);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.56);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 48px;
    height: 64px;
    border: 0;
    border-radius: 16px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.home-search {
    margin-top: -36px;
    position: relative;
    z-index: 7;
}

.search-panel,
.section-block,
.page-hero,
.filter-panel,
.content-card,
.player-card,
.category-card a,
.ranking-row a {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62));
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 460px);
    gap: 26px;
    align-items: center;
    padding: 28px;
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.content-card h2 {
    margin: 12px 0 10px;
    letter-spacing: -0.04em;
}

.search-panel p,
.section-head p,
.category-tile p,
.category-card p,
.content-card p,
.movie-card p,
.ranking-row p,
.site-footer p {
    color: var(--text-muted);
    line-height: 1.72;
}

.large-search,
.search-page-form {
    display: flex;
    gap: 10px;
}

.section-block {
    margin: 42px 0;
    padding: 28px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.section-link {
    align-self: center;
    color: var(--emerald);
    font-weight: 800;
}

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

.full-grid {
    margin-top: 24px;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.46);
    box-shadow: 0 24px 46px rgba(2, 6, 23, 0.42);
}

.poster-wrap {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4.18;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(6, 78, 59, 0.25));
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
    opacity: 0.9;
}

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    background: rgba(5, 150, 105, 0.92);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-content {
    padding: 15px;
}

.card-meta {
    color: var(--emerald);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.card-content h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content p {
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile,
.category-card a {
    display: block;
    min-height: 152px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.12), rgba(34, 211, 238, 0.08));
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span,
.category-card h2 {
    display: block;
    margin-bottom: 8px;
    font-size: 1.24rem;
    font-weight: 900;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-list a:hover {
    background: rgba(30, 41, 59, 0.95);
}

.rank-no,
.ranking-number {
    color: var(--emerald);
    font-weight: 900;
    font-size: 1.2rem;
}

.rank-list em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.85rem;
}

.page-shell {
    padding-bottom: 64px;
}

.page-hero {
    margin-top: 34px;
    padding: 42px;
}

.compact-hero h1,
.category-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-muted);
}

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

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.filter-grid label {
    display: grid;
    gap: 8px;
    color: var(--text-soft);
    font-weight: 700;
}

.filter-panel {
    margin-top: 24px;
    padding: 26px;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4.15;
    background: rgba(15, 23, 42, 0.9);
}

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

.detail-info {
    padding: 36px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.62));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: white;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.26));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #032019;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 16px 50px rgba(52, 211, 153, 0.34);
    font-size: 34px;
    padding-left: 4px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 26px;
}

.content-card {
    padding: 28px;
}

.content-card p {
    font-size: 1.03rem;
}

.detail-tags,
.genre-tags {
    margin-top: 16px;
}

.prev-next {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.prev-next a {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    color: var(--text-soft);
}

.prev-next a:hover {
    color: var(--emerald);
    border-color: rgba(52, 211, 153, 0.42);
}

.ranking-page {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 76px 84px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    box-shadow: none;
}

.ranking-row img {
    width: 84px;
    height: 112px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-row h2 {
    margin: 0 0 8px;
}

.ranking-row p {
    margin: 0 0 8px;
}

.search-results {
    margin-top: 24px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 18px;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
}

.search-result-card img {
    width: 90px;
    height: 122px;
    border-radius: 12px;
    object-fit: cover;
}

.search-result-card h2 {
    margin: 0 0 8px;
}

.search-result-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

.search-empty {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    color: var(--text-soft);
}

.site-footer {
    margin-top: 64px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(148, 163, 184, 0.1);
}

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

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

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

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-content {
        bottom: 82px;
    }

    .hero-arrow {
        top: auto;
        bottom: 18px;
        width: 44px;
        height: 44px;
        font-size: 32px;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .search-panel,
    .detail-hero,
    .detail-content,
    .footer-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }

    .ranking-row a {
        grid-template-columns: 56px 74px 1fr;
    }

    .ranking-row img {
        width: 74px;
        height: 102px;
    }

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

    .prev-next {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

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

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

    .hero h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: 2.25rem;
    }

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

    .section-block,
    .search-panel,
    .page-hero,
    .filter-panel,
    .detail-info,
    .content-card {
        padding: 20px;
        border-radius: 18px;
    }

    .section-head,
    .large-search,
    .search-page-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .search-result-card {
        grid-template-columns: 72px 1fr;
        gap: 12px;
    }

    .search-result-card img {
        width: 72px;
        height: 100px;
    }
}
