:root {
    --pink: #ec4899;
    --pink-dark: #db2777;
    --purple: #a855f7;
    --blue: #60a5fa;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #fdf2f8;
    --line: rgba(148, 163, 184, 0.25);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 48%, #eff6ff 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #f472b6 0%, #c084fc 52%, #93c5fd 100%);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.25);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #ffffff;
    font-weight: 650;
}

.desktop-nav a,
.nav-dropdown > button {
    color: #ffffff;
    border: 0;
    background: transparent;
    padding: 8px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
    color: #fff1f2;
    transform: translateY(-1px);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: 100%;
    width: 190px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 10px;
}

.nav-dropdown-menu a:hover {
    background: var(--soft);
    color: var(--pink-dark);
}

.header-search,
.mobile-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    padding: 4px;
    backdrop-filter: blur(10px);
}

.header-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    outline: none;
    background: transparent;
    padding: 10px 12px;
    color: var(--text);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: #ffffff;
    background: var(--pink);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
}

.mobile-menu {
    display: none;
    padding: 0 24px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

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

.mobile-menu nav {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.mobile-menu nav a {
    color: #ffffff;
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 1.4s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.56) 48%, rgba(15, 23, 42, 0.15) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1440px) / 2 + 24px));
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.02;
    font-weight: 900;
    text-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    margin: 0 0 22px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
}

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

.hero-tags span,
.detail-tags span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

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

.primary-button {
    color: #ffffff;
    background: var(--pink);
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.35);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.section-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 72px 24px;
}

.soft-band {
    background: linear-gradient(90deg, rgba(252, 231, 243, 0.95), rgba(243, 232, 255, 0.95), rgba(219, 234, 254, 0.95));
}

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

.section-title-row h2,
.page-hero h1,
.category-hero-content h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    color: #111827;
    font-weight: 900;
}

.section-title-row a {
    color: var(--pink-dark);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

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

.movie-card {
    min-width: 0;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fce7f3, #ddd6fe, #bfdbfe);
}

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

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

.movie-duration,
.movie-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.movie-duration {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
}

.movie-badge {
    left: 10px;
    top: 10px;
    padding: 5px 10px;
    background: rgba(236, 72, 153, 0.9);
}

.movie-card-body {
    padding: 18px;
}

.movie-card-body h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body p {
    margin: 0 0 13px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #64748b;
    font-size: 13px;
}

.movie-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--pink-dark);
    background: #fce7f3;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-horizontal .movie-card-link {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 0;
}

.movie-poster-wide {
    aspect-ratio: auto;
    height: 150px;
}

.movie-card-large .movie-poster-large {
    aspect-ratio: 16 / 9;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 62%);
}

.movie-poster-large strong {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 2;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.25;
}

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

.category-box,
.category-overview-card {
    min-height: 132px;
    border-radius: 22px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
    background: linear-gradient(135deg, #fce7f3, #ede9fe);
    box-shadow: 0 12px 26px rgba(147, 51, 234, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-box:hover,
.category-overview-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow);
}

.category-box span,
.category-overview-card span {
    font-size: 34px;
}

.category-overview-card em {
    color: var(--pink-dark);
    font-style: normal;
    font-size: 14px;
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

.filter-panel-large {
    padding: 24px;
}

.local-search-input {
    width: 100%;
    height: 48px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    background: #ffffff;
}

.local-search-input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

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

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #475569;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--line);
    transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    background: var(--pink);
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.22);
}

.empty-result {
    display: none;
    padding: 40px;
    text-align: center;
    color: #64748b;
    border-radius: 22px;
    background: #ffffff;
}

.empty-result.show {
    display: block;
}

.page-hero,
.category-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 70px 24px;
}

.page-hero > div,
.category-hero-content {
    position: relative;
    z-index: 2;
    width: min(980px, 100%);
    margin: 0 auto;
}

.page-hero p,
.category-hero-content p {
    max-width: 720px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.8;
}

.page-hero-soft {
    background: radial-gradient(circle at 15% 25%, rgba(236, 72, 153, 0.28), transparent 28%), radial-gradient(circle at 85% 18%, rgba(96, 165, 250, 0.3), transparent 32%), linear-gradient(135deg, #fff, #f5f3ff);
}

.page-hero-ranking {
    background: linear-gradient(135deg, #111827, #581c87 55%, #be185d);
    color: #ffffff;
}

.page-hero-ranking h1,
.page-hero-ranking p {
    color: #ffffff;
}

.category-hero {
    position: relative;
    min-height: 460px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.category-hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.1));
}

.category-hero-content h1,
.category-hero-content p {
    color: #ffffff;
}

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

.ranking-item {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 72px 116px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
}

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

.ranking-poster {
    width: 116px;
    height: 78px;
    border-radius: 16px;
    overflow: hidden;
    background: #fce7f3;
}

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

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0 0 8px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.watch-layout {
    padding: 32px 24px 0;
    background: linear-gradient(135deg, #111827, #312e81 60%, #831843);
}

.breadcrumbs {
    max-width: 1440px;
    margin: 0 auto 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 255, 255, 0.72);
}

.breadcrumbs a:hover {
    color: #ffffff;
}

.player-shell {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.45fr);
    gap: 24px;
    padding-bottom: 46px;
}

.player-panel {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.28), rgba(15, 23, 42, 0.35) 42%, rgba(15, 23, 42, 0.68));
    cursor: pointer;
}

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

.play-ring {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    background: var(--pink);
    box-shadow: 0 0 0 14px rgba(236, 72, 153, 0.18), 0 20px 45px rgba(236, 72, 153, 0.45);
    font-size: 32px;
}

.player-overlay strong {
    font-size: 26px;
}

.player-overlay em {
    color: rgba(255, 255, 255, 0.75);
    font-style: normal;
}

.watch-side {
    border-radius: 28px;
    padding: 28px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
}

.watch-side h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
}

.watch-side p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.detail-panel {
    margin-bottom: 22px;
    padding: 30px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-panel p {
    margin: 0;
    color: #475569;
    line-height: 2;
    font-size: 17px;
}

.detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.detail-nav a {
    flex: 1;
    padding: 16px 18px;
    border-radius: 18px;
    color: var(--pink-dark);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    font-weight: 800;
}

.detail-nav a:last-child {
    text-align: right;
}

.site-footer {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #d1d5db;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 56px 24px 36px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
}

.footer-logo {
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: #ffffff;
}

.site-footer a:not(.footer-logo) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

.site-footer a:not(.footer-logo):hover {
    color: #f9a8d4;
}

.footer-bottom {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 24px 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
    text-align: center;
}

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

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

    .player-shell {
        grid-template-columns: 1fr;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

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

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

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

    .movie-poster-wide {
        height: auto;
        aspect-ratio: 16 / 10;
    }

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

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

    .site-logo {
        font-size: 20px;
    }

    .hero-carousel {
        min-height: 520px;
    }

    .hero-content {
        width: calc(100% - 32px);
        margin-left: 16px;
    }

    .section-wrap {
        padding: 52px 16px;
    }

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

    .movie-grid-2,
    .movie-grid-3,
    .movie-grid-4,
    .movie-grid-5,
    .movie-grid-6,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item a {
        grid-template-columns: 52px 92px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .ranking-number {
        width: 42px;
        height: 42px;
    }

    .ranking-poster {
        width: 92px;
        height: 72px;
    }

    .watch-layout {
        padding: 20px 16px 0;
    }

    .watch-side,
    .detail-panel {
        padding: 22px;
    }

    .detail-nav {
        flex-direction: column;
    }

    .detail-nav a {
        width: 100%;
        text-align: left !important;
    }
}
