:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #111827;
    --border: rgba(148, 163, 184, 0.22);
    --text: #e5eefb;
    --muted: #94a3b8;
    --accent: #34d399;
    --accent-strong: #10b981;
    --cyan: #22d3ee;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image: linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner,
.footer-inner,
main > section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #04111d;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 1.32rem;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.dropdown-menu a,
.mobile-nav a {
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav a:hover {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.12);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    display: grid;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.dropdown-menu a:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.14);
}

.header-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

.header-search input,
.hero-search input,
.inline-filter input,
.ranking-search input,
.search-large input {
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    width: 210px;
    padding: 0 10px;
}

.header-search button,
.hero-search button,
.inline-filter button {
    border: 0;
    border-radius: 999px;
    color: #04111d;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    font-weight: 900;
    cursor: pointer;
}

.header-search button {
    padding: 9px 16px;
}

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

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-nav a {
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    min-height: 620px;
    padding: 44px 0 24px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 552px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 34px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: blur(24px) saturate(1.2);
    opacity: 0.28;
    transform: scale(1.08);
}

.hero-backdrop,
.detail-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 50%, rgba(2, 6, 23, 0.5) 100%),
        radial-gradient(circle at 72% 18%, rgba(16, 185, 129, 0.24), transparent 32%);
}

.hero-copy,
.hero-poster,
.detail-layout {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 680px;
    color: #cbd5e1;
    font-size: 1.06rem;
    line-height: 1.82;
}

.hero-tags,
.tag-line,
.genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-line span,
.genre-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.09);
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-link,
.watch-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
}

.primary-button {
    color: #04111d;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 16px 42px rgba(16, 185, 129, 0.26);
}

.ghost-button {
    border: 1px solid var(--border);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
}

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

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
    aspect-ratio: 2 / 3;
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #0f172a);
}

.hero-panel {
    display: grid;
    align-content: end;
    gap: 18px;
}

.hero-search-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.hero-search-card h2 {
    margin: 0 0 18px;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.hero-search,
.inline-filter,
.ranking-search,
.search-large {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
}

.hero-search,
.inline-filter {
    padding: 8px;
}

.hero-search input,
.inline-filter input {
    width: 100%;
    padding: 0 12px;
}

.hero-search button,
.inline-filter button {
    padding: 11px 18px;
    white-space: nowrap;
}

.hero-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.section-block {
    padding: 56px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    letter-spacing: -0.06em;
}

.section-heading a,
.text-link {
    color: var(--accent);
}

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

.movie-card,
.category-card,
.category-overview-card,
.rank-item,
.player-card,
.detail-article {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
}

.movie-card:hover,
.rank-item:hover,
.category-card:hover,
.category-overview-card:hover {
    border-color: rgba(52, 211, 153, 0.48);
    background: rgba(15, 23, 42, 0.96);
}

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

.poster-link img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #04111d;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    font-size: 0.78rem;
    font-weight: 900;
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.movie-card h3,
.rank-content h3 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 1.08rem;
    line-height: 1.3;
}

.movie-card p,
.rank-content p,
.category-overview-card p,
.detail-article p {
    color: #cbd5e1;
    line-height: 1.72;
}

.text-link {
    margin-top: 14px;
}

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

.category-card {
    display: grid;
    gap: 10px;
    min-height: 150px;
    padding: 24px;
    border-radius: 24px;
}

.category-card span,
.category-title-link h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.32rem;
    letter-spacing: -0.04em;
}

.category-card strong {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.page-hero {
    margin-top: 38px;
    padding: 54px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 32%);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(2.3rem, 5vw, 5.2rem);
}

.category-overview-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
}

.category-title-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.category-title-link span {
    color: var(--accent);
    font-weight: 900;
}

.category-sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-sample-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.09);
    font-size: 0.84rem;
    font-weight: 800;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
}

.rank-number {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #04111d;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    width: 76px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    background: #0f172a;
}

.rank-content h3,
.rank-content p {
    margin: 0 0 7px;
}

.watch-mini {
    min-width: 64px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: #04111d;
    background: var(--accent);
}

.ranking-search,
.search-large {
    max-width: 620px;
    margin-top: 24px;
    padding: 14px 18px;
}

.ranking-search input,
.search-large input {
    width: 100%;
    font-size: 1.05rem;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: none;
    min-height: 570px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    background-image: var(--detail-image);
    background-position: center;
    background-size: cover;
}

.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    backdrop-filter: blur(18px);
    background: rgba(2, 6, 23, 0.62);
}

.detail-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
    width: min(1240px, calc(100% - 32px));
    min-height: 570px;
    margin: 0 auto;
    padding: 72px 0 56px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    aspect-ratio: 2 / 3;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--muted);
    font-weight: 800;
}

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

.detail-meta {
    margin: 20px 0;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 24px;
    align-items: start;
}

.player-card,
.detail-article {
    border-radius: var(--radius-lg);
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: #000000;
}

.video-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 24px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.24), rgba(2, 6, 23, 0.8));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-symbol {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 50%;
    color: #04111d;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    box-shadow: 0 18px 48px rgba(16, 185, 129, 0.35);
    font-size: 1.8rem;
}

.player-cover strong {
    max-width: 80%;
    text-align: center;
    font-size: clamp(1.3rem, 4vw, 2.4rem);
    letter-spacing: -0.05em;
}

.detail-article {
    padding: 28px;
}

.detail-article h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

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

.info-panel {
    display: grid;
    gap: 10px;
    margin: 24px 0;
}

.info-panel div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.36);
}

.info-panel strong {
    color: var(--accent);
}

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

.footer-inner {
    display: grid;
    gap: 16px;
    padding: 34px 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: var(--accent);
    font-weight: 800;
}

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

@media (max-width: 1100px) {
    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-panel {
        grid-row: 2;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 38px;
    }

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

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

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 28px;
    }

    .hero-poster {
        width: min(240px, 70vw);
    }

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

    .rank-item {
        grid-template-columns: 38px 64px minmax(0, 1fr);
    }

    .watch-mini {
        grid-column: 3;
        justify-self: start;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        align-items: center;
        padding-top: 42px;
    }

    .detail-poster {
        width: min(240px, 70vw);
    }
}

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    main > section,
    .detail-layout {
        width: min(100% - 22px, 1240px);
    }

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

    .hero-section {
        padding-top: 22px;
    }

    .hero-slider {
        min-height: 720px;
        border-radius: 22px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 2.5rem;
    }

    .page-hero {
        padding: 28px;
    }

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

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

    .detail-main,
    .section-block {
        padding-top: 34px;
        padding-bottom: 34px;
    }

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