:root {
    --purple: #7c3aed;
    --purple-dark: #581c87;
    --pink: #db2777;
    --rose: #f43f5e;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f9fafb;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(88, 28, 135, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #ffffff;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--purple);
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.16);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #374151;
    font-weight: 650;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--purple);
    background: #f5f3ff;
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 320px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
    background: #ffffff;
    transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #c084fc;
    box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.18);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.22);
}

.secondary-button {
    color: var(--purple);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(88, 28, 135, 0.12);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: #f5f3ff;
    color: var(--purple);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 24px;
}

.mobile-panel {
    display: none;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #faf5ff 0%, #fdf2f8 46%, #fff1f2 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.22;
}

.hero::before {
    left: -120px;
    top: 50px;
    background: #a855f7;
}

.hero::after {
    right: -130px;
    bottom: -80px;
    background: #ec4899;
}

.hero-inner {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 82px 24px 72px;
    z-index: 1;
}

.hero-slider {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 44px;
    align-items: center;
}

.hero-copy {
    display: none;
    animation: fadeUp 0.5s ease both;
}

.hero-copy.active {
    display: block;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    color: var(--purple);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.12);
    font-size: 14px;
    font-weight: 750;
}

.hero h1,
.page-hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

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

.hero p,
.page-hero p {
    margin: 0;
    max-width: 690px;
    color: #4b5563;
    font-size: 19px;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 520px;
    gap: 14px;
    margin-top: 34px;
}

.hero-stat {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 30px rgba(88, 28, 135, 0.10);
}

.hero-stat strong {
    display: block;
    font-size: 26px;
    color: var(--purple);
}

.hero-stat span {
    color: #6b7280;
    font-size: 13px;
}

.hero-visual {
    position: relative;
}

.hero-poster {
    display: none;
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3;
    background: #f5f3ff;
}

.hero-poster.active {
    display: block;
    animation: fadeUp 0.45s ease both;
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.66));
}

.hero-poster-info {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    color: #ffffff;
}

.hero-poster-info strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
}

.hero-poster-info span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.82);
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.hero-thumb {
    border: 2px solid transparent;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(88, 28, 135, 0.12);
    cursor: pointer;
    opacity: 0.74;
}

.hero-thumb.active {
    border-color: var(--purple);
    opacity: 1;
}

.hero-thumb img {
    width: 100%;
    height: 86px;
    object-fit: cover;
}

.section {
    padding: 72px 24px;
}

.section.soft {
    background: linear-gradient(135deg, #faf5ff, #fdf2f8);
}

.section.deep {
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple-dark), #831843);
}

.section-inner,
.page-inner {
    max-width: 1240px;
    margin: 0 auto;
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.deep .section-title p {
    color: #e9d5ff;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(88, 28, 135, 0.10);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 44px rgba(88, 28, 135, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f5f3ff;
}

.featured .poster-link {
    aspect-ratio: 4 / 3;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(124, 58, 237, 0.9);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--purple);
    background: #f5f3ff;
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: #f59e0b;
    font-weight: 800;
}

.card-footer a {
    color: var(--purple);
    font-size: 14px;
}

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

.category-tile {
    padding: 24px;
    min-height: 155px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #faf5ff);
    box-shadow: 0 18px 36px rgba(88, 28, 135, 0.10);
    transition: 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #ffffff;
}

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

.category-tile span {
    color: var(--muted);
}

.category-tile:hover span {
    color: rgba(255, 255, 255, 0.82);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: auto 82px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 30px rgba(88, 28, 135, 0.10);
    transition: 0.2s ease;
}

.rank-card:hover {
    transform: translateX(4px);
}

.rank-card img {
    width: 82px;
    height: 94px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-card strong {
    display: block;
    font-size: 17px;
}

.rank-card em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    font-weight: 900;
}

.page-hero {
    padding: 64px 24px;
    color: #ffffff;
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.18), transparent 28%), linear-gradient(135deg, var(--purple), var(--pink));
}

.page-hero .page-inner {
    max-width: 1240px;
}

.page-hero p {
    color: #f5e8ff;
}

.page-kicker {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.filter-panel {
    max-width: 1240px;
    margin: -34px auto 34px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 190px 220px;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-grid label span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 750;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 38px;
}

.pagination-links a,
.pagination-links span {
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ffffff;
    color: var(--purple);
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(88, 28, 135, 0.08);
}

.pagination-links span {
    color: #ffffff;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.detail-hero {
    background: linear-gradient(135deg, #111827, #581c87 56%, #831843);
    color: #ffffff;
    padding: 42px 24px 72px;
}

.detail-layout {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    aspect-ratio: 3 / 4;
    background: #f5f3ff;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #e9d5ff;
    font-size: 14px;
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-content p {
    margin: 0;
    max-width: 760px;
    color: #f3e8ff;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag {
    padding: 7px 11px;
    border-radius: 999px;
    color: #7e22ce;
    background: #f5f3ff;
    font-size: 13px;
    font-weight: 800;
}

.player-section {
    max-width: 1240px;
    margin: -46px auto 0;
    padding: 0 24px 72px;
    position: relative;
    z-index: 3;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.26);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.30), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

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

.play-button {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    font-size: 36px;
    box-shadow: 0 18px 40px rgba(219, 39, 119, 0.36);
    cursor: pointer;
}

.article-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
}

.text-panel,
.side-panel {
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(88, 28, 135, 0.10);
}

.text-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.text-panel p {
    margin: 0 0 20px;
    color: #374151;
    font-size: 17px;
}

.hidden-card {
    display: none !important;
}

.no-results {
    display: none;
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    box-shadow: 0 14px 30px rgba(88, 28, 135, 0.08);
}

.no-results.show {
    display: block;
}

.site-footer {
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple-dark), #831843);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

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

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

.footer-links {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-links h3 {
    margin: 0 0 8px;
}

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

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px 26px;
    color: #e9d5ff;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .header-search {
        min-width: 240px;
    }

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

    .rank-layout,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-slider,
    .detail-layout,
    .filter-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding-top: 52px;
    }

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

    .detail-cover {
        max-width: 260px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        height: 68px;
        padding: 0 16px;
    }

    .logo-text {
        font-size: 21px;
    }

    .hero-stats,
    .movie-grid,
    .movie-grid.featured-grid,
    .movie-grid.dense-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .section,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .filter-panel,
    .player-section,
    .article-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-title {
        display: block;
    }

    .rank-card {
        grid-template-columns: auto 70px 1fr;
    }

    .rank-card img {
        width: 70px;
        height: 84px;
    }
}
