* {
    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: #111827;
    background: linear-gradient(135deg, #fff1f7 0%, #faf5ff 46%, #eff6ff 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.96), rgba(168, 85, 247, 0.96), rgba(59, 130, 246, 0.96));
    box-shadow: 0 18px 45px rgba(88, 28, 135, 0.22);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    animation: pulseGlow 2.8s ease-in-out infinite;
}

.logo-text {
    font-size: 24px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fef3c7, #fce7f3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.94);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #fde68a;
    transform: translateY(-1px);
}

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

.header-search input {
    width: 230px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.header-search button,
.primary-button,
.glass-button,
.ghost-button,
.category-overview-text a {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.header-search button {
    padding: 10px 16px;
    color: #581c87;
    background: #fde047;
}

.header-search button:hover,
.primary-button:hover,
.glass-button:hover,
.ghost-button:hover,
.category-overview-text a:hover {
    transform: translateY(-2px) scale(1.02);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 22px;
    background: rgba(88, 28, 135, 0.36);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.mobile-panel.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-panel a {
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.page-shell {
    padding-top: 68px;
}

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

.hero-banner {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(90deg, #ec4899, #a855f7, #3b82f6);
}

.stars-background {
    position: absolute;
    inset: 0;
    opacity: 0.36;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.75) 0 1px, transparent 2px),
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
        radial-gradient(circle at 45% 70%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px);
    background-size: 130px 130px, 170px 170px, 210px 210px;
    animation: starFloat 18s linear infinite;
}

.hero-track,
.hero-slide,
.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.72s ease;
}

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

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(8px) saturate(1.2);
    transform: scale(1.06);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 36%, rgba(255, 255, 255, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(139, 30, 122, 0.92), rgba(124, 58, 237, 0.78), rgba(37, 99, 235, 0.72));
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 54px;
    align-items: center;
}

.hero-copy h1 {
    margin: 10px 0 8px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-shadow: 0 14px 32px rgba(31, 41, 55, 0.35);
}

.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.1;
}

.hero-copy p {
    max-width: 690px;
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #ec4899;
}

.hero-copy .eyebrow,
.sub-hero .eyebrow,
.detail-info .eyebrow {
    color: #fde68a;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.tag-row span {
    padding: 5px 9px;
    color: #7e22ce;
    background: #faf5ff;
}

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

.primary-button,
.glass-button,
.ghost-button,
.category-overview-text a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    box-shadow: 0 16px 36px rgba(168, 85, 247, 0.28);
}

.hero-actions .primary-button {
    color: #581c87;
    background: #fde047;
    box-shadow: 0 16px 36px rgba(253, 224, 71, 0.3);
}

.glass-button,
.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
}

.ghost-button {
    background: rgba(255, 255, 255, 0.1);
}

.hero-poster {
    position: relative;
    display: block;
    padding: 10px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 28px 70px rgba(30, 41, 59, 0.36);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 470px;
    object-fit: cover;
    border-radius: 26px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    opacity: 0.58;
}

.hero-dot.active {
    width: 34px;
    border-radius: 999px;
    opacity: 1;
    background: #fde047;
}

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

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

.section-heading h2,
.sub-hero h1,
.detail-info h1 {
    margin: 8px 0 0;
    color: #111827;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading a {
    color: #9333ea;
    font-weight: 900;
}

.featured-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.48fr) minmax(280px, 0.9fr);
    gap: 22px;
}

.featured-side,
.related-list {
    display: grid;
    gap: 14px;
}

.movie-grid,
.category-grid,
.category-overview-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 45px rgba(88, 28, 135, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fce7f3, #ede9fe);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: #581c87;
    font-weight: 950;
    background: #fde047;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
}

.card-content {
    padding: 18px;
}

.card-content h3 {
    margin: 8px 0;
    color: #111827;
    font-size: 19px;
    line-height: 1.35;
}

.card-content h3 a:hover {
    color: #db2777;
}

.card-content p {
    margin: 0 0 14px;
    color: #64748b;
    line-height: 1.7;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 850;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: stretch;
    min-height: 150px;
}

.movie-card-compact .card-cover {
    aspect-ratio: auto;
    height: 100%;
}

.movie-card-compact .card-content {
    padding: 16px;
}

.movie-card-compact .card-content h3 {
    font-size: 17px;
}

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(88, 28, 135, 0.16);
}

.category-card {
    min-height: 174px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 24px 60px rgba(88, 28, 135, 0.24);
}

.category-card span,
.category-icon {
    font-size: 36px;
}

.category-card strong {
    font-size: 22px;
}

.category-card em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.gradient-0 { background: linear-gradient(135deg, #fb7185, #ec4899); }
.gradient-1 { background: linear-gradient(135deg, #c084fc, #7c3aed); }
.gradient-2 { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.gradient-3 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.gradient-4 { background: linear-gradient(135deg, #22c55e, #14b8a6); }
.gradient-5 { background: linear-gradient(135deg, #64748b, #334155); }

.sub-hero,
.detail-hero,
.filter-panel,
.detail-story,
.detail-aside {
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 45px rgba(88, 28, 135, 0.12);
}

.sub-hero {
    margin: 34px 0 28px;
    padding: 50px;
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 245, 255, 0.84));
}

.sub-hero h1 {
    font-size: clamp(32px, 4vw, 54px);
}

.sub-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: #64748b;
    font-size: 18px;
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 28px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #9333ea;
    font-weight: 800;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 24px;
    padding: 26px;
}

.category-overview-text h2 {
    margin: 10px 0;
    font-size: 32px;
}

.category-overview-text p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.category-overview-text a {
    color: #581c87;
    background: #fde047;
}

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

.filter-panel {
    padding: 20px;
    margin-bottom: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 14px;
}

.filter-row label {
    display: grid;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.filter-row input,
.filter-row select {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 16px;
    padding: 13px 14px;
    color: #111827;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.library-grid {
    align-items: stretch;
}

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

.detail-hero {
    margin: 28px 0 24px;
    padding: 26px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    overflow: hidden;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 58px rgba(88, 28, 135, 0.22);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
    margin: 18px 0;
    color: #475569;
    font-size: 19px;
    line-height: 1.85;
}

.detail-info .glass-button {
    color: #7e22ce;
    background: #faf5ff;
    box-shadow: inset 0 0 0 1px #e9d5ff;
}

.player-section {
    margin: 0 0 28px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(88, 28, 135, 0.52));
}

.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.player-play-button {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 6px;
    color: #581c87;
    font-size: 38px;
    background: #fde047;
    box-shadow: 0 18px 46px rgba(253, 224, 71, 0.32);
}

.player-overlay strong {
    max-width: 80%;
    text-align: center;
    font-size: 28px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 24px;
}

.detail-story,
.detail-aside {
    padding: 28px;
}

.detail-story h2,
.detail-aside h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 26px;
}

.detail-story p {
    margin: 0 0 24px;
    color: #475569;
    font-size: 17px;
    line-height: 1.95;
}

.info-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.info-list span {
    padding: 9px 12px;
    border-radius: 999px;
    color: #7e22ce;
    background: #faf5ff;
    font-weight: 800;
}

.site-footer {
    margin-top: 72px;
    color: rgba(255, 255, 255, 0.86);
    background: linear-gradient(90deg, #831843, #581c87, #1e3a8a);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    font-size: 22px;
}

.footer-inner p {
    max-width: 650px;
    line-height: 1.7;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes starFloat {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 130px 130px, 170px 170px, 210px 210px; }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 72px 0 84px;
    }

    .hero-poster {
        display: none;
    }

    .featured-grid,
    .category-overview-card,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 22px, 1180px);
        height: 62px;
    }

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

    .page-shell {
        padding-top: 62px;
    }

    .hero-banner {
        min-height: 590px;
    }

    .hero-content {
        width: min(100% - 28px, 1180px);
        padding-top: 54px;
    }

    .hero-copy p,
    .sub-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .detail-actions,
    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-section,
    .inner-page {
        width: min(100% - 24px, 1180px);
    }

    .movie-grid,
    .ranking-grid,
    .category-grid,
    .category-preview-list {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        grid-template-columns: 105px minmax(0, 1fr);
    }

    .sub-hero,
    .detail-hero,
    .detail-story,
    .detail-aside,
    .filter-panel {
        border-radius: 24px;
        padding: 22px;
    }

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

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

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

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

    .player-play-button {
        width: 70px;
        height: 70px;
    }
}
