:root {
    color-scheme: light;
    --color-bg: #fff7fb;
    --color-panel: rgba(255, 255, 255, 0.86);
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-primary: #ec4899;
    --color-secondary: #f97316;
    --color-accent: #06b6d4;
    --color-dark: #111827;
    --shadow-soft: 0 18px 45px rgba(236, 72, 153, 0.18);
    --shadow-card: 0 12px 30px rgba(31, 41, 55, 0.10);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(236, 72, 153, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.13), transparent 32rem),
        linear-gradient(180deg, #fff7fb 0%, #fff 42%, #fff7ed 100%);
    color: var(--color-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px rgba(236, 72, 153, 0.08);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    box-shadow: 0 12px 26px rgba(236, 72, 153, 0.28);
    font-size: 16px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(249, 115, 22, 0.12));
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(236, 72, 153, 0.10);
    color: var(--color-primary);
    font-size: 22px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
    gap: 48px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 88px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-backdrop {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -2;
    overflow: hidden;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.42;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.34)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.98), transparent 44%);
}

.hero-content {
    max-width: 720px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    color: #fecdd3;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin-top: 14px;
    color: #fed7aa;
    font-size: clamp(24px, 3vw, 38px);
}

.hero-content p {
    max-width: 660px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.78;
}

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

.primary-btn,
.secondary-btn,
.card-link,
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.24s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    box-shadow: 0 18px 38px rgba(236, 72, 153, 0.30);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(236, 72, 153, 0.38);
}

.secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    backdrop-filter: blur(12px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.20);
    transform: translateY(-2px);
}

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

.hero-tags span,
.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(236, 72, 153, 0.10);
    color: #be185d;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 36px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    height: auto;
    object-fit: cover;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

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

.main-section {
    padding: 62px 0 0;
}

.section-head,
.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--color-muted);
    line-height: 1.75;
}

.more-link,
.card-link {
    background: #fff;
    color: var(--color-primary);
    box-shadow: var(--shadow-card);
}

.more-link:hover,
.card-link:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

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

.movie-card,
.category-card,
.info-panel,
.player-card,
.rank-row {
    overflow: hidden;
    border: 1px solid rgba(236, 72, 153, 0.10);
    border-radius: var(--radius-lg);
    background: var(--color-panel);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
}

.movie-card {
    transition: 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(249, 115, 22, 0.18));
}

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

.movie-card:hover .poster-wrap img,
.category-card:hover img {
    transform: scale(1.06);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #ef4444);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(239, 68, 68, 0.28);
}

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

.movie-title {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.28;
}

.movie-title:hover {
    color: var(--color-primary);
}

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    color: var(--color-muted);
    line-height: 1.65;
}

.movie-meta {
    color: #9f1239;
    font-size: 13px;
    font-weight: 800;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 52px;
}

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

.category-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card h3 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 16px;
    color: var(--color-muted);
    line-height: 1.7;
}

.category-card span {
    color: var(--color-primary);
    font-weight: 900;
}

.search-panel {
    margin: 0 0 26px;
}

.movie-search {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: 1px solid rgba(236, 72, 153, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    box-shadow: var(--shadow-card);
    outline: none;
    font-size: 16px;
    font-weight: 700;
}

.movie-search:focus {
    border-color: rgba(236, 72, 153, 0.48);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.10), var(--shadow-card);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px auto 0;
    color: var(--color-muted);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--color-primary);
}

.detail-wrap {
    padding: 34px 0 72px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.detail-cover {
    overflow: hidden;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(249, 115, 22, 0.18));
    box-shadow: var(--shadow-soft);
}

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

.detail-title {
    padding-top: 8px;
}

.detail-title p {
    margin: 16px 0 0;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.78;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    margin-top: 36px;
}

.info-panel,
.player-card {
    padding: 26px;
}

.info-panel h2,
.player-card h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 26px;
    font-weight: 900;
}

.info-panel p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.player-card {
    grid-column: 1 / -1;
    background: #111827;
    color: #fff;
}

.play-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
}

.play-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.16), rgba(2, 6, 23, 0.18));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-start span {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-size: 30px;
    box-shadow: 0 24px 60px rgba(236, 72, 153, 0.45);
}

.play-start.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.side-panel {
    display: grid;
    gap: 14px;
    align-content: start;
}

.side-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-card);
}

.side-card img {
    aspect-ratio: 3 / 4;
    height: 100%;
    object-fit: cover;
}

.side-card strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
}

.side-card span {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 13px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 84px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-index {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(249, 115, 22, 0.14));
    color: var(--color-primary);
    font-weight: 900;
}

.rank-row img {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
}

.rank-row p {
    margin: 6px 0 0;
    color: var(--color-muted);
}

.site-footer {
    margin-top: 78px;
    background: linear-gradient(135deg, #111827, #312e81 50%, #831843);
    color: rgba(255, 255, 255, 0.82);
}

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

.footer-inner p {
    max-width: 620px;
    margin: 14px 0 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-weight: 800;
}

.hidden-by-search {
    display: none !important;
}

@media (max-width: 980px) {
    .hero-slide,
    .detail-hero,
    .content-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        gap: 28px;
        padding: 54px 0 82px;
    }

    .hero-poster {
        max-width: 360px;
        transform: none;
    }

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

    .rank-row {
        grid-template-columns: 46px 70px 1fr;
    }

    .rank-row .card-link {
        grid-column: 1 / -1;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .site-nav {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-menu {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 12px;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        background: rgba(236, 72, 153, 0.08);
    }

    .hero-carousel {
        min-height: auto;
    }

    .hero-content p {
        font-size: 16px;
    }

    .section-head,
    .page-hero {
        display: block;
    }

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

    .movie-card-compact {
        display: grid;
        grid-template-columns: 120px 1fr;
    }

    .movie-card-compact .poster-wrap img {
        height: 100%;
    }

    .info-panel,
    .player-card {
        padding: 20px;
    }
}
