:root {
    --rose: #f43f5e;
    --rose-dark: #be123c;
    --pink: #ec4899;
    --amber: #f59e0b;
    --text: #111827;
    --muted: #6b7280;
    --soft: #fff1f2;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 30px rgba(244, 63, 94, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fff7f8 0%, #ffffff 38%, #f9fafb 100%);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(244, 63, 94, 0.12);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--rose-dark);
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: 0 8px 20px rgba(244, 63, 94, 0.35);
}

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

.nav-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--rose-dark);
    background: var(--soft);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #f9fafb;
    border: 1px solid #f3d3dc;
    border-radius: 999px;
}

.nav-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 8px 12px;
    color: var(--text);
    background: transparent;
}

.nav-search button,
.btn-primary,
.btn-secondary,
.section-link,
.filter-row button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.btn-primary,
.filter-row button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: var(--shadow-soft);
}

.nav-search button {
    padding: 8px 16px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
}

.btn-secondary {
    color: var(--rose-dark);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(244, 63, 94, 0.18);
}

.btn-primary:hover,
.btn-secondary:hover,
.nav-search button:hover,
.section-link:hover,
.filter-row button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(244, 63, 94, 0.22);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    color: var(--rose-dark);
    background: var(--soft);
    border-radius: 12px;
}

main {
    min-height: 60vh;
}

.hero-slider {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    filter: saturate(1.08) contrast(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 20%, rgba(236, 72, 153, 0.45), transparent 28%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.75) 48%, rgba(17, 24, 39, 0.34) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.08) 45%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    min-height: 680px;
    margin: 0 auto;
    padding: 88px 20px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 420px;
    align-items: center;
    gap: 48px;
}

.hero-copy {
    max-width: 740px;
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 13px;
    color: #ffe4e6;
    background: rgba(244, 63, 94, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5.2vw, 64px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-movie-title {
    display: block;
    margin-bottom: 12px;
    color: #fecdd3;
    font-size: 22px;
    font-weight: 800;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags a,
.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

.hero-panel {
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-mini-card + .hero-mini-card {
    margin-top: 12px;
}

.hero-mini-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.2);
}

.hero-mini-card img {
    position: static;
    height: 116px;
    border-radius: 14px;
}

.hero-mini-card h3 {
    margin: 4px 0 8px;
    font-size: 16px;
}

.hero-mini-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 64px 0;
}

.section.compact {
    padding-top: 36px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(25px, 3.4vw, 36px);
    letter-spacing: -0.4px;
}

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

.section-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--rose-dark);
    background: #ffffff;
    border: 1px solid rgba(244, 63, 94, 0.16);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: var(--shadow-soft);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -32px;
    bottom: -46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 700;
}

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

.card-grid,
.card-horizontal,
.ranking-item {
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-grid:hover,
.card-horizontal:hover,
.ranking-item:hover {
    transform: translateY(-6px);
    border-color: rgba(244, 63, 94, 0.28);
    box-shadow: var(--shadow);
}

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

.card-poster img {
    transition: transform 0.45s ease;
}

.card-grid:hover .card-poster img,
.card-horizontal:hover .card-poster img {
    transform: scale(1.08);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.score-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f9fafb;
}

.card-body h3,
.horizontal-body h3,
.ranking-content h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.horizontal-body h3 a:hover,
.ranking-content h3 a:hover {
    color: var(--rose);
}

.card-body p,
.horizontal-body p,
.ranking-content p {
    display: -webkit-box;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    color: var(--rose-dark);
    background: var(--soft);
}

.split-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.72fr;
    gap: 30px;
    align-items: start;
}

.card-horizontal {
    display: grid;
    grid-template-columns: 170px 1fr;
}

.horizontal-poster {
    aspect-ratio: 4 / 3;
    height: 100%;
}

.horizontal-body {
    padding: 18px;
}

.stack-list {
    display: grid;
    gap: 16px;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.22), transparent 22%),
        linear-gradient(135deg, #be123c 0%, #f43f5e 45%, #ec4899 100%);
}

.page-hero .container {
    padding-top: 74px;
    padding-bottom: 74px;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.filter-panel {
    margin: -34px auto 34px;
    padding: 18px;
    border: 1px solid rgba(244, 63, 94, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
    gap: 12px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(244, 63, 94, 0.55);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.1);
}

.filter-row button {
    padding: 0 24px;
}

.empty-result {
    display: none;
    padding: 34px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px dashed #fecdd3;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 56px 110px minmax(0, 1fr) 108px;
    align-items: center;
    gap: 16px;
    padding: 12px 18px 12px 12px;
}

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

.ranking-cover {
    height: 138px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--soft);
}

.ranking-content h3 {
    font-size: 19px;
}

.ranking-heat {
    text-align: right;
}

.ranking-heat strong {
    display: block;
    color: var(--rose-dark);
    font-size: 22px;
}

.ranking-heat span {
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 30px auto 22px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.detail-main,
.detail-side,
.player-section {
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.detail-cover {
    height: 520px;
    background: var(--soft);
}

.detail-content {
    padding: 30px;
}

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

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

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--rose-dark);
    background: var(--soft);
    font-size: 13px;
    font-weight: 700;
}

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

.detail-content p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
}

.player-section {
    margin-bottom: 26px;
    padding: 22px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #030712;
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(244, 63, 94, 0.38));
}

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

.player-overlay span:first-child {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 30px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.detail-side {
    padding: 22px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: transform 0.2s ease, background 0.2s ease;
}

.related-item:hover {
    transform: translateX(4px);
    background: var(--soft);
}

.related-item img {
    height: 104px;
    border-radius: 12px;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
}

.footer-brand p {
    max-width: 520px;
    color: #9ca3af;
}

.footer-links h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a {
    color: #9ca3af;
}

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

.footer-bottom {
    padding: 18px 20px;
    text-align: center;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

    .hero-panel {
        display: none;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }

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

    .nav-links {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 10px;
        background: #ffffff;
        border-radius: 18px;
        border: 1px solid var(--line);
    }

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

    .nav-search {
        order: 4;
        width: 100%;
    }

    .nav-search input {
        width: 100%;
    }

    .hero-slider,
    .hero-inner {
        min-height: 640px;
    }

    .hero-inner {
        padding-top: 72px;
        padding-bottom: 86px;
    }

    .hero-control {
        top: auto;
        bottom: 22px;
        transform: none;
    }

    .hero-control.prev {
        left: 20px;
    }

    .hero-control.next {
        right: 20px;
    }

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

    .section {
        padding: 44px 0;
    }

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

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

    .ranking-item {
        grid-template-columns: 42px 82px minmax(0, 1fr);
        padding-right: 12px;
    }

    .ranking-heat {
        grid-column: 3;
        text-align: left;
    }

    .ranking-cover {
        height: 108px;
    }

    .detail-cover {
        height: 420px;
    }

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

@media (max-width: 520px) {
    .container,
    .nav-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .card-horizontal {
        grid-template-columns: 120px 1fr;
    }

    .horizontal-body {
        padding: 14px;
    }

    .hero-copy p,
    .page-hero p {
        font-size: 15px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .detail-content,
    .player-section,
    .detail-side {
        padding: 18px;
    }
}
