:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: #0f1d31;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-solid: #111c2f;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(125, 211, 252, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --amber: #f59e0b;
    --rose: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 22px;
    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;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 20% 5%, rgba(34, 211, 238, 0.18), transparent 30%),
        radial-gradient(circle at 85% 8%, rgba(79, 70, 229, 0.18), transparent 28%),
        linear-gradient(180deg, #07111f 0%, #0b1220 46%, #050b15 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    width: min(1220px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(125, 211, 252, 0.14);
    background: rgba(7, 17, 31, 0.88);
    backdrop-filter: blur(22px);
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.38);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #06111f;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.32);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-copy strong {
    font-size: 24px;
    letter-spacing: 0.04em;
}

.brand-copy em {
    font-size: 12px;
    color: var(--cyan);
    font-style: normal;
    margin-top: 5px;
}

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

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.14);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
}

.mobile-nav-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-block: 14px 18px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-stage {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 800ms ease, transform 1100ms ease;
    pointer-events: none;
}

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 11, 21, 0.96) 0%, rgba(7, 17, 31, 0.82) 38%, rgba(7, 17, 31, 0.36) 68%, rgba(7, 17, 31, 0.94) 100%),
        linear-gradient(180deg, rgba(7, 17, 31, 0.15), #07111f 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 640px;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    margin: 24px 0;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #dbeafe;
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.text-button,
.small-button,
.section-more,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.primary-button,
.quick-search button {
    border: 0;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

.ghost-button,
.small-button,
.section-more {
    border: 1px solid var(--line-strong);
    color: #ecfeff;
    background: rgba(15, 23, 42, 0.68);
}

.text-button {
    color: var(--cyan);
    padding-inline: 10px;
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.small-button:hover,
.section-more:hover,
.quick-search button:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    transition: width 180ms ease, background-color 180ms ease;
}

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

.quick-search-panel {
    position: relative;
    z-index: 8;
    margin-top: -48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.quick-search label,
.filter-bar label {
    display: block;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.quick-search div,
.filter-bar {
    display: flex;
    gap: 12px;
}

.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #e2e8f0;
    background: rgba(2, 8, 23, 0.54);
    padding: 0 15px;
    outline: none;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.quick-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
}

.page-stack {
    display: grid;
    gap: 48px;
    padding-block: 56px;
}

.content-section {
    display: grid;
    gap: 24px;
}

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

.section-heading h2,
.footer-grid h2,
.text-panel h2,
.category-overview-card h2,
.rank-info h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-heading p,
.category-overview-card p,
.text-panel p,
.rank-info p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
    margin: 8px 0 0;
}

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.92));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.poster-link img,
.category-tile img,
.rank-poster img,
.detail-poster img,
.category-cover-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 280ms ease, filter 280ms ease;
}

.poster-shade,
.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 8, 23, 0.88) 100%);
}

.poster-year {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #06111f;
    background: rgba(125, 211, 252, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.poster-play,
.player-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.9);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
    opacity: 0;
    transition: opacity 220ms ease, transform 220ms ease;
}

.poster-play::after,
.player-play-icon::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 17px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid #0f172a;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.rank-card:hover .rank-poster img {
    transform: scale(1.08);
    filter: saturate(1.08) contrast(1.05);
}

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

.card-body {
    padding-top: 12px;
}

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

.card-body h3 a:hover,
.rank-info h2 a:hover,
.category-overview-card h2 a:hover,
.inline-links a:hover {
    color: var(--cyan);
}

.card-body p {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 8px;
    color: #7dd3fc;
    font-size: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    min-height: 24px;
    font-size: 11px;
    padding: 4px 8px;
    color: #cbd5e1;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel-solid);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 62px;
    font-size: 24px;
}

.category-tile em {
    bottom: 18px;
    color: #cbd5e1;
    font-size: 13px;
    font-style: normal;
    line-height: 1.55;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.slim-hero {
    padding: 72px 0;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.25), transparent 36%);
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 66px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 24px;
}

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

.category-overview-grid {
    display: grid;
    gap: 22px;
    padding-block: 54px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.20);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    min-height: 160px;
    overflow: hidden;
    border-radius: 18px;
}

.category-cover-stack img {
    min-height: 160px;
}

.inline-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 18px;
}

.inline-links a {
    color: #bae6fd;
    font-size: 14px;
}

.filter-bar {
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar label {
    min-width: 100px;
    margin: 0;
    align-self: center;
}

.filter-bar select {
    width: 190px;
}

.wide-filter input {
    flex: 1 1 420px;
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: #94a3b8;
    border: 1px dashed var(--line-strong);
    border-radius: 22px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 70px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-card.top-rank {
    border-color: rgba(245, 158, 11, 0.34);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.78));
}

.rank-number {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    color: #06111f;
    font-weight: 950;
    font-size: 22px;
    background: linear-gradient(135deg, #fef3c7, var(--amber));
}

.rank-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--panel-solid);
}

.rank-info h2 {
    font-size: clamp(20px, 2.5vw, 28px);
}

.detail-hero {
    min-height: 640px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    filter: blur(2px) saturate(1.05);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 11, 21, 0.98), rgba(7, 17, 31, 0.78), rgba(7, 17, 31, 0.96)),
        linear-gradient(180deg, transparent, #07111f 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding-block: 54px 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
}

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

.detail-copy h1 {
    font-size: clamp(40px, 6vw, 72px);
}

.detail-copy .primary-button {
    margin-top: 26px;
}

.player-section {
    padding-top: 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--line-strong);
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    overflow: hidden;
    color: #fff;
    background: #020617;
    transition: opacity 240ms ease, visibility 240ms ease;
}

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

.player-cover-bg,
.player-cover-bg img,
.player-cover-mask {
    position: absolute;
    inset: 0;
}

.player-cover-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) scale(1.08) saturate(0.9);
    opacity: 0.56;
}

.player-cover-mask {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.92) 60%);
}

.player-cover strong {
    position: absolute;
    left: 28px;
    bottom: 24px;
    right: 28px;
    z-index: 2;
    text-align: left;
    font-size: clamp(24px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.player-play-icon {
    z-index: 2;
    width: 76px;
    height: 76px;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.player-play-icon::after {
    left: 31px;
    top: 24px;
    border-top-width: 14px;
    border-bottom-width: 14px;
    border-left-width: 21px;
}

.detail-content {
    padding-block: 44px 64px;
}

.text-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.text-panel p {
    color: #d1d5db;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding-block: 46px;
}

.footer-grid h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

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

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

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

    .desktop-nav {
        display: none;
    }

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

    .site-header.is-open .mobile-nav {
        display: block;
    }
}

@media (max-width: 900px) {
    .quick-search-panel,
    .footer-grid,
    .detail-layout,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

    .rank-card {
        grid-template-columns: 54px 76px 1fr;
    }

    .rank-card .small-button {
        grid-column: 3;
        justify-self: start;
    }

    .detail-poster {
        width: min(340px, 100%);
    }
}

@media (max-width: 680px) {
    .site-shell {
        width: min(100% - 22px, 1220px);
    }

    .brand-copy strong {
        font-size: 19px;
    }

    .brand-copy em {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 580px;
    }

    .hero-copy {
        padding-block: 56px 86px;
    }

    .quick-search-panel {
        margin-top: -24px;
        padding: 16px;
    }

    .quick-search div,
    .filter-bar {
        flex-direction: column;
    }

    .filter-bar select {
        width: 100%;
    }

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

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

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

    .category-tile {
        min-height: 220px;
    }

    .rank-card {
        grid-template-columns: 42px 68px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 17px;
    }

    .rank-info p,
    .rank-info .tag-row {
        display: none;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-hero-inner {
        padding-block: 34px 44px;
    }

    .player-section {
        padding-top: 28px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .text-panel {
        padding: 20px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
