* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #080b18;
    --bg-soft: #11172b;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-card-strong: rgba(255, 255, 255, 0.1);
    --line: rgba(255, 255, 255, 0.14);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-soft: #94a3b8;
    --yellow: #facc15;
    --yellow-deep: #eab308;
    --purple: #6d28d9;
    --pink: #db2777;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(109, 40, 217, 0.36), transparent 36rem),
        radial-gradient(circle at top right, rgba(219, 39, 119, 0.28), transparent 34rem),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.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(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.site-header__inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.site-logo__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), #fde68a);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 0 34px rgba(250, 204, 21, 0.42);
}

.site-logo strong,
.footer-logo {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fff7ed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.site-logo small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-nav a {
    color: #e2e8f0;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--yellow);
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(255, 255, 255, 0.18);
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 180px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(250, 204, 21, 0.78);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
    background: rgba(255, 255, 255, 0.12);
}

.header-search button,
.mobile-search button,
.filter-bar button,
.btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.filter-bar button,
.btn--primary {
    color: #111827;
    background: linear-gradient(90deg, var(--yellow), var(--yellow-deep));
    box-shadow: 0 12px 34px rgba(234, 179, 8, 0.28);
}

.header-search button:hover,
.mobile-search button:hover,
.filter-bar button:hover,
.btn:hover {
    transform: translateY(-2px);
}

.btn--ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 10px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.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__image,
.hero-slide__image img,
.hero-slide__shade {
    position: absolute;
    inset: 0;
}

.hero-slide__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transform: scale(1.02);
}

.hero-slide__shade--bottom {
    background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.76) 28%, transparent 78%);
}

.hero-slide__shade--side {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.64) 42%, rgba(15, 23, 42, 0.42) 100%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--yellow);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 18px var(--yellow);
}

.hero-slide h1 {
    width: min(680px, 100%);
    margin: 18px 0 12px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-slide p {
    width: min(720px, 100%);
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta a,
.hero-meta span,
.detail-meta span,
.movie-card__tags span,
.tag-cloud span,
.rank-item__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-meta a {
    color: #111827;
    background: var(--yellow);
    border-color: transparent;
    font-weight: 800;
}

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

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

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

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

.section {
    padding: 64px 0 0;
}

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

.section__head h2,
.page-hero h1,
.detail-info h1 {
    margin: 6px 0 0;
    line-height: 1.14;
    letter-spacing: -0.035em;
}

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

.section__head a {
    color: var(--yellow);
    font-weight: 800;
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 18px;
    scrollbar-color: rgba(250, 204, 21, 0.65) rgba(255, 255, 255, 0.08);
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--line);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-strong);
    border-color: rgba(250, 204, 21, 0.38);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.movie-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.58), rgba(219, 39, 119, 0.32));
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.06);
    opacity: 0.84;
}

.movie-card__year,
.movie-card__play {
    position: absolute;
    z-index: 2;
}

.movie-card__year {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #111827;
    background: rgba(250, 204, 21, 0.95);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.movie-card__play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: rgba(250, 204, 21, 0.92);
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    box-shadow: 0 0 38px rgba(250, 204, 21, 0.45);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.movie-card:hover .movie-card__play {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.movie-card__body {
    padding: 16px;
}

.movie-card__body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card__body p {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card__meta,
.movie-card__tags,
.rank-item__meta,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-card__meta span {
    color: var(--muted-soft);
    font-size: 13px;
}

.movie-card__tags span,
.tag-cloud span,
.rank-item__meta span {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 12px;
    color: #dbeafe;
    background: rgba(99, 102, 241, 0.18);
}

.movie-card--small .movie-card__body h3 {
    font-size: 16px;
}

.movie-card--small .movie-card__body p {
    min-height: 42px;
    font-size: 13px;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.74), rgba(219, 39, 119, 0.58));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile span,
.category-card::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.86), rgba(219, 39, 119, 0.68));
}

.category-tile strong,
.category-tile small,
.category-card div {
    position: relative;
    z-index: 2;
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile small {
    margin-top: 8px;
    color: #e2e8f0;
}

.category-card {
    display: flex;
    align-items: flex-end;
    min-height: 240px;
    padding: 24px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 16px;
    color: #e2e8f0;
}

.category-card span {
    color: var(--yellow);
    font-weight: 800;
}

.category-tile:hover img,
.category-card:hover img {
    transform: scale(1.07);
    opacity: 0.32;
}

.section-split,
.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 32px;
    align-items: start;
}

.ranking-panel,
.side-picks {
    position: sticky;
    top: 96px;
    border-radius: var(--radius);
    padding: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.rank-list--large {
    gap: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 56px 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.rank-item__number {
    color: var(--yellow);
    font-size: 32px;
    font-weight: 900;
    text-align: center;
}

.rank-item__cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-item__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 6px;
}

.rank-item p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    padding: 72px 0 28px;
}

.page-hero h1 {
    max-width: 880px;
    font-size: clamp(38px, 6vw, 68px);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.filter-bar select option {
    color: #111827;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.58), rgba(219, 39, 119, 0.32));
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin-top: 18px;
    font-size: clamp(36px, 6vw, 66px);
}

.detail-one-line {
    margin: 18px 0 18px;
    color: #e2e8f0;
    font-size: 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.26), rgba(2, 6, 23, 0.62));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--yellow), #fde68a);
    font-size: 36px;
    box-shadow: 0 0 58px rgba(250, 204, 21, 0.52);
}

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

.detail-copy {
    max-width: 900px;
}

.detail-copy h2 {
    margin-top: 0;
    font-size: 34px;
}

.detail-copy p {
    color: #dbe3ef;
    font-size: 17px;
}

.site-footer {
    margin-top: 80px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(0, 0, 0, 0.88));
    border-top: 1px solid var(--line);
}

.site-footer__grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 32px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 16px;
}

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

.site-footer a:not(.footer-logo) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--yellow);
}

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

.is-filter-hidden {
    display: none !important;
}

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

    .mobile-toggle {
        display: inline-flex;
    }

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

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

    .section-split,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .side-picks {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-header__inner {
        min-height: 66px;
    }

    .site-logo small {
        display: none;
    }

    .hero-slider {
        height: 78vh;
        min-height: 560px;
    }

    .hero-slide__shade--side {
        background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76));
    }

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

    .section {
        padding-top: 44px;
    }

    .section__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid--wide,
    .movie-grid--compact,
    .movie-grid--side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

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

    .detail-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

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

    .rank-item__number {
        font-size: 24px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .container,
    .site-header__inner,
    .mobile-panel,
    .site-footer__grid,
    .site-footer__bottom {
        width: min(100% - 24px, 1180px);
    }

    .movie-grid,
    .movie-grid--wide,
    .movie-grid--compact,
    .movie-grid--side,
    .category-grid,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .rail {
        grid-auto-columns: minmax(240px, 82vw);
    }

    .mobile-panel nav,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1;
        text-align: center;
    }
}
