:root {
    --purple: #9333ea;
    --pink: #db2777;
    --blue: #2563eb;
    --ink: #1f2937;
    --muted: #667085;
    --soft: rgba(255, 255, 255, 0.74);
    --line: rgba(255, 255, 255, 0.42);
    --shadow: 0 24px 70px rgba(81, 40, 139, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 45%, #eff6ff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.nebula-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
}

.marshmallow-gradient {
    background: linear-gradient(120deg, #ffd1dc, #ffb6c1, #e6b3ff, #c7b3ff, #b3d9ff);
}

.glass-effect {
    border: 1px solid var(--line);
    background: var(--soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.text-gradient {
    background: linear-gradient(90deg, var(--purple), var(--pink), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    transition: background 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}

.site-header.is-scrolled,
body.nav-open .site-header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 14px 38px rgba(60, 35, 96, 0.12);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 0 28px rgba(147, 51, 234, 0.42);
    font-size: 15px;
}

.brand-name {
    font-size: 25px;
    font-weight: 850;
    letter-spacing: 0.02em;
}

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

.nav-search {
    margin-left: auto;
}

.nav-search input,
.mobile-search input,
.filter-search input {
    width: 260px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
    color: #374151;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.nav-search button,
.mobile-search button,
.hero-actions a,
.filter-search button,
.play-link,
.primary-link {
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--blue));
    box-shadow: 0 16px 32px rgba(147, 51, 234, 0.24);
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-actions a:hover,
.filter-search button:hover,
.play-link:hover,
.primary-link:hover {
    transform: translateY(-2px) scale(1.02);
    opacity: 0.93;
    box-shadow: 0 20px 42px rgba(147, 51, 234, 0.3);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}

.desktop-nav a {
    transition: color 0.22s ease, transform 0.22s ease;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #4b5563;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.mobile-panel a {
    display: block;
    padding: 12px 4px;
    color: #374151;
    font-weight: 700;
}

.page-main {
    min-height: 70vh;
    padding-top: 76px;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
}

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

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

.hero-bg {
    position: absolute;
    inset: -24px;
    background-position: center;
    background-size: cover;
    filter: blur(11px) brightness(0.68);
    transform: scale(1.08);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12, 10, 24, 0.9) 0%, rgba(17, 24, 39, 0.46) 50%, rgba(147, 51, 234, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: end;
    gap: 54px;
    padding: 0 0 66px;
}

.hero-copy {
    max-width: 780px;
}

.hero-eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #facc15;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 700;
}

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

.hero-actions .ghost-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.17);
    box-shadow: none;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 38px 80px rgba(0, 0, 0, 0.34);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.7));
}

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

.hero-dot {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #ffffff;
}

.content-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 84px;
}

.section-block {
    margin-bottom: 72px;
}

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

.section-heading h1,
.section-heading h2 {
    display: inline;
    margin: 0;
    color: #1f2937;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.section-heading p {
    max-width: 820px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-icon {
    margin-right: 12px;
    color: var(--pink);
    font-size: 24px;
}

.section-more,
.secondary-link {
    min-width: max-content;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--purple);
    background: rgba(255, 255, 255, 0.68);
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(147, 51, 234, 0.12);
}

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

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

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

.horizontal-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 2px 20px;
    scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
    width: 300px;
    min-width: 300px;
    scroll-snap-align: start;
}

.card-hover {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card-hover:hover {
    transform: translateY(-7px) scale(1.015);
    box-shadow: 0 32px 70px rgba(88, 42, 130, 0.24);
}

.movie-link,
.poster-link,
.list-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.32);
}

.vertical-frame {
    aspect-ratio: 3 / 4;
}

.poster-frame img,
.list-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover img {
    transform: scale(1.08);
}

.poster-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.poster-hover span,
.play-dot {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.movie-card:hover .poster-hover {
    opacity: 1;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.76));
}

.corner-label,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.66);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, #f97316, #db2777);
}

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    color: #ffffff;
}

.card-body {
    padding: 17px;
}

.card-body h3,
.list-info h3 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.22s ease;
}

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

.card-body p,
.list-info p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-body h3 {
    font-size: 16px;
}

.card-meta {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(147, 51, 234, 0.08);
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border-radius: 26px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #764ba2 48%, #f093fb);
    box-shadow: var(--shadow);
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #db2777, #f97316, #facc15);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #2563eb, #06b6d4, #8b5cf6);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
    border-radius: 24px;
    padding: 18px;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #475467;
    background: rgba(255, 255, 255, 0.74);
    cursor: pointer;
    font-weight: 800;
}

.filter-pill.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.movie-card.is-hidden {
    display: none;
}

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

.list-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
}

.list-link {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
}

.list-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
}

.list-info {
    padding: 6px 6px 6px 0;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #7e22ce;
    background: #f3e8ff;
    font-size: 12px;
    font-weight: 750;
}

.pagination-note {
    margin-top: 24px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 116px 0 66px;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: -28px;
    background-position: center;
    background-size: cover;
    filter: blur(13px) brightness(0.52);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.42));
}

.detail-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.detail-copy p {
    max-width: 820px;
    margin: 18px 0 0;
    color: #e5e7eb;
    font-size: 17px;
    line-height: 1.85;
}

.detail-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 84px;
}

.player-shell {
    overflow: hidden;
    border-radius: 28px;
    background: #0b1020;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.player-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
    font-size: 28px;
}

.info-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 24px;
    margin-top: 28px;
}

.info-card {
    border-radius: 28px;
    padding: 28px;
}

.info-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.info-card p {
    margin: 0 0 16px;
    color: #475467;
    line-height: 1.9;
}

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

.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a,
.breadcrumb span {
    color: rgba(255, 255, 255, 0.9);
}

.page-title-card {
    border-radius: 30px;
    padding: 44px;
    margin-bottom: 34px;
}

.page-title-card h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.04;
}

.page-title-card p {
    max-width: 860px;
    margin: 0;
    color: #475467;
    line-height: 1.85;
}

.site-footer {
    margin-top: 38px;
    border-width: 1px 0 0;
    padding: 46px 0 22px;
}

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

.footer-logo {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 850;
}

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

.site-footer p,
.site-footer a {
    display: block;
    margin: 0 0 9px;
    color: #667085;
    line-height: 1.7;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.26);
    color: #667085;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 12px;
        font-size: 14px;
    }

    .nav-search input {
        width: 210px;
    }

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 270px;
    }
}

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

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    body.nav-open .mobile-panel {
        display: block;
    }

    .mobile-search input {
        width: 100%;
    }

    .mobile-search {
        margin-bottom: 8px;
    }

    .hero {
        height: auto;
        min-height: 660px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
        gap: 28px;
        padding: 120px 0 74px;
    }

    .hero-poster {
        display: none;
    }

    .grid-4,
    .grid-3,
    .grid-5,
    .category-grid,
    .list-grid,
    .related-grid,
    .footer-grid,
    .info-panel,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        align-items: start;
    }

    .detail-cover {
        width: min(260px, 72vw);
    }

    .list-link {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .filter-search,
    .filter-search input,
    .filter-search button {
        width: 100%;
    }

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

@media (max-width: 560px) {
    .nav-shell {
        height: 66px;
    }

    .brand-name {
        font-size: 22px;
    }

    .page-main {
        padding-top: 66px;
    }

    .content-wrap,
    .detail-content {
        width: min(100% - 24px, 1180px);
        padding-top: 34px;
    }

    .hero h1,
    .hero h2,
    .detail-copy h1 {
        letter-spacing: -0.03em;
    }

    .hero p,
    .detail-copy p {
        font-size: 15px;
    }

    .page-title-card,
    .info-card {
        padding: 24px;
        border-radius: 22px;
    }

    .horizontal-row .movie-card {
        width: 245px;
        min-width: 245px;
    }
}
