:root {
    --purple-950: #2e064f;
    --purple-900: #581c87;
    --purple-700: #7e22ce;
    --purple-600: #9333ea;
    --purple-500: #a855f7;
    --pink-600: #db2777;
    --pink-500: #ec4899;
    --pink-100: #fce7f3;
    --gray-950: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(79, 10, 115, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 42%, #fdf2f8 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--purple-600), var(--pink-500), #c084fc);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.28);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    transition: color 0.25s ease, transform 0.25s ease;
}

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

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

.header-search input,
.live-search,
.search-large input {
    border: 0;
    outline: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: var(--white);
    padding: 11px 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.header-search input::placeholder,
.search-large input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.header-search button,
.search-large button,
.hero-button,
.section-action,
.play-trigger,
.player-button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple-600), var(--pink-600));
    color: var(--white);
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(219, 39, 119, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.header-search button:hover,
.search-large button:hover,
.hero-button:hover,
.section-action:hover,
.play-trigger:hover,
.player-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(219, 39, 119, 0.32);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 20px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    color: var(--white);
    background: var(--purple-950);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 28%, rgba(236, 72, 153, 0.36), transparent 30%),
        linear-gradient(90deg, rgba(20, 4, 42, 0.92) 0%, rgba(46, 6, 79, 0.76) 42%, rgba(20, 4, 42, 0.36) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.85), transparent 50%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
    gap: 44px;
    align-items: center;
    padding: 72px 0;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.06;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.tag-list span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.hero-panel {
    border-radius: 28px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-panel img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

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

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

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

.section {
    margin: 58px auto 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--gray-950);
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--gray-600);
}

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

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

.category-tile {
    min-height: 176px;
    border-radius: 26px;
    padding: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--purple-600), var(--pink-500));
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(147, 51, 234, 0.22);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 150px 1fr;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #f3e8ff, #fce7f3);
}

.poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card.horizontal .poster img {
    height: 100%;
    aspect-ratio: auto;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    background: linear-gradient(90deg, var(--purple-600), var(--pink-500));
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--gray-950);
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--purple-700);
}

.card-body p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--gray-600);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--purple-700);
    font-size: 13px;
    font-weight: 700;
}

.rank-wrap {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 28px;
}

.rank-lines {
    display: grid;
    gap: 12px;
}

.rank-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-radius: 18px;
    padding: 14px 16px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
}

.rank-line span {
    font-weight: 800;
}

.rank-line small {
    color: var(--gray-600);
}

.page-title {
    padding: 56px 0 24px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 28px;
}

.live-search {
    width: min(520px, 100%);
    background: var(--white);
    color: var(--gray-950);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.09);
}

.search-large {
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin: 24px 0 34px;
}

.search-large input {
    flex: 1;
    background: var(--white);
    color: var(--gray-950);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.09);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 36px;
    align-items: end;
    padding: 56px 0 36px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    background: #f3e8ff;
    box-shadow: var(--shadow);
}

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

.detail-title .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.detail-title .meta-pill {
    background: linear-gradient(90deg, var(--purple-600), var(--pink-500));
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.32);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(46, 6, 79, 0.42));
}

.play-trigger {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    padding: 0;
    font-size: 34px;
}

.player-shell.is-playing .player-cover {
    display: none;
}

.content-panel {
    margin-top: 30px;
    border-radius: 28px;
    padding: 30px;
    background: var(--white);
    box-shadow: 0 14px 42px rgba(17, 24, 39, 0.08);
}

.content-panel h2 {
    margin: 0 0 14px;
    color: var(--gray-950);
    font-size: 26px;
}

.content-panel p {
    margin: 0 0 18px;
    color: var(--gray-700);
    text-align: justify;
}

.breadcrumb {
    padding-top: 24px;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--purple-700);
    font-weight: 700;
}

.site-footer {
    margin-top: 72px;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(180deg, var(--purple-900), var(--purple-950));
}

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

.footer-inner p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.72);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: end;
    gap: 14px;
}

.footer-links a:hover {
    color: #f9a8d4;
}

.empty-result {
    border-radius: 24px;
    padding: 34px;
    color: var(--gray-600);
    background: var(--white);
    box-shadow: 0 14px 42px rgba(17, 24, 39, 0.08);
}

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links,
    .header-search {
        display: none;
        width: 100%;
    }

    .nav-links.open,
    .header-search.open {
        display: flex;
    }

    .nav-links.open {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-search.open input {
        flex: 1;
    }

    .hero-content,
    .detail-hero,
    .rank-wrap,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 360px;
    }

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

@media (max-width: 620px) {
    .hero,
    .hero-content {
        min-height: 760px;
    }

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

    .movie-card.horizontal {
        grid-template-columns: 112px 1fr;
    }

    .section-head,
    .toolbar,
    .search-large {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-line {
        flex-direction: column;
    }

    .content-panel {
        padding: 22px;
    }
}
