:root {
    --brand-red: #ef4444;
    --brand-pink: #ec4899;
    --brand-orange: #f97316;
    --brand-purple: #8b5cf6;
    --brand-blue: #3b82f6;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 28%, #ffffff 100%);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-pink), var(--brand-orange));
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.26);
}

.nav-wrap {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #fff;
    font-weight: 650;
}

.nav-links a {
    opacity: 0.92;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff7ad;
    transform: translateY(-1px);
}

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

.nav-search input {
    width: 250px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.play-toggle,
.fullscreen-toggle {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button {
    padding: 10px 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.22);
}

.nav-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.play-toggle:hover,
.fullscreen-toggle:hover {
    transform: translateY(-2px);
}

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

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 82px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    color: #fff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 12px 0 16px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.03;
    font-weight: 900;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.88), rgba(139, 92, 246, 0.88));
    font-size: 13px;
    font-weight: 780;
    letter-spacing: 0.08em;
}

.hero-tags,
.detail-meta,
.meta-row,
.score-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags {
    margin-bottom: 28px;
}

.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.play-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    color: #fff;
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
    box-shadow: 0 16px 30px rgba(139, 92, 246, 0.28);
}

.secondary-btn,
.fullscreen-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 24px;
    width: min(1180px, calc(100% - 40px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-category-links {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.hero-category-links a {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

.hero-dot.is-active {
    width: 32px;
    background: #fff;
}

.content-section,
.page-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 20px;
}

.content-section + .content-section {
    padding-top: 18px;
}

.no-top-space {
    padding-top: 20px;
}

.soft-section {
    max-width: 100%;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.06), rgba(139, 92, 246, 0.08));
}

.soft-section > .section-head,
.soft-section > .horizontal-row {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 900;
    background: linear-gradient(90deg, var(--brand-red), #f59e0b, var(--brand-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.section-head a,
.category-block-head a {
    color: var(--brand-purple);
    font-weight: 750;
}

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

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #581c87);
}

.poster-wrap img,
.detail-cover img,
.feature-item img,
.collection-card img,
.mini-card img,
.rank-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-link:hover img,
.feature-item:hover img,
.collection-card:hover img,
.mini-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.duration-badge,
.type-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    background: rgba(0, 0, 0, 0.66);
}

.duration-badge {
    right: 10px;
    top: 10px;
}

.type-badge {
    left: 10px;
    bottom: 10px;
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}

.card-body p {
    min-height: 46px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.meta-row,
.score-row {
    font-size: 13px;
    color: var(--muted);
}

.meta-row span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.score-row {
    justify-content: space-between;
    margin-top: 12px;
    font-weight: 750;
    color: #4b5563;
}

.horizontal-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 20px 18px;
}

.horizontal-row .movie-card {
    width: 270px;
    flex: 0 0 auto;
}

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

.category-tile {
    min-height: 118px;
    padding: 20px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
    box-shadow: 0 14px 30px rgba(139, 92, 246, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:nth-child(3n + 1) {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.category-tile:nth-child(3n + 2) {
    background: linear-gradient(135deg, #3b82f6, #14b8a6);
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-tile small {
    display: block;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 28px;
}

.feature-list,
.rank-list,
.rank-page-list {
    display: grid;
    gap: 12px;
}

.feature-item,
.rank-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: background 0.22s ease, transform 0.22s ease;
}

.feature-item:hover,
.rank-item:hover {
    transform: translateX(4px);
    background: linear-gradient(90deg, #fff, #fdf2f8);
}

.feature-item img {
    width: 150px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
}

.feature-item span,
.collection-card span {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--brand-purple);
    font-size: 13px;
    font-weight: 800;
}

.feature-item h3,
.collection-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.feature-item p,
.collection-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-item img {
    width: 86px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    flex: 0 0 auto;
}

.rank-number {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #9ca3af;
    font-weight: 900;
    flex: 0 0 auto;
}

.rank-top .rank-number {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-title {
    min-width: 0;
    flex: 1;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 13px;
}

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

.collection-card {
    position: relative;
    height: 260px;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    box-shadow: var(--shadow);
}

.collection-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.18));
}

.collection-card > div {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 24px;
}

.collection-card span {
    color: #fde68a;
}

.page-main {
    padding-top: 34px;
}

.page-hero {
    border-radius: 28px;
    padding: clamp(32px, 6vw, 60px);
    color: #fff;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 36%), linear-gradient(135deg, #ef4444, #ec4899 52%, #8b5cf6);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 14px 0 14px;
    max-width: 780px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.08;
    font-weight: 950;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.category-overview {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.category-block {
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.category-block-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.category-block-head h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.category-block-head p {
    margin: 0;
    color: var(--muted);
}

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

.mini-card {
    display: block;
    min-width: 0;
}

.mini-card img {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #111827;
    margin-bottom: 8px;
}

.mini-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 18px;
}

.breadcrumb a {
    color: var(--brand-purple);
    font-weight: 750;
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.filter-bar input {
    min-width: 320px;
    flex: 1;
}

.wide-filter {
    max-width: 820px;
}

.empty-state {
    padding: 36px;
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

.detail-main {
    max-width: 1120px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 28px;
    border-radius: 28px;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 34%), linear-gradient(135deg, #111827, #7c2d12 45%, #831843);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 16 / 10;
    background: #111827;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 950;
}

.detail-desc {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    margin-bottom: 18px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.player-section,
.detail-section {
    margin-top: 28px;
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.player-card {
    display: grid;
    gap: 16px;
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.player-message {
    margin: 0;
    color: #b91c1c;
    font-weight: 750;
}

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

.detail-section p {
    margin: 0;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.9;
}

.rank-page-list .rank-item {
    padding: 16px;
}

.rank-page-list .rank-item img {
    width: 130px;
}

.site-footer {
    margin-top: 40px;
    color: #e5e7eb;
    background: #111827;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
    color: #fde68a;
}

.footer-inner p {
    max-width: 620px;
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.footer-links a {
    color: #fff;
}

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .nav-wrap {
        flex-wrap: wrap;
        height: auto;
        min-height: 68px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

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

    .nav-links.is-open {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 12px;
    }

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

    .hero {
        height: 620px;
    }

    .hero-content {
        bottom: 110px;
    }

    .hero-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .movie-grid-four,
    .movie-grid-three,
    .category-grid,
    .collection-grid,
    .split-section,
    .detail-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 640px) {
    .brand {
        font-size: 21px;
    }

    .hero {
        height: 580px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

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

    .hero-category-links {
        max-width: 100%;
    }

    .content-section,
    .page-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .section-head,
    .category-block-head,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .movie-grid-four,
    .movie-grid-three,
    .category-grid,
    .collection-grid,
    .split-section,
    .detail-hero,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar input {
        min-width: 0;
        width: 100%;
    }

    .feature-item,
    .rank-item {
        align-items: flex-start;
    }

    .feature-item img {
        width: 120px;
    }

    .rank-meta {
        display: none;
    }
}
