:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --pink-500: #ec4899;
    --purple-500: #a855f7;
    --blue-500: #3b82f6;
    --cyan-500: #06b6d4;
    --green-500: #22c55e;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
    --radius: 22px;
    --max-width: 1180px;
}

* {
    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(--gray-900);
    background: linear-gradient(180deg, var(--rose-50) 0%, #ffffff 38%, #eff6ff 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(229, 231, 235, 0.9);
}

.header-inner {
    max-width: var(--max-width);
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
    color: transparent;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    font-size: 13px;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.desktop-nav a {
    color: var(--gray-700);
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: var(--rose-500);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    background: var(--white);
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 10px 14px 10px 18px;
    color: var(--gray-700);
    background: transparent;
}

.header-search button,
.mobile-nav button {
    border: 0;
    color: var(--white);
    cursor: pointer;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--gray-700);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--gray-200);
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

.mobile-nav form {
    display: flex;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    background: var(--white);
}

.mobile-nav input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 11px 16px;
}

.mobile-nav a {
    font-weight: 650;
    color: var(--gray-700);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500), var(--purple-500));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(0.55);
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 32%, rgba(255, 255, 255, 0.24), transparent 26%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(244, 63, 94, 0.62) 52%, rgba(168, 85, 247, 0.42));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    min-height: 680px;
    margin: 0 auto;
    padding: 82px 20px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 420px;
    gap: 50px;
    align-items: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 20px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: clamp(17px, 2.2vw, 23px);
    color: rgba(255, 255, 255, 0.88);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--rose-600);
    background: var(--white);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.btn-gradient {
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    box-shadow: 0 16px 32px rgba(244, 63, 94, 0.24);
}

.btn-ghost {
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(18px);
}

.hero-panel img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.hero-panel-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent);
}

.hero-panel-info strong {
    display: block;
    font-size: 23px;
    margin-bottom: 4px;
}

.hero-panel-info span {
    color: rgba(255, 255, 255, 0.82);
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.hero-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.section,
.page-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 58px 20px;
}

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

.section-header h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-header p,
.page-title p {
    margin: 8px 0 0;
    color: var(--gray-600);
}

.section-link {
    color: var(--rose-500);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--rose-100), #dbeafe);
}

.movie-card.compact .movie-poster {
    aspect-ratio: 16 / 10;
}

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

.movie-card:hover .movie-poster img,
.compact-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: var(--white);
}

.badge-gradient {
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--rose-500);
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--rose-500);
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--gray-600);
    font-size: 14px;
}

.movie-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--rose-600);
    background: var(--rose-50);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    color: var(--gray-500);
    font-size: 13px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border-radius: var(--radius);
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-500));
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, var(--purple-500), var(--rose-500));
}

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

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -44px;
    bottom: -50px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 4 / 5;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--gray-600);
    font-size: 14px;
}

.rank-info small {
    color: var(--gray-500);
}

.page-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.page-hero.blue {
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-500));
}

.page-hero.purple {
    background: linear-gradient(135deg, var(--purple-500), var(--rose-500));
}

.page-title {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 58px 20px;
}

.page-title a {
    display: inline-flex;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.page-title p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px 20px;
    color: var(--gray-600);
    font-size: 14px;
}

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

.detail-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 26px 20px 70px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) 340px;
    gap: 28px;
}

.detail-card,
.side-card,
.search-panel {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.detail-content {
    padding: 30px;
}

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

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-badges span {
    display: inline-flex;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: var(--rose-600);
    background: var(--rose-50);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin: 18px 0 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.prose h2 {
    margin: 30px 0 12px;
    font-size: 24px;
}

.prose p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.9;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius) var(--radius) 0 0;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--white);
    text-align: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.16));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-trigger {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border: 0;
    border-radius: 999px;
    color: var(--rose-500);
    background: rgba(255, 255, 255, 0.95);
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.player-overlay strong {
    display: block;
    font-size: 22px;
}

.player-message {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.side-card {
    overflow: hidden;
    margin-bottom: 22px;
}

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

.side-card-body {
    padding: 22px;
}

.side-card h2,
.side-card h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

.side-meta {
    display: grid;
    gap: 10px;
    color: var(--gray-600);
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--gray-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    transform: translateX(3px);
    background: var(--rose-50);
}

.compact-thumb {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 5;
}

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

.compact-info strong {
    display: block;
    line-height: 1.35;
}

.compact-info small {
    display: block;
    margin-top: 4px;
    color: var(--gray-500);
}

.search-panel {
    padding: 24px;
    margin-bottom: 28px;
}

.search-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
}

.search-tools input {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    outline: 0;
    padding: 14px 18px;
}

.search-tools button {
    border-radius: 999px;
    border: 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    padding: 0 24px;
    cursor: pointer;
    font-weight: 800;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-pill {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--gray-700);
    background: var(--gray-100);
    cursor: pointer;
    font-weight: 750;
}

.filter-pill.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
}

.search-count {
    margin-top: 16px;
    color: var(--gray-600);
}

.is-hidden {
    display: none !important;
}

@keyframes fadeRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-rise {
    animation: fadeRise 0.6s ease both;
}

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

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

    .header-search {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-panel {
        max-width: 440px;
    }

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

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

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

    .hero {
        min-height: 640px;
    }

    .hero-content {
        padding: 64px 16px 90px;
        gap: 28px;
    }

    .hero-panel img {
        height: 320px;
    }

    .hero-controls {
        bottom: 22px;
    }

    .section,
    .page-section {
        padding: 42px 16px;
    }

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

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

    .rank-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .page-title {
        padding: 42px 16px;
    }

    .breadcrumb,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .detail-content {
        padding: 22px;
    }

    .search-tools {
        grid-template-columns: 1fr;
    }

    .search-tools button {
        min-height: 44px;
    }
}
