:root {
    --purple: #9333ea;
    --purple-dark: #4c1d95;
    --pink: #ec4899;
    --pink-soft: #fdf2f8;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #eadcff;
    --card: #ffffff;
    --shadow: 0 18px 50px rgba(88, 28, 135, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #faf5ff 0%, #fdf2f8 42%, #ffffff 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 52%, #a855f7 100%);
    box-shadow: 0 12px 28px rgba(88, 28, 135, 0.25);
}

.header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.nav-link {
    font-size: 15px;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    transform: translateY(-1px);
    font-weight: 700;
}

.header-search {
    position: relative;
    width: 220px;
}

.header-search input,
.mobile-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 10px 42px 10px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.header-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto 12px;
}

.mobile-panel button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: var(--purple-dark);
    background: #ffffff;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    max-width: 560px;
    margin: 0 auto;
}

.mobile-panel nav a {
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.34) 58%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
    padding-top: 30px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.hero p {
    margin: 0 0 24px;
    max-width: 680px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.82);
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.34);
}

.btn-secondary {
    color: var(--purple-dark);
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(88, 28, 135, 0.14);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrows button {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-arrows button:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 58px 0 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 900;
}

.section-bar {
    width: 5px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--purple), var(--pink));
}

.section-intro {
    margin: -8px 0 24px;
    max-width: 840px;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    min-height: 144px;
    padding: 24px;
    border-radius: 24px;
    text-align: center;
    background: linear-gradient(135deg, #f3e8ff, #fce7f3);
    box-shadow: 0 12px 30px rgba(88, 28, 135, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #e9d5ff, #fbcfe8);
}

.category-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 12px 34px rgba(88, 28, 135, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.movie-card a {
    display: block;
    height: 100%;
}

.movie-poster {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #2e1065, #831843);
}

.movie-card-compact .movie-poster {
    height: 210px;
}

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

.movie-card-horizontal .movie-poster {
    height: 100%;
    min-height: 160px;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 64%);
    transition: opacity 0.24s ease;
}

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

.movie-badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.play-hover {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--purple);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-line {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #7c3aed;
    font-size: 13px;
    font-weight: 700;
}

.movie-meta span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3e8ff;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #be185d;
    background: #fce7f3;
    font-size: 12px;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 54px 72px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(88, 28, 135, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.ranking-row img {
    width: 72px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-content strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.rank-content small {
    color: var(--muted);
}

.rank-score {
    padding: 7px 12px;
    border-radius: 999px;
    color: #92400e;
    font-weight: 900;
    background: #fef3c7;
}

.page-hero {
    padding: 64px 0 34px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.45), transparent 32%), linear-gradient(135deg, #4c1d95, #831843);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 900;
}

.page-hero p {
    max-width: 860px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin: 28px 0;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 34px rgba(88, 28, 135, 0.08);
    backdrop-filter: blur(14px);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--text);
    background: #ffffff;
    outline: 0;
}

.empty-state {
    display: none;
    padding: 32px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
    gap: 28px;
    padding-top: 34px;
}

.breadcrumb {
    margin: 24px 0 0;
    color: #7c3aed;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #be185d;
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: #030712;
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    background: #000000;
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16));
    cursor: pointer;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: var(--purple);
    font-size: 34px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.06);
}

.detail-main h1 {
    margin: 28px 0 12px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.15;
    font-weight: 900;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #6d28d9;
    font-weight: 800;
    background: #f3e8ff;
}

.detail-section {
    margin-top: 22px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(88, 28, 135, 0.08);
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.sidebar-card {
    position: sticky;
    top: 92px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(88, 28, 135, 0.08);
}

.sidebar-card img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    margin-bottom: 16px;
}

.sidebar-card h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.sidebar-list {
    display: grid;
    gap: 10px;
}

.sidebar-list a {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
    color: var(--text);
}

.sidebar-list img {
    width: 44px;
    height: 58px;
    margin: 0;
    border-radius: 8px;
    object-fit: cover;
}

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

.site-footer {
    margin-top: 70px;
    color: #ffffff;
    background: linear-gradient(180deg, #581c87, #3b0764);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

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

.site-footer p {
    margin: 0;
    color: #e9d5ff;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

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

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

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: #d8b4fe;
    border-top: 1px solid rgba(216, 180, 254, 0.18);
}

@media (max-width: 1080px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        height: 520px;
    }

    .hero-arrows button {
        display: none;
    }

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

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

    .sidebar-card {
        position: static;
    }

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

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

@media (max-width: 560px) {
    .site-container {
        width: min(100% - 22px, 1180px);
    }

    .logo {
        font-size: 18px;
    }

    .hero {
        height: 500px;
    }

    .hero-copy {
        padding-top: 0;
    }

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

    .hero-meta {
        gap: 8px;
    }

    .hero-meta span {
        padding: 6px 10px;
        font-size: 13px;
    }

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

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

    .movie-card-horizontal .movie-poster {
        min-height: 220px;
    }

    .ranking-row {
        grid-template-columns: 40px 60px 1fr;
    }

    .rank-score {
        grid-column: 2 / 4;
        width: max-content;
    }
}
